this allows migrating from btrfs to other raw+size accepting storages, provided no snapshots exist.
Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- Notes: new in v5 PVE/Storage.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 93ae3ac..866b5cd 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -645,10 +645,10 @@ my $volname_for_storage = sub { # whether a migration snapshot is needed for a given storage sub storage_migrate_snapshot { - my ($cfg, $storeid) = @_; + my ($cfg, $storeid, $existing_snapshots) = @_; my $scfg = storage_config($cfg, $storeid); - return $scfg->{type} eq 'zfspool' || $scfg->{type} eq 'btrfs'; + return $scfg->{type} eq 'zfspool' || ($scfg->{type} eq 'btrfs' && $existing_snapshots); } sub storage_migrate { @@ -696,7 +696,7 @@ sub storage_migrate { my $migration_snapshot; if (!defined($snapshot)) { - $migration_snapshot = storage_migrate_snapshot($cfg, $storeid); + $migration_snapshot = storage_migrate_snapshot($cfg, $storeid, $opts->{with_snapshots}); $snapshot = '__migration__' if $migration_snapshot; } -- 2.30.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel