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

Preseed partman recipe not allocating free lvm space properly



Hey list,  I'm trying to get my rematastered debian 7.7 iso to install
properly on several different classes of workstation we have.  Same basic
hardware,  all machines have 2 disks and the size is anywhere from 160GB
up to 1T.  

I created a recipe in my preseed file,  that seems to _almost_ work.  I can
get the remastered iso to install on both 160GB machines,  and 1TB machines
with the same recipe,  but in the 1TB machines,  partman still uses the
minimum values for the partitions,   then throws all the extra space left
in the lvm array into a dummy lv (for later removal).  Both software raid
arrays appear to get created properly.  At least md1 does seem to get the
remainder of the disk after md0 is created.


I thought I had setup the priorities correctly,  but I guess not.  Cranked
up priority for md1 creation,  and turned down priority for the dummy lvm
partition.  Everything else in the middle.

Here is the partman section of my preseed

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/purge_lvm_from_device  boolean true

d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/method string raid

d-i partman-auto-lvm/new_vg_name string vg00
d-i partman-auto-lvm/guided_size string max

d-i partman-auto/expert_recipe string                      \
      raid-lvm ::                                          \
        512 10 512 raid                                    \
          $primary{ } $lvmignore{ } $bootable{ }           \
          method{ raid }                                   \
        .                                                  \
        155000  50000 -1 raid                                 \
          $primary{ } $lvmignore{ }                        \
          method{ raid }                                   \
        .                                                  \
        10000 5000 20000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv00 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ / }                                  \
        .                                                  \
        20000 5000 100000 ext4                                \
          $defaultignore $lvmok{ } lv_name{ lv01 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /home }                              \
        .                                                  \
        10000 5000 20000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv02 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /var }                               \
        .                                                  \
        10000 5000 20000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv03 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /usr }                               \
        .                                                  \
        10000 10000 10000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv04 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /tmp }                               \
        .                                                  \
        16000 4000 32000 linux-swap                           \
          $defaultignore $lvmok{ } lv_name{ lv05 }         \
          method{ swap } format{ }                         \
        .                                                  \
        25000 5000 50000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv06 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /opt }                               \
        .                                                  \
        50000 3000 500000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv07 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /var/opt }                           \
        .                                                  \
        512 10 -1 ext4                                   \
          $defaultignore $lvmok{ } lv_name{ deleteme }     \
          method{ lvm }                                    \
        .

d-i partman-auto-raid/recipe string                              \
    1 2 0 ext4 /boot  /dev/sda1#/dev/sdb1                    .   \
    1 2 0 lvm  -      /dev/sda2#/dev/sdb2                    .


d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish

d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-lvm/confirm boolean true
d-i partman-md/confirm boolean true
d-i partman-md/confirm_nooverwrite  boolean true


-- 
Ryan Braun
Defence Weather Services
Chief Information Officer Branch, Environment Canada
CIV: 204-833-2500x2824 CSN: 257-2824 FAX: 204-833-2558
E-Mail: Ryan.Braun@ec.gc.ca


Reply to: