pve-qemu/debian
Thomas Lamprecht 20209d8d73 implement support for backup fleecing
Excerpt from Fiona's v3 cover-letter [0]:

When a backup for a VM is started, QEMU will install a
"copy-before-write" filter in its block layer. This filter ensures
that upon new guest writes, old data still needed for the backup is
sent to the backup target first. The guest write blocks until this
operation is finished so guest IO to not-yet-backed-up sectors will be
limited by the speed of the backup target.

With backup fleecing, such old data is cached in a fleecing image
rather than sent directly to the backup target. This can help guest IO
performance and even prevent hangs in certain scenarios, at the cost
of requiring more storage space.

With this series it will be possible to enable backup-fleecing via
e.g. `vzdump 123 --fleecing enabled=1,storage=local-lvm` with fleecing
images created on the storage `local-lvm`. The fleecing storage should
be a fast local storage which supports thin-provisioning and discard.
If the storage supports qcow2, that is used as the fleecing image
format. If the underlying file system does not support discard, with
qcow2 and preallocation=off, at least already allocated parts of the
image can be re-used later.

Fleecing images are created by qemu-server via pve-storage and
attached to QEMU before the backup starts, and cleaned up after the
backup finished or failed. The naming schema for fleecing images is
'vm-ID-fleece-N(.FORMAT)'. The allocated images are recorded in the
guest configuration, so that even after a hard failure, clean-up can
be re-attempted. While not too bad, it's a non-trivial amount of code
and I'm not 100% sure about the cost-benefit, so sending those as RFC.

The fleecing image needs to be the exact same size as the source, but
luckily, an explicit size can be specified when attaching a raw image
to QEMU so there are no size issues when using storages that have
coarser allocation/round up. For qcow2, it seems that virtual size can
be nearly arbitrary (i.e. modulo 512 byte granularity) during
allocation.

[0]: https://lists.proxmox.com/pipermail/pve-devel/2024-April/062815.html

Originally-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-11 20:05:02 +02:00
..
patches implement support for backup fleecing 2024-04-11 20:05:02 +02:00
source buildsys: remove edk2 source tree when assembling build-dir 2023-05-24 10:37:10 +02:00
Logo.bmp import stable-4 build files 2017-04-05 11:39:09 +02:00
OVMF_CODE-pure-efi.fd import stable-4 build files 2017-04-05 11:39:09 +02:00
OVMF_README.txt import stable-4 build files 2017-04-05 11:39:09 +02:00
OVMF_VARS-pure-efi.fd import stable-4 build files 2017-04-05 11:39:09 +02:00
changelog bump version to 8.1.5-4 2024-03-12 14:08:48 +01:00
control d/control: add python3-venv as build-dependency 2023-10-24 15:01:23 +02:00
copyright d/copyright: drop trailing whitespace 2022-04-22 09:16:23 +02:00
docs import stable-4 build files 2017-04-05 11:39:09 +02:00
kvm-ifdown import stable-4 build files 2017-04-05 11:39:09 +02:00
kvm-ifup update to 2.9.0-rc2 build files 2017-04-05 11:40:20 +02:00
parse-cpu-flags.pl Write recognized CPUID flags into static file 2019-10-17 13:39:21 +02:00
parse-machines.pl d/parse-machines: produce stable json output 2023-05-22 15:09:14 +02:00
pve-qemu-kvm.install debian: normalize packaging files with wrap-and-sort -tkn 2023-05-22 12:05:13 +02:00
pve-qemu-kvm.links debian: normalize packaging files with wrap-and-sort -tkn 2023-05-22 12:05:13 +02:00
pve-qemu-kvm.lintian-overrides d/lintian-overrides: ignore groff line breakage/adjustment warnings 2023-05-22 15:09:14 +02:00
rules d/rules: use disable-download option instead of git-submodules=ignore 2023-10-24 15:01:23 +02:00