all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH storage 0/3] lvm: fix qcow2 images outgrowing their LV
Date: Fri, 13 Nov 2026 02:17:22 +0100	[thread overview]
Message-ID: <20261113012702.864671-1-t.lamprecht@proxmox.com> (raw)

There were reports of qcow2 images on LVM storages with
snapshot-as-volume-chain growing beyond their LV, which pauses the VM
with an ENOSPC I/O error.

One likely cause is deleting the oldest snapshot while the VM is
stopped.
FWICT the plain 'qemu-img commit' used for that drops preallocated
clusters of the base image wherever the overlay holds zeroes, and
guest writes to these ranges can later allocate past the end of the LV.
So the first patch sets 'discard-no-unref' for that commit, as already
done for running VMs and 'qemu-img convert' in qemu-server's a3a9a2ab
("fix #6543: use qcow2 'discard-no-unref' option when using
snapshot-as-volume-chain").

The second patch makes resize measure snapshot overlays with their own
cluster settings and the third patch reserves extra space needed for
persistent dirty bitmaps, for example from Veeam, which were not
explicitly accounted for in all cases and could fail to be stored for
some image sizes.

Tested on a scratch LVM volume group by driving allocation, snapshot,
snapshot deletion and resize through the plugin, with qemu-io
emulating guest writes and bitmap stores.

Thomas Lamprecht (3):
  lvm: avoid qcow2 images outgrowing their LV after offline snapshot
    delete
  lvm: qcow2 resize: size the LV for the cluster settings of the image
  lvm: qcow2: reserve LV space for persistent dirty bitmaps

 src/PVE/Storage/LVMPlugin.pm | 50 +++++++++++++++++++++++++++++-------
 1 file changed, 41 insertions(+), 9 deletions(-)

-- 
2.47.3





             reply	other threads:[~2026-11-13  1:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13  1:17 Thomas Lamprecht [this message]
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
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=20261113012702.864671-1-t.lamprecht@proxmox.com \
    --to=t.lamprecht@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal