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

Re: Preseed: Expert recipe with LVM in partman-auto fails to format disk



On Fri, Jan 22, 2021, 4:39 PM Antoine Mazeas <antoine@karthanis.net> wrote:
Dear Debian Users,

For quite some time, I am failing to make partman process a custom
expert recipe during an unattended (preseeded) installation.

I am setting up a VM with an 8000 MB disk space (single disk) that I
want to partition using LVM. However, every time the recipe runs, I end
up getting an error from partman which I don't understand:

 > Failed to partition the selected disk

 >This happened because the selected recipe does not contain any
partition that can be created on LVM volumes.

Here's my full recipe and other partman options

....

What is the meaning of the $lvmignore keyword on this entry right below? It's the only time it appears here.
And it's not present in your 2nd example that does work.

   large-varlibdocker :: \
     512 512 512 ext4 $primary{ } $lvmignore{ } label{ boot } method{
format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{
/boot } . \
     2048 2048 2048 linux-swap $lvm_ok{ } method{ swap } format{ }
in_vg{ vg } . \
     1024 1024 1024 ext4 $lvm_ok{ } method{ format } format{ }
use_filesystem{ } filesystem{ ext4 } in_vg{ vg } lv_name{ root }
mountpoint{ / } . \
     512 512 512 ext4 $lvm_ok{ } method{ format } format{ }
use_filesystem{ } filesystem{ ext4 } in_vg{ vg } lv_name{ tmp }
mountpoint{ /tmp } . \
     512 512 512 ext4 $lvm_ok{ } method{ format } format{ }
use_filesystem{ } filesystem{ ext4 } in_vg{ vg } lv_name{ varlog }
mountpoint{ /var/log } . \
     512 512 512 ext4 $lvm_ok{ } method{ format } format{ }
use_filesystem{ } filesystem{ ext4 } in_vg{ vg } lv_name{ backup }
mountpoint{ /backup } . \
     512 513 -1 ext4 $lvm_ok{ } method{ format } format{ }
use_filesystem{ } filesystem{ ext4 } in_vg{ vg } lv_name{ varlibdocker }
mountpoint{ /var/lib/docker } .


For sanity's sake, I could get this recipe to work... (inspired from
lists.debian.org/debian-user/2014/12/msg00651.html):

d-i partman-auto/expert_recipe string \
   lvm-multi :: \
     512 512 512 ext2 $primary{ } label{ boot } method{ format } format{
} use_filesystem{ } filesystem{ ext2 } mountpoint{ /boot } . \
     2048 4096 4096 linux-swap $lvmok{ } method{ swap } format{ } . \
     1024 20480 20480 ext4  $lvmok{ } method{ format } format{ }
use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . \
     1024 20480 20480 ext4  $lvmok{ } method{ format } format{ }
use_filesystem{ } filesystem{ ext4 } mountpoint{ /var } . \
     64 64 64 ext4  $lvmok{ } method{ format } format{ } use_filesystem{
} filesystem{ ext4 } mountpoint{ /home } .


But I seem to be unable to modify it any further (like adding a
partition) without triggering the error mentioned above.

Any help or pointer appreciated...

Antoine



Reply to: