From 69971d8bae87b60f7e5ad1ff30588346ade7d19c Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Mon, 6 Aug 2012 11:57:33 +0200 Subject: [PATCH] nexenta: volume_resize resize volume using nexenta api. (online or offline). we can't use qmp block_resize with libiscsi to online update disk size in guest (throw error), so return undef; Signed-off-by: Alexandre Derumier --- PVE/Storage/NexentaPlugin.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm index 523adac..6ad92d9 100644 --- a/PVE/Storage/NexentaPlugin.pm +++ b/PVE/Storage/NexentaPlugin.pm @@ -319,4 +319,12 @@ sub volume_size_info { return $size; } +sub volume_resize { + my ($class, $scfg, $storeid, $volname, $size, $running) = @_; + + my $json = '{"method": "set_child_prop","object" : "zvol","params": ["'.$scfg->{pool}.'/'.$volname.'", "volsize", "'.($size/1024).'KB"]}'; + die "error resize" if !nexenta_request($scfg, $json); + return undef; +} + 1;