From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 906A21FF18A for ; Tue, 22 Jul 2025 17:31:28 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9E357D8C8; Tue, 22 Jul 2025 17:32:40 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Tue, 22 Jul 2025 17:31:50 +0200 Message-ID: <20250722153231.107955-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753198345421 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [lvmplugin.pm] Subject: [pve-devel] [RFC storage] work-around #6543: do not use preallocation for qcow2 on top of LVM X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" With the default preallocation=metadata for qcow2, the image can grow more than 'qemu-img measure' reports, see bug #6543. Currently, the option does not seem to make a difference with 'qemu-img measure', so that needs to be further investigated. Once it's safe to add preallocation back here, it should also be re-added to the qemu_img_resize() call. Also, the option should be passed along to the qemu_img_measure() call, because otherwise, it wouldn't match the actual creation options. Signed-off-by: Fiona Ebner --- RFC, because this stop-gap might not even be complete (but it's the best I have right now). Needs to be furhter investigated in any case. src/PVE/Storage/LVMPlugin.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm index 8be2a10..fba592d 100644 --- a/src/PVE/Storage/LVMPlugin.pm +++ b/src/PVE/Storage/LVMPlugin.pm @@ -568,8 +568,14 @@ my sub lvm_qcow2_format { $class->activate_volume($storeid, $scfg, $name); my $path = $class->path($scfg, $name, $storeid); + # TODO with the default preallocation=metadata for qcow2, the image can grow more than + # 'qemu-img measure' reports, see bug #6543. Currently, the option does not seem to make a + # difference with 'qemu-img measure', so that needs to be further investigated. Once it's safe + # to add preallocation back here, it should also be re-added to the qemu_img_resize() call. + # Also, the option should be passed along to the qemu_img_measure() call, because otherwise, + # it wouldn't match the actual creation options. my $options = { - preallocation => PVE::Storage::Plugin::preallocation_cmd_opt($scfg, $fmt), + # preallocation => PVE::Storage::Plugin::preallocation_cmd_opt($scfg, $fmt), }; if ($backing_snap) { my $backing_volname = get_snap_name($class, $name, $backing_snap); @@ -927,8 +933,7 @@ sub volume_resize { ); if (!$running && $format eq 'qcow2') { - my $preallocation = PVE::Storage::Plugin::preallocation_cmd_opt($scfg, $format); - PVE::Storage::Common::qemu_img_resize($path, $format, $size, $preallocation, 10); + PVE::Storage::Common::qemu_img_resize($path, $format, $size, undef, 10); } return 1; -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel