[pve-devel] [PATCH pve-storage 09/10] lvmplugin: add qcow2 snapshot

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Wed Jul 9 09:24:43 CEST 2025


> +    my $backing_path = $class->path($scfg, $name, $storeid,
> $backing_snap) if $backing_snap;


>>also, this should probably encode a relative path so that renaming
>>the VG and
>>adapting the storage.cfg entry works without breaking the back
>>reference?

About relative path, I have done test, and if you only specify the
filename|volname, it's already relative to the parent image


qemu-img info /home/store/images/10000/vm-10000-disk-0.qcow2
image: /home/store/images/10000/vm-10000-disk-0.qcow2
backing file: snap-snap4-vm-10000-disk-0.qcow2 (actual path:
/home/store/images/10000/snap-snap4-vm-10000-disk-0.qcow2)


changing to mountpoint:

qemu-img info /home/store2/images/10000/vm-10000-disk-0.qcow2
image: /home/store2/images/10000/vm-10000-disk-0.qcow2
backing file: snap-snap4-vm-10000-disk-0.qcow2 (actual path:
/home/store2/images/10000/snap-snap4-vm-10000-disk-0.qcow2)





with specify a relative path ./ 

qemu-img info /home/store/images/10000/vm-10000-disk-0.qcow2
image: /home/store/images/10000/vm-10000-disk-0.qcow2
backing file: ./snap-snap4-vm-10000-disk-0.qcow2 (actual path:
/home/store/images/10000/./snap-snap4-vm-10000-disk-0.qcow2)


(same for lvm)


More information about the pve-devel mailing list