[pve-devel] [PATCH container] Use subvolumes with btrfs storage

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Aug 24 11:55:52 CEST 2016


---
 src/PVE/LXC.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index b07c198..2a5b6b7 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1190,7 +1190,7 @@ sub mountpoint_mount {
 
 	if ($format eq 'subvol') {
 	    if ($mount_path) {
-		if ($snapname) {
+		if ($snapname && $scfg->{type} ne 'btrfs') {
 		    if ($scfg->{type} eq 'zfspool') {
 			my $path_arg = $path;
 			$path_arg =~ s!^/+!!;
@@ -1343,7 +1343,7 @@ sub create_disks {
 							   undef, 0);
 			push @$chown_vollist, $volid;
 		    }
-		} elsif ($scfg->{type} eq 'zfspool') {
+		} elsif ($scfg->{type} eq 'zfspool' || $scfg->{type} eq 'btrfs') {
 
 		    $volid = PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'subvol',
 					               undef, $size_kb);
-- 
2.1.4





More information about the pve-devel mailing list