From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH storage 3/3] lvm: qcow2: reserve LV space for persistent dirty bitmaps
Date: Fri, 13 Nov 2026 12:12:47 +0100 [thread overview]
Message-ID: <ef39783d-b4bf-476b-9367-0479ff717733@proxmox.com> (raw)
In-Reply-To: <be4c96bd-40fe-4f7b-8a6a-f9c78040baff@proxmox.com>
Am 13.11.26 um 10:54 schrieb Fiona Ebner:
> 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.
Well, is it fully blocked? As else it can still be possible to do by
other integrator too.
And even if the internal persistent bitmaps are technically somewhat
flawed those can IMO easily look compelling to those – e.g. storage or
backup provider – when adding initial integration.
>> 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 <t.lamprecht@proxmox.com>
> If we still want to go with this, consider it:
>
> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
It's often just a few MiB that while certainly not a generic safe
guard can protect for a lot of real world pain, I see no big downside
here
next prev parent reply other threads:[~2026-11-13 11:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 1:17 [PATCH storage 0/3] lvm: fix qcow2 images outgrowing their LV Thomas Lamprecht
2026-11-13 1:17 ` [PATCH storage 1/3] lvm: avoid qcow2 images outgrowing their LV after offline snapshot delete Thomas Lamprecht
2026-11-13 1:17 ` [PATCH storage 2/3] lvm: qcow2 resize: size the LV for the cluster settings of the image Thomas Lamprecht
2026-11-13 1:17 ` [PATCH storage 3/3] lvm: qcow2: reserve LV space for persistent dirty bitmaps Thomas Lamprecht
2026-11-13 9:54 ` Fiona Ebner
2026-11-13 11:12 ` Thomas Lamprecht [this message]
2026-11-13 12:33 ` applied: " Fiona Ebner
2026-11-13 9:52 ` applied: (subset) [PATCH storage 0/3] lvm: fix qcow2 images outgrowing their LV Fiona Ebner
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=ef39783d-b4bf-476b-9367-0479ff717733@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.