[pve-devel] [PATCH 7/8] sheepdog : volume_resize

Alexandre Derumier aderumier at odiso.com
Mon Aug 6 11:57:32 CEST 2012


use collie command to resize disk (online or offline).

we can't use qmp block_resize to online resize size in guest (throw error) , so return undef.

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/SheepdogPlugin.pm |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index 373bb91..d8b0312 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -231,4 +231,13 @@ sub volume_size_info {
     return $size;
 }
 
+sub volume_resize {
+    my ($class, $scfg, $storeid, $volname, $size, $running) = @_;
+
+    my $cmd = &$collie_cmd($scfg, 'vdi', 'resize' , $volname, $size);
+    run_command($cmd, errmsg => "sheepdog resize $volname' error");
+
+    return undef;
+}
+
 1;
-- 
1.7.2.5




More information about the pve-devel mailing list