]> git.proxmox.com Git - qemu-server.git/commitdiff
allow migrating raw btrfs volumes
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 22 Jun 2021 12:18:28 +0000 (14:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Jun 2021 10:26:40 +0000 (12:26 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PVE/QemuMigrate.pm

index 0d08bb28729291752e389bc21fe8ea91352f4079..0b41db72cdcc06792089be1e92ec0fd16c09a78e 100644 (file)
@@ -509,7 +509,10 @@ sub scan_local_volumes {
                # exceptions: 'zfspool' or 'qcow2' files (on directory storage)
 
                die "online storage migration not possible if snapshot exists\n" if $self->{running};
-               if (!($scfg->{type} eq 'zfspool' || $local_volumes->{$volid}->{format} eq 'qcow2')) {
+               if (!($scfg->{type} eq 'zfspool'
+                   || ($scfg->{type} eq 'btrfs' && $local_volumes->{$volid}->{format} eq 'raw')
+                   || $local_volumes->{$volid}->{format} eq 'qcow2'
+               )) {
                    die "non-migratable snapshot exists\n";
                }
            }
@@ -560,7 +563,7 @@ sub scan_local_volumes {
            my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
            my $scfg =  PVE::Storage::storage_config($storecfg, $sid);
 
-           my $migratable = $scfg->{type} =~ /^(?:dir|zfspool|lvmthin|lvm)$/;
+           my $migratable = $scfg->{type} =~ /^(?:dir|btrfs|zfspool|lvmthin|lvm)$/;
 
            die "can't migrate '$volid' - storage type '$scfg->{type}' not supported\n"
                if !$migratable;