[pve-devel] [PATCH storage v2 4/5] lvm plugin: use relative path for qcow2 rebase command

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Jul 29 13:53:19 CEST 2025


otherwise the resulting qcow2 file will contain an absolute path, which makes
renaming the backing VG of the storage impossible.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>
---

Notes:
    v2: drop unused variable

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

diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 5a84e82..46c8d8e 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -1117,14 +1117,14 @@ sub volume_snapshot_delete {
 
     } else {
         #we rebase the child image on the parent as new backing image
-        my $parentpath = $snapshots->{$parentsnap}->{file};
         print
             "$volname: deleting snapshot '$snap' by rebasing '$childsnap' on top of '$parentsnap'\n";
+        my $rel_parent_path = get_snap_name($class, $volname, $parentsnap);
         $cmd = [
             '/usr/bin/qemu-img',
             'rebase',
             '-b',
-            $parentpath,
+            $rel_parent_path,
             '-F',
             'qcow2',
             '-f',
-- 
2.39.5





More information about the pve-devel mailing list