public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 storage 1/2] lvm plugin: properly handle qcow2 format when querying volume size info
@ 2025-07-18 10:20 Fiona Ebner
  2025-07-18 10:20 ` [pve-devel] [PATCH v2 storage 2/2] lvm plugin: list images: properly handle qcow2 format Fiona Ebner
  2025-07-18 10:22 ` [pve-devel] applied-series: [PATCH v2 storage 1/2] lvm plugin: properly handle qcow2 format when querying volume size info Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2025-07-18 10:20 UTC (permalink / raw)
  To: pve-devel

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@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-18 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-18 10:20 [pve-devel] [PATCH v2 storage 1/2] lvm plugin: properly handle qcow2 format when querying volume size info Fiona Ebner
2025-07-18 10:20 ` [pve-devel] [PATCH v2 storage 2/2] lvm plugin: list images: properly handle qcow2 format Fiona Ebner
2025-07-18 10:22 ` [pve-devel] applied-series: [PATCH v2 storage 1/2] lvm plugin: properly handle qcow2 format when querying volume size info Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal