From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 487101FF0B7 for ; Fri, 13 Nov 2026 10:55:06 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 13FAA218F5; Fri, 13 Nov 2026 10:55:02 +0100 (CET) Message-ID: Date: Fri, 13 Nov 2026 10:54:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH storage 3/3] lvm: qcow2: reserve LV space for persistent dirty bitmaps To: Thomas Lamprecht , pve-devel@lists.proxmox.com References: <20261113012702.864671-1-t.lamprecht@proxmox.com> <20261113012702.864671-4-t.lamprecht@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20261113012702.864671-4-t.lamprecht@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794563697427 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.255 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6RI3MMM3PYDACEHYH5LZPQ7LZGVDFM5A X-Message-ID-Hash: 6RI3MMM3PYDACEHYH5LZPQ7LZGVDFM5A X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 13.11.26 um 2:27 AM schrieb Thomas Lamprecht: > Backup solutions like Veeam add persistent dirty bitmaps to qcow2 > images to track changed blocks. QEMU stores them inside the image when As others already pointed out, this is not true anymore. > the VM is stopped or migrated, in addition to what 'qemu-img measure' > reports and what the LV size is based on. So only the space from > rounding up to full extents was left for them, which depends on the > image size and can be close to nothing. As QEMU writes all new bitmap > clusters before freeing the old ones, a store needs room for two > copies, almost 4 MiB for one bitmap on a 900 GiB image. If that space > is missing, storing fails with ENOSPC and the bitmap is lost. > > Reserve space for two copies of two fully dirty bitmaps at the default > granularity of 64 KiB, which is also what Veeam was observed to use, > plus a refcount block for them. That is about 8 KiB per GiB of disk > size, for example 8.4 MiB for 900 GiB. The calculation assumes 128 KiB > clusters, so it also covers snapshot overlays. A finer granularity or > more than two bitmaps can still exceed the reserved space. So can a > store that needs to grow the refcount table, which happens at least for > images ending just below 16 TiB with 64 KiB clusters or 128 TiB with > 128 KiB clusters, as QEMU then places the new refcount structures at the > next refcount block boundary, up to 2 GiB or 8 GiB further. > > Existing LVs only get the additional space when they are resized. > > Signed-off-by: Thomas Lamprecht If we still want to go with this, consider it: Reviewed-by: Fiona Ebner