[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Need help preseeding partman-auto for raid/lvm with 2 PVs



Hi everyone,

I hope that this list is the right place to post support requests for partman-auto. I know the list is primarily used for development. But since I couldn't find any other list, I thought I'd try here.

That said, here's what I want to achieve. I've read all the documentation I could find and experimented for days on end, but I can't seem to get it to work. Maybe it's not possible, but it probably is--given a creative approach.

I currently use preseeding for a nearly fully automated installation of our servers (I only need to type in the IP address and netmask at the beginning of the installation). Some of our servers have two physical hard drives, which are partitioned into a RAID-1 array. That array is the sole PV of a VG that holds two 16GB LVs named 'root' and 'swap'. The rest is left empty for use by virtual machines. This is achieved by partman-auto using the following preseeding configuration (only included partman-* directives):

"""
d-i     partman-auto-lvm/guided_size    string  max
d-i     partman-auto-lvm/new_vg_name    string  lvm
d-i     partman-auto-raid/recipe        string  \
        1 2 0 lvm - /dev/sda1#/dev/sdb1 .
d-i     partman-auto/disk       string  /dev/sda /dev/sdb
d-i     partman-auto/expert_recipe      string  multiraid :: \
32768 0 -1 raid $lvmignore{ } method{ raid } . \ 16384 0 16384 ext4 $defaultignore{ } $lvmok{ } method{ format } lv_name{ root } format{ } use_filesystem{ } filesystem{ ext4 } options/relatime{ relatime } mountpoint{ / } . \ 16384 0 16384 linux-swap $defaultignore{ } $lvmok{ } method{ swap } lv_name{ swap } format{ } . \ 0 0 -1 none $defaultignore{ } $lvmok{ } method{ none } lv_name{ fill } .
d-i     partman-auto/method     string  raid
d-i     partman-lvm/confirm     boolean true
d-i     partman-lvm/confirm_nochanges   boolean true
d-i     partman-lvm/device_remove_lvm   boolean true
d-i     partman-lvm/device_remove_lvm_span      boolean true
d-i     partman-lvm/vgdelete_confirm    boolean true
d-i     partman-md/confirm      boolean true
d-i     partman-md/confirm_nochanges    boolean true
d-i     partman-md/confirm_nooverwrite  boolean true
d-i     partman-md/device_remove_md     boolean true
d-i     partman-partitioning/confirm_write_new_label    boolean true
"""

Some of our servers, however, have 4 physical hard drives. I want these to be partitioned into two RAID-1 arrays, each of which is to be a PV for the LVM. And then I want the LV 'root' to be assigned space on PV1 and 'swap' on PV2. (The LVs for the virtual machines will then be striped across both PVs.).

Does anyone have any ideas how to make this work?

I've tried various recipe alterations, which got me as far as automatically creating both PVs and assigning them to the VG. But I never managed to successfully specify the PV a LV is mapped to.

I also tried using partman/early_command to prepare the RAID-1 arrays, add them as PVs to the VG and create the LVs, mapped to the proper PVs. But that didn't work either, because I couldn't write a partman-auto recipe that would use those LVs and just assign mount points to them.

Cheers,
Sebastian
--
*Sebastian J. Bronner*
Administrator

D9T GmbH - Magirusstr. 39/1 - D-89077 Ulm
Tel: +49 731 1411 696-0 - Fax: +49 731 3799-220

Geschäftsführer: Daniel Kraft
Sitz und Register: Ulm, HRB 722416
Ust.IdNr: DE 260484638

http://d9t.de - D9T High Performance Hosting
info@d9t.de


Reply to: