[pve-devel] [PATCH container] Fix #925: activate volume before trying to resize

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Mar 31 09:52:35 CEST 2016


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

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 48fea02..5164da7 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1301,6 +1301,8 @@ __PACKAGE__->register_method({
 
 	    $rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
 
+	    PVE::Storage::activate_volumes($storage_cfg, [$volid]);
+
 	    my $size = PVE::Storage::volume_size_info($storage_cfg, $volid, 5);
 	    $newsize += $size if $ext;
 	    $newsize = int($newsize);
-- 
2.1.4





More information about the pve-devel mailing list