PDA

View Full Version : [ubuntu] 10.04 LVM Preseeding



pelerin
March 2nd, 2011, 10:07 PM
Is there a limit to the number of partitions/logical volumes you can create using the partman-auto recipes? If not, any thoughts on why my preseed using the values included below results in only a /boot partition and logical volumes root, swap, and user? Is there another way to achieve putting /, /tmp, /var, /usr, /usr_local /opt, etc on their own logical volumes with preseeding?


#---------------------
# Partitioning
#--------------------

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto/purge_lvm_from_device boolean true

d-i partman-auto-lvm/new_vg_name string VolGroup01

d-i partman-auto/expert_recipe string \
boot-root :: \
40 50 100 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
500 10000 1024 ext4 \
$lvmok{ } \
$lv_name{ root } \
in_vg { vg01 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
64 512 50% linux-swap \
$lvmok{ } \
$lv_name{ swap1 } \
method{ swap } format{ } \
. \
500 4000 5120 ext4 \
$lvmok{ } \
$lv_name{ usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /usr } \
. \
500 3000 512000 ext4 \
$lvmok{ } \
$lv_name{ var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var } \
. \
500 2000 1024 ext4 \
$lvmok{ } \
$lv_name{ tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /tmp } \
. \
500 1000 1024 ext4 \
$lvmok{ } \
$lv_name{ opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /opt } \
. \
500 5000 15360 ext4 \
$lvmok{ } \
$lv_name{ home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /home } \
. \
500 6000 10240 ext4 \
$lvmok{ } \
$lv_name{ var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var } \

d-i partman-lvm/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true

BOK
August 2nd, 2011, 11:25 AM
Hint: why do you create a volume group named "VolGroup01" and then try to add stuff to "vg01"?