lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.82k stars 225 forks source link

Container with root volume less than 10GiB impossible to create on Nixos with LVM #1438

Open cfouche3005 opened 11 hours ago

cfouche3005 commented 11 hours ago

Required information

Issue description

When I create a container (VM are not affected by this error) with a root volume which has a size less than 10 GiB, I get this error : Capture d’écran du 2024-11-28 10-55-20 LVM is not able to resize image to a LVM size less than the base LVM size of the image (which is 10GiB) This function work on debian 12 After disscusing with one of the package maintainer (adamcstephens), he couldn’t find where the nix package could have broken this. I link the related forum post

Steps to reproduce

  1. Create a LVM storage pool
  2. Create a container with storage volume less than 10 GiB
  3. See error
cfouche3005 commented 11 hours ago

cc @adamcstephens

adamcstephens commented 11 hours ago

I suspect this is either a difference in the Debian/NixOS lvm2 packages or a detection of available features by Incus but I couldn’t identify any obvious issues in my initial investigation. If helpful the nix lvm2 package definition is here

stgraber commented 29 minutes ago

Indeed not able to reproduce this easily here with either thick or thin pools. Going to have to try with a newer version of LVM.

stgraber commented 21 minutes ago

Got the issue with the newer LVM on Debian.

stgraber commented 20 minutes ago

We should be able to pass --fs ignore since Incus handles that part, but we may need to check the version of LVM first.