Re: Preseed partman recipe not allocating free lvm space properly
On Sat, Dec 20, 2014 at 08:46:01PM +0000, ryan wrote:
> On Sat, Dec 20, 2014 at 09:45:32AM +0100, Geert Stappers wrote:
>
> >
> > In other words: I don't understand
> > Subject: Preseed partman recipe not allocating free lvm space properly
>
> Probably could have chosen a better subject.
>
> I read on a blog somewhere that the priorities were actually from low
> numbers to high. First I had read that, but adjusted preseed to the
> following.
>
Well that didn't work, so I thought I'd post some results from the
priorities from high to low. Again only minimum size lvm volumes get
created except for the dummy volume. Which has the lowest priority.
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 300 20000 ext4 \
$defaultignore $lvmok{ } lv_name{ lv00 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
20000 100 100000 ext4 \
$defaultignore $lvmok{ } lv_name{ lv01 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /home } \
. \
10000 200 20000 ext4 \
$defaultignore $lvmok{ } lv_name{ lv02 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var } \
. \
10000 200 20000 ext4 \
$defaultignore $lvmok{ } lv_name{ lv03 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /usr } \
. \
10000 100 10000 ext4 \
$defaultignore $lvmok{ } lv_name{ lv04 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /tmp } \
. \
16000 25 32000 linux-swap \
$defaultignore $lvmok{ } lv_name{ lv05 } \
method{ swap } format{ } \
. \
25000 30 50000 ext4 \
$defaultignore $lvmok{ } lv_name{ lv06 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /opt } \
. \
50000 10 500000 ext4 \
$defaultignore $lvmok{ } lv_name{ lv07 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var/opt } \
. \
512 1 -1 ext4 \
$defaultignore $lvmok{ } lv_name{ deleteme } \
method{ lvm } \
.
Results in
root@test:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 9.2G 292M 8.5G 4% /
udev 10M 0 10M 0% /dev
tmpfs 202M 316K 201M 1% /run
/dev/mapper/vg00-lv00 9.2G 292M 8.5G 4% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 403M 0 403M 0% /run/shm
/dev/md0 472M 29M 419M 7% /boot
/dev/mapper/vg00-lv01 19G 172M 18G 1% /home
/dev/mapper/vg00-lv06 23G 172M 22G 1% /opt
/dev/mapper/vg00-lv04 9.2G 149M 8.6G 2% /tmp
/dev/mapper/vg00-lv03 9.2G 1.4G 7.4G 16% /usr
/dev/mapper/vg00-lv02 9.2G 298M 8.5G 4% /var
/dev/mapper/vg00-lv07 46G 180M 44G 1% /var/opt
root@test:~# lvdisplay|tail -n 20
- currently set to 256
Block device 253:7
--- Logical volume ---
LV Path /dev/vg00/deleteme
LV Name deleteme
VG Name vg00
LV UUID chjAKF-1VSa-L5q1-wt9N-Ey9f-knGb-ECA5EH
LV Write Access read/write
LV Creation host, time test, 2014-12-21 02:56:41 +0000
LV Status available
# open 0
LV Size 858.78 GiB
Current LE 219847
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:8
root@test:~# lvdisplay |egrep 'LV\ (Name|Path|Size)'
LV Path /dev/vg00/lv00
LV Name lv00
LV Size 9.31 GiB
LV Path /dev/vg00/lv01
LV Name lv01
LV Size 18.62 GiB
LV Path /dev/vg00/lv02
LV Name lv02
LV Size 9.31 GiB
LV Path /dev/vg00/lv03
LV Name lv03
LV Size 9.31 GiB
LV Path /dev/vg00/lv04
LV Name lv04
LV Size 9.31 GiB
LV Path /dev/vg00/lv05
LV Name lv05
LV Size 14.90 GiB
LV Path /dev/vg00/lv06
LV Name lv06
LV Size 23.28 GiB
LV Path /dev/vg00/lv07
LV Name lv07
LV Size 46.56 GiB
LV Path /dev/vg00/deleteme
LV Name deleteme
LV Size 858.78 GiB
--
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: