[pve-devel] [PATCH] allow --allow-shrink on RBD resize
Dietmar Maurer
dietmar at proxmox.com
Thu Nov 17 06:44:56 CET 2016
This is dangerous and can destroy data. So is there a real reason
to allow that?
> On November 16, 2016 at 8:13 PM Stefan Priebe <s.priebe at profihost.ag> wrote:
>
>
> Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
> ---
> PVE/Storage/RBDPlugin.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index 09562fe..eb0c256 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
> @@ -602,7 +602,7 @@ sub volume_resize {
>
> my ($vtype, $name, $vmid) = $class->parse_volname($volname);
>
> - my $cmd = &$rbd_cmd($scfg, $storeid, 'resize', '--size',
> ($size/1024/1024), $name);
> + 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;
> }
> --
> 2.1.4
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list