[pve-devel] [PATCH v2 container 2/3] enable btrfs support via subvolumes
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Jun 22 14:18:26 CEST 2021
Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
Changes to v1:
Rebased & Comment fixup.
Note that I have not yet opted to switch these tests to
`volume_has_feature` based ones. There are still some
unresolved questions there.
src/PVE/LXC/Migrate.pm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index ce1f7dd..95562e4 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -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;
--
2.30.2
More information about the pve-devel
mailing list