From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 1/2] rbd: don't specify allow-shrink flag
Date: Fri, 28 Apr 2023 14:32:08 +0200 [thread overview]
Message-ID: <20230428123209.124097-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20230428123209.124097-1-f.ebner@proxmox.com>
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>
---
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 73703fb..9d59a14 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -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;
}
--
2.30.2
next prev parent reply other threads:[~2023-04-28 12:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 12:32 [pve-devel] [PATCH-SERIES qemu-server/storage] improve RBD resize Fiona Ebner
2023-04-28 12:32 ` [pve-devel] [PATCH qemu-server 1/1] block resize: avoid passing zero size to QMP command Fiona Ebner
2023-04-28 12:32 ` Fiona Ebner [this message]
2023-04-28 12:32 ` [pve-devel] [PATCH storage 2/2] rbd: volume resize: avoid passing floating point value to rbd Fiona Ebner
2023-06-06 17:37 ` Thomas Lamprecht
2023-06-07 8:51 ` Fiona Ebner
2023-06-06 17:45 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server/storage] improve RBD resize Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230428123209.124097-3-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox