[pve-devel] [PATCH] fix rbd create procedure

Wolfgang Link w.link at proxmox.com
Thu Sep 10 10:38:55 CEST 2015


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

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 53f77a3..df8dfe2 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1903,6 +1903,7 @@ sub umount_all {
 		die $err;
 	    }
 	}
+	PVE::Storage::deactivate_volumes($storage_cfg, [$volid]);
     });
 }
 
@@ -2129,7 +2130,9 @@ sub create_disks {
 
 		    die "krbd option must be enabled on storage type '$scfg->{type}'\n" if !$scfg->{krbd};
 		    $volid = PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'raw', undef, $size_kb);
+		    PVE::Storage::activate_volumes($storecfg, [$volid]);
 		    format_disk($storecfg, $volid);
+		    PVE::Storage::deactivate_volumes($storecfg, [$volid]);
 		} else {
 		    die "unable to create containers on storage type '$scfg->{type}'\n";
 		}
-- 
2.1.4





More information about the pve-devel mailing list