A receita final que estamos usando é a seguinte:
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/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/expert_recipe string \
mypartitioning :: \
1024 1024 1024 ext2 \
$primary{ } \
$bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext2 } \
label{ boot } \
mountpoint{ /boot } \
. \
136594 136594 136594 ext4 \
$primary{ } \
method{ lvm } \
device{ /dev/sda2 } \
vg_name{ vg00 } \
. \
1 1 -1 ext4 \
$primary{ } \
method{ lvm } \
device{ /dev/sda3 } \
vg_name{ vg02 } \
. \
16384 16384 16384 linux-swap \
$lvmok{ } in_vg{ vg00 } \
lv_name{ swap } \
method{ swap } format{ } \
. \
14336 14336 14336 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
1024 1024 1024 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ home } \
mountpoint{ /home } \
. \
2048 2048 2048 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ var } \
mountpoint{ /var } \
. \
6144 6144 6144 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ log } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ log } \
mountpoint{ /var/log } \
. \
2048 2048 2048 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ audit } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ audit } \
mountpoint{ /var/log/audit } \
. \
1024 1024 1024 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ openview } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ openview } \
mountpoint{ /var/opt/OV } \
. \
1024 1024 1024 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ appl } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ appl } \
mountpoint{ /appl } \
. \
1 1 -1 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ hack } \
method{ lvm } \
.
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm boolean true
O particionamento resultante é o seguinte:
root@xxxxxxxx:~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 279.4G 0 disk
├─sda1 8:1 1 976M 0 part /boot
├─sda2 8:2 1 127.2G 0 part
│ ├─vg00-root 252:0 0 13.4G 0 lvm /
│ ├─vg00-swap 252:1 0 15.3G 0 lvm
│ ├─vg00-home 252:2 0 976M 0 lvm /home
│ ├─vg00-var 252:3 0 1.9G 0 lvm /var
│ ├─vg00-log 252:4 0 5.7G 0 lvm /var/log
│ ├─vg00-audit 252:5 0 1.9G 0 lvm /var/log/audit
│ ├─vg00-openview 252:6 0 976M 0 lvm /var/opt/OV
│ └─vg00-appl 252:7 0 976M 0 lvm /appl
└─sda3 8:3 1 151.2G 0 part
root@xxxxxxxx:~ # pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg00 lvm2 a-- 127.21g 86.21g
/dev/sda3 vg02 lvm2 a-- 151.20g 71.20g
O hack LV é deletado no postscript da instalação.