Needs a recent DRBDmanage and DRBD 9 version - 9.0.0 has a known bug. --- PVE/Storage/DRBDPlugin.pm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/PVE/Storage/DRBDPlugin.pm b/PVE/Storage/DRBDPlugin.pm index b780829..565fb4c 100644 --- a/PVE/Storage/DRBDPlugin.pm +++ b/PVE/Storage/DRBDPlugin.pm @@ -365,17 +365,14 @@ sub deactivate_volume { sub volume_resize { my ($class, $scfg, $storeid, $volname, $size, $running) = @_; - $size = ($size/1024/1024) . "M"; - - my $path = $class->path($scfg, $volname); + $size = int($size/1024); + my $hdl = connect_drbdmanage_service(); - # fixme: howto implement this - die "drbd volume_resize is not implemented"; - - #my $cmd = ['/sbin/lvextend', '-L', $size, $path]; - #run_command($cmd, errmsg => "error resizing volume '$path'"); + # FIXME if there's ever more than one volume in a resource + my ($rc) = $hdl->resize_volume($volname, 0, 0, $size, 0); + check_drbd_res($rc); - return 1; + return undef; } sub volume_snapshot { -- 2.6.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel