Resize volume and notify qemu about it with zero-size block_resize message. Non-zero size notification about block device will cause error.
Signed-off-by: Dmitry Petuhov <mityapetu...@gmail.com> --- PVE/Storage/RBDPlugin.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index e5973de..dd40e46 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -604,13 +604,13 @@ sub volume_size_info { sub volume_resize { my ($class, $scfg, $storeid, $volname, $size, $running) = @_; - return $size if $running; + return $size if $running && !$scfg->{krbd}; my ($vtype, $name, $vmid) = $class->parse_volname($volname); my $cmd = &$rbd_cmd($scfg, $storeid, 'resize', '--allow-shrink', '--size', ($size/1024/1024), $name); run_rbd_command($cmd, errmsg => "rbd resize '$volname' error"); - return undef; + return ( ($scfg->{krbd})?0:undef ); } sub volume_snapshot { -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel