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

Partman-Auto - Multi-Disk OR Use Existing Layout via Preseed



First, I have to say I love Debian. But I've been struggling with the preseeding lately. First it was the keyboard layout, as the name has changed a few times.
But that's been rectified. So, now I am trying to get partitioning right.

This was the recipe I tried:

d-i partman-auto/disk string /dev/sdb /dev/sda
d-i partman-auto/method string lvm
d-i partman-auto/choose_recipe select boot-root
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto-lvm/new_vg_name string sysvg

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_md  boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/confirm boolean true

d-i partman/confirm_write_new_label boolean true
d-i partman/confirm boolean true
d-i partman/default_filesystem string ext3
d-i partman/mount_style select uuid
#d-i partman/choose_partition \
#        select Finish partitioning and write changes to disk

d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              512 30720 512 ext3                              \
                      $primary{ } $bootable{ } $lvmignore { } \
                      method{ format } format{ }              \
                      filesystem{ ext3 }    \
                      mountpoint{ /boot }                     \
              .                                               \
              10000 10100 10734 ext3                          \
                      $primary{ } $defaultignore{ }           \
                      method{ lvm } device{ /dev/sdb }        \
                      vg_name{ sysvg }                        \
              .                                               \
              10000 21000 1000000000 ext3                     \
                      $defaultignore{ }           \
                      method{ lvm } device{ /dev/sdb }        \
                      vg_name{ xen_vg }                       \
              .                                               \
              2048 9000 2048 linux-swap                       \
                      $lvmok{ } method{ swap } format{ }      \
                      in_vg{ sysvg } lv_name{ swap1 }         \
              .                                               \
              4096 10500 4096 ext3                            \
                      $lvmok{ } method{ format } format{ }    \
                      in_vg{ sysvg } lv_name{ root }          \
                      filesystem{ ext3 } mountpoint{ / }      \
              .                                               \
              4063 8000 4065 ext3                             \
                      $lvmok{ } method{ format } format{ }    \
                      in_vg{ sysvg } lv_name{ var }           \
                      filesystem{ ext3 } mountpoint{ /var }   \
              .                                               \


This didn't quite do the right thing.

Desired layout:

/dev/sda - 512MB disk:

/dev/sda1 - /boot - 512MB

/dev/sdb - Rest of disk -
/dev/sdb1 - physical_volume for sysvg volume group ~ 10.7GB
/dev/sdb2 - pysical_volume for xen_vg volume group - Remaining amount of disk

and the three LVs - root, var, swap, inside of sysvg

So, I can't seem to get this to work right. I tried to even just use /dev/sdb alone, but I coulnd't get it to ignore /dev/sda, even when partman/disk only says /dev/sdb.

The other (cheating to me, but doable) option is to use the pre-partman-script to do the correct partitioning, and write a recipe to simply use the correct partitions..but I don't see any documents on this.

Please, someone tell me this can be done correctly.

What's really upsetting is that this is the equivalent recipe in kickstart:

clearpart --all --drives=/dev/sda,/dev/sdb --initlabel
part /boot --fstype ext3 --size=510 --asprimary --ondisk=/dev/sda
part pv.01 --size=10240 --asprimary --ondisk=/dev/sdb
part pv.02 --size=1 --grow --asprimary --ondisk=/dev/sdb
volgroup sysvg pv.01 --pesize=32768
volgroup xen_vg pv.02 --pesize=32768
logvol /   --vgname=sysvg  --size=4096 --fstype ext3 --name=root
logvol swap   --vgname=sysvg  --size=2048 --fstype ext3 --name=swap1
logvol /var   --vgname=sysvg  --size=4064 --fstype ext3 --name=var


I understand this may come off as a bit combative, but that's not what I'm after. :)

I'd just like to get this done. Without this, my exercises remain an exercise only. :-(

-Matt

PS. I speak for me only, not for my company.


Reply to: