mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-03-11 16:58:28 +03:00
rbd: don't specify allow-shrink flag
It was introduced by commit 4b7dd9d ("allow --allow-shrink on RBD resize"), but doesn't give a rationale. A mail gives more[0], indicating that the user also uses the function to shrink images. However, the volume_resize function is only reachable via the resize API endpoints for VMs and containers, which have an explicit check to disallow shrinkage. If somebody really wants to shrink the image, just let them use the storage's tools directly. Calling into Proxmox VE's perl functions directly is not supported. [0]: https://lists.proxmox.com/pipermail/pve-devel/2016-November/024077.html Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
0bbb358c91
commit
4ff0f451bd
@ -779,7 +779,7 @@ sub volume_resize {
|
||||
|
||||
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
|
||||
|
||||
my $cmd = $rbd_cmd->($scfg, $storeid, 'resize', '--allow-shrink', '--size', ($size/1024/1024), $name);
|
||||
my $cmd = $rbd_cmd->($scfg, $storeid, 'resize', '--size', ($size/1024/1024), $name);
|
||||
run_rbd_command($cmd, errmsg => "rbd resize '$volname' error");
|
||||
return undef;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user