From 2ef1d256e7f8ecdfe1a26e7c3907b4da9bf0cff5 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 21 Feb 2025 16:41:10 +0100 Subject: [PATCH] btrfs: volume import: fix check for presence of base snapshot For a 'raw' volume, the path includes the '/disk.raw' suffix, but the check expects the containing subvolume directory. Signed-off-by: Fiona Ebner --- 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 5ed910d..651806d 100644 --- a/src/PVE/Storage/BTRFSPlugin.pm +++ b/src/PVE/Storage/BTRFSPlugin.pm @@ -824,6 +824,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); }