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 <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2012-08-06 11:57:33 +02:00
committed by Dietmar Maurer
parent 9ffffc2e24
commit 69971d8bae

View File

@ -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;