For a 'raw' volume, the path includes the '/disk.raw' suffix, but the
check expects the containing subvolume directory.

Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>
---
 src/PVE/Storage/BTRFSPlugin.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index cadd9d1..b0f732b 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -822,6 +822,7 @@ sub volume_import {
 
     if (defined($base_snapshot)) {
        my $path = $class->path($scfg, $volname, $storeid, $base_snapshot);
+       $path = raw_file_to_subvol($path) if $volume_format eq 'raw';
        die "base snapshot '$base_snapshot' not found - no such directory 
'$path'\n"
            if !path_is_subvolume($path);
     }
-- 
2.39.5



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

Reply via email to