[pve-devel] [PATCH v2 storage 1/2] lvm plugin: properly handle qcow2 format when querying volume size info

Fiona Ebner f.ebner at proxmox.com
Fri Jul 18 12:20:07 CEST 2025


In particular this fixes moving a qcow2 on top of LVM to a different
storage.

Fixes: eda88c9 ("lvmplugin: add qcow2 snapshot")
Reported-by: Michael Köppl <m.koeppl at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---

Changes in v2:
* Add Reported-by trailer.
* Mention what this fixes in the commit message.

 src/PVE/Storage/LVMPlugin.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 7044c4f..6d57097 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -930,8 +930,12 @@ sub volume_resize {
 
 sub volume_size_info {
     my ($class, $scfg, $storeid, $volname, $timeout) = @_;
+
+    my ($format) = ($class->parse_volname($volname))[6];
     my $path = $class->filesystem_path($scfg, $volname);
 
+    return PVE::Storage::Plugin::file_size_info($path, $timeout, $format) if $format eq 'qcow2';
+
     my $cmd = [
         '/sbin/lvs',
         '--separator',
-- 
2.47.2





More information about the pve-devel mailing list