[pve-devel] [PATCH pve-storage 3/5] lvmplugin: add qcow2 snapshot

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Tue May 13 20:37:37 CEST 2025


>>It's work for me if the vm if offline, I think this is the problem
>>with
>>the size defined in bytes or kb, depend of the code path if the vm is
>>offline or online. (I don't remember exactly where, I need to check)

mmmmm, I just have retested on my side, online or offline, and it's
working fine with 10G  (so the lvm size is ok vs qcow2 size)


online

#qm create 10000 && qm start 10000 && qm set 10000 --scsi0
lvmtest2:10,format=qcow2
update VM 10000: -scsi0 lvmtest2:10,format=qcow2
  Logical volume "vm-10000-disk-2.qcow2" created.
Formatting '/dev/test/vm-10000-disk-2.qcow2', fmt=qcow2
cluster_size=65536 extended_l2=off preallocation=metadata
compression_type=zlib size=10737418240 lazy_refcounts=off
refcount_bits=16
scsi0: successfully created disk 'lvmtest2:vm-10000-disk-
2.qcow2,size=10G'


offline
#qm create 10000 && qm set 10000 --scsi0 lvmtest2:10,format=qcow2
  Logical volume "vm-10000-disk-2.qcow2" created.
Formatting '/dev/test/vm-10000-disk-2.qcow2', fmt=qcow2
cluster_size=65536 extended_l2=off preallocation=metadata
compression_type=zlib size=10737418240 lazy_refcounts=off
refcount_bits=16
scsi0: successfully created disk 'lvmtest2:vm-10000-disk-
2.qcow2,size=10G'



but failed with 28G (online or offline)

qm create 10000 && qm set 10000 --scsi0 lvmtest2:28,format=qcow2
  Logical volume "vm-10000-disk-2.qcow2" created.
Formatting '/dev/test/vm-10000-disk-2.qcow2', fmt=qcow2
cluster_size=65536 extended_l2=off preallocation=metadata
compression_type=zlib size=30064771072 lazy_refcounts=off
refcount_bits=16
qemu-img: Failed to flush the refcount block cache: No space left on
device
  Logical volume "vm-10000-disk-2.qcow2" successfully removed.
unable to create image: qemu-img: /dev/test/vm-10000-disk-2.qcow2:
Could not resize image: Allocating clusters failed: No space left on
device


So,It's something with the overhead calc...

(I need to check as extended_l2=off with base image, vs extended_l2=on
with snapshot. I don't rember if I have set extended_l2=off explicitly
to off for the base image for performance or not)






More information about the pve-devel mailing list