From 9b6e1387886981ff0585a3b62024a86631f5c17d Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 18 Jul 2025 12:20:07 +0200 Subject: [PATCH] lvm plugin: properly handle qcow2 format when querying volume size info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Fiona Ebner Link: https://lore.proxmox.com/20250718102023.70591-1-f.ebner@proxmox.com --- 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',