From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1BC8D1FF17C for ; Wed, 23 Jul 2025 15:06:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5B6D312633; Wed, 23 Jul 2025 15:08:01 +0200 (CEST) Message-ID: <59e8085b-b78e-47a1-83b6-619acf815cd7@proxmox.com> Date: Wed, 23 Jul 2025 15:07:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion References: <20250722153231.107955-1-f.ebner@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753276067747 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 Subject: Re: [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" Hi Alexandre, Am 23.07.25 um 2:15 PM schrieb DERUMIER, Alexandre via pve-devel: > Hi Fiona, I'm on holiday, can't verify, but before using qemu-img > measure I had implemented compute of metadatas size (It was not 100% > perfect). > > This is strange, because I thinked that "qemu-img measure" was working > correctly (we need to pass it blocksize && l2_extended option too). I > had tried with a 1TB qcow2 volume. > > > Note that I'm almost pretty sure that l2_extended=on need > preallocation. (If I remember it's failing without it, and performance > of backed volumes are pretty bad with l2_extended). allocation seems to work fine: Formatting '/dev/sharedlvm/vm-101-disk-0.qcow2', fmt=qcow2 cluster_size=131072 extended_l2=on compression_type=zlib size=1073741824 backing_file=snap_vm-101-disk-0_foobar.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 Do you mean for the performance benefits? > it seem to be normal that preallocation option don't make a difference > here. qemu-img measure always compute size of all metadatas. (only > cluster_size && l2_extended change the result) > > > I don't understand why disabling preallocation could help here (until > it's bugged), because the same amount of metadatas need to be allocated > later on the fly with disabled preallocation. Yes, intuitively and telling from qemu-img measure, preallocation shouldn't make a difference, but it seems to. The bug has not been fully investigated, but I can clearly see qcow2 trying to write to an offset beyond the LV size (which is even slightly larger than what qemu-img measure reported, because it rounded up to full extent). In practice, something is wrong, see the bug report. Friedrich and I were both able to reproduce the issue, but only with preallocation=metadata for now. I used a 4GiB disk on a ZFS storage that first was filled with zeroes from within the VM (like in the bug report). Then offline move it to qcow2-on-LVM and again fill it with zeroes from within the VM. The error doesn't happen every time though, still need to investigate further. Best Regards, Fiona _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel