]> git.proxmox.com Git - pve-container.git/commitdiff
enable btrfs support via subvolumes
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 22 Jun 2021 12:18:26 +0000 (14:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Jun 2021 19:51:19 +0000 (21:51 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/LXC/Migrate.pm

index ce1f7dd7e122c736d1259150e41aad42ba22dec9..95562e44c50662012caa519cbf723fe1c81c1bc3 100644 (file)
@@ -155,8 +155,8 @@ sub phase1 {
 
        if (defined($snapname)) {
            # we cannot migrate shapshots on local storage
-           # exceptions: 'zfspool'
-           if (($scfg->{type} eq 'zfspool')) {
+           # exceptions: 'zfspool', 'btrfs'
+           if ($scfg->{type} eq 'zfspool' || $scfg->{type} eq 'btrfs') {
                return;
            }
            die "non-migratable snapshot exists\n";
@@ -222,8 +222,9 @@ sub phase1 {
            my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
            my $scfg =  PVE::Storage::storage_config($self->{storecfg}, $sid);
 
-           my $migratable = ($scfg->{type} eq 'dir') || ($scfg->{type} eq 'zfspool') ||
-               ($scfg->{type} eq 'lvmthin') || ($scfg->{type} eq 'lvm');
+           my $migratable = ($scfg->{type} eq 'dir') || ($scfg->{type} eq 'zfspool')
+               || ($scfg->{type} eq 'lvmthin') || ($scfg->{type} eq 'lvm')
+               || ($scfg->{type} eq 'btrfs');
 
            die "storage type '$scfg->{type}' not supported\n"
                if !$migratable;