From 32f55f8c0d7f7d7137cebdcc4315223225488937 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 21 Feb 2025 16:41:11 +0100 Subject: [PATCH] btrfs: volume export: fix command for incremental stream The subvolume itself cannot be included if there is a base snapshot or the command would fail with e.g. > ERROR: subvolume /mnt/btrfs/images/400/vm-400-disk-0 is not read-only Signed-off-by: Fiona Ebner --- src/PVE/Storage/BTRFSPlugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm index 651806d..5611c1d 100644 --- a/src/PVE/Storage/BTRFSPlugin.pm +++ b/src/PVE/Storage/BTRFSPlugin.pm @@ -780,7 +780,8 @@ sub volume_export { } push @$cmd, '--'; if (ref($with_snapshots) eq 'ARRAY') { - push @$cmd, (map { "$path\@$_" } ($with_snapshots // [])->@*), $path; + push @$cmd, (map { "$path\@$_" } ($with_snapshots // [])->@*); + push @$cmd, $path if !defined($base_snapshot); } else { foreach_snapshot_of_subvol($path, sub { my ($snap_name) = @_;