LVM snapshots - Could not create volume because of insufficient space

I’m trying to install Nextcloud VM using the provided install script on a fresh Ubuntu 20.04 LTS.
No matter how big I make the vdisk, I just cannot create the LVM volume (first step of install script), I’m always getting the “Could not create volume because of insufficient space” error.

I’m currently trying with a 100G vdisk, both automatic partitioning (LVM cluster) and manual partitioning (one boot partition + around 98G of OS partition) lead to the same error.

Any advice on how to do my partitioning to make this work? would be lovely to have zfs snapshots for the VM working…


I ran into this same problem. I was finally able to fix it by sizing the pv and vg to fill the entire partition, but undersize the root lv to leave room for nextcloud to make an additional lv. It seems to make the new lv 5GB then offer to extend the root lv to fill the remaining space.

Thank you for your reply!
Being a linux noob I still don’t understand what I did different from what you describe:
(picture upload doesn’t work for me, so this is my transcript of one of my failing ubuntu disk configurations:)

on a 100G vdisk:
/ 40G new LVM logical volume
boot 1.5G new partition of logical volume (ext4)
/boot/efi 1.049G new partition of logical volume (fat32)

available devices:
ubuntu-vg (new) lvm volume group, size 97,445G
available free space size 57,445G

used devices:
ubuntu-vg (new) lvm volume group, size 97,445G
ubuntu-lv size 40G

So where’s the problem here for the script? There’s a 40G lv inside a 97G LVM. plenty of space to create a 5G lv, right?

Cheers for enlightening me!

Hi, I think you should be able to follow these steps to make it work: vm/ at c4b764acbd4fb3c66acb24cddfe21774a1363126 · nextcloud/vm · GitHub
(However the backslashes in the command should be removed)