From: Ciro Iriarte <cyruspy@gmail.com>
To: pve-devel@lists.proxmox.com
Subject: [RFC PATCH docs v2 6/6] pvesm: document copy-offload and add it to the storage capability table
Date: Thu, 26 Nov 2026 13:57:07 -0300 [thread overview]
Message-ID: <20261126.6.copyoffload-v2@cyruspy.gmail.com> (raw)
In-Reply-To: <20261126.0.copyoffload-v2@cyruspy.gmail.com>
From: Ciro Iriarte <ciro.iriarte+software@gmail.com>
The capability table is where people look when choosing a storage, so
add a "Clone offload" column next to Snapshots, and document the
copy-offload and copy-offload-timeout options with the common storage
properties.
The column states what is implemented, not what a backend could do: NFS
and CIFS can copy server-side but are marked no because nothing uses
that yet, as the footnote explains.
The footnotes give the conditions that are not visible from the storage
configuration. A directory storage needs a filesystem with reflink
support, which for XFS is decided at mkfs time. A qcow2 with a backing
file or internal snapshots, and btrfs or LVM-thin images that are not
raw, are copied by the host. In those cases the clone falls back to the
host-side copy rather than failing, as the option text states. Ceph/RBD
finishes the copy with a manager task, so both storages must use the
same Ceph user and that user must be allowed to add manager tasks;
otherwise the host copies it. The docs also note that the clone
bandwidth limit does not apply to an offloaded copy.
Signed-off-by: Ciro Iriarte <ciro.iriarte+software@gmail.com>
---
Changes in v2:
* new in the series; v1 had it as a separate reply (2026-09-07)
* rebased onto current master: adds the NVMe-oF row (no offload)
* footnotes for raw-only btrfs and LVM-thin, the same thin pool,
qcow2 images with internal snapshots, and the Ceph manager access
RBD needs: the same Ceph user on both storages, allowed to add
manager tasks (otherwise the host copies)
* the option text no longer claims RBD copies share blocks, and says
the clone bandwidth limit does not apply and that time queued behind
other Ceph manager tasks counts toward copy-offload-timeout
* documents that a pair the backend cannot copy falls back to the host
pvesm.adoc | 79 ++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 62 insertions(+), 17 deletions(-)
diff --git a/pvesm.adoc b/pvesm.adoc
index ec2ef97..ea99b41 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -65,24 +65,24 @@ nodes that can be accessed as RBD (RADOS Block Device).
.Available storage types
-[width="100%",cols="<2d,1*m,4*d",options="header"]
+[width="100%",cols="<2d,1*m,5*d",options="header"]
|========================================================================
-|Description |Plugin type |Level |Shared|Snapshots|Stable
-|ZFS (local) |zfspool |both^1^|no |yes |yes
-|Directory |dir |file |no |yes^2^ |yes
-|BTRFS |btrfs |file |no |yes |TP^5^
-|NFS |nfs |file |yes |yes^2^ |yes
-|CIFS |cifs |file |yes |yes^2^ |yes
-|Proxmox Backup |pbs |both |yes |n/a |yes
-|CephFS |cephfs |file |yes |n/a |yes
-|LVM |lvm |block |no^3^ |yes^4^ |yes
-|LVM-thin |lvmthin |block |no |yes |yes
-|iSCSI/kernel |iscsi |block |yes^3^|yes^4^ |yes
-|iSCSI/libiscsi |iscsidirect |block |yes^3^|yes^4^ |yes
-|NVMe-oF |nvmeof |block |yes^3^|yes^4^ |yes
-|FC/SAS |native^6^ |block |yes^3^|yes^4^ |yes
-|Ceph/RBD |rbd |block |yes |yes |yes
-|ZFS over iSCSI |zfs |block |yes |yes |yes
+|Description |Plugin type |Level |Shared|Snapshots|Clone offload^7^|Stable
+|ZFS (local) |zfspool |both^1^|no |yes |no |yes
+|Directory |dir |file |no |yes^2^ |yes^8^ |yes
+|BTRFS |btrfs |file |no |yes |yes^9^ |TP^5^
+|NFS |nfs |file |yes |yes^2^ |no |yes
+|CIFS |cifs |file |yes |yes^2^ |no |yes
+|Proxmox Backup |pbs |both |yes |n/a |n/a |yes
+|CephFS |cephfs |file |yes |n/a |no |yes
+|LVM |lvm |block |no^3^ |yes^4^ |no |yes
+|LVM-thin |lvmthin |block |no |yes |yes^9^ |yes
+|iSCSI/kernel |iscsi |block |yes^3^|yes^4^ |no |yes
+|iSCSI/libiscsi |iscsidirect |block |yes^3^|yes^4^ |no |yes
+|NVMe-oF |nvmeof |block |yes^3^|yes^4^ |no |yes
+|FC/SAS |native^6^ |block |yes^3^|yes^4^ |n/a |yes
+|Ceph/RBD |rbd |block |yes |yes |yes^10^ |yes
+|ZFS over iSCSI |zfs |block |yes |yes |no |yes
|========================================================================
^1^: Disk images for VMs are stored in ZFS volume (zvol) datasets, which provide
@@ -115,6 +115,23 @@ xref:pvesm_lvm_config[LVM configuration] section.
^6^ Fibre Channel (FC) and SAS block storage is handled directly by the host
without a dedicated storage plugin.
+^7^ Whether a *full* clone can be handed to the storage instead of being copied
+byte by byte by the host. Off by default; enable it per storage with the
+`copy-offload` option. This only applies within one storage backend; copying
+between two different backends always goes through the host. Storages marked
+`no` are not necessarily incapable, they just have no implementation yet.
+
+^8^ Only when the underlying filesystem supports reflinks (XFS created with
+`reflink=1`, btrfs, or ZFS with block cloning enabled) and both storages are on
+the same filesystem. Not for a 'qcow2' image that has a backing file, since the
+copy would keep depending on the base, nor for one with internal snapshots.
+
+^9^ For BTRFS, only 'raw' images; for LVM-thin, only within the same thin pool.
+
+^10^ Only within one Ceph cluster, and only when both storages use the same Ceph
+user. The copy is finished by a Ceph manager task, so that user must be allowed
+to add manager tasks; otherwise, clones are copied by the host.
+
Thin Provisioning
~~~~~~~~~~~~~~~~~
@@ -316,6 +333,34 @@ file-based storages. The default is `metadata`, which is treated like `off` for
`raw` images. When using network storages in combination with large `qcow2`
images, using `off` can help to avoid timeouts.
+copy-offload::
+
+Let the storage perform full clones itself instead of copying the image through
+the host. Disabled by default. With reflinks, btrfs and LVM-thin the copy is
+close to instant and shares blocks with its source copy-on-write; Ceph/RBD
+copies the data on the cluster instead of through the host. The result is
+still a normal, independent disk: the source can be deleted afterwards.
+
+Set it on the storage the clone is created on. It only takes effect when the
+source storage is of the same type and that type supports it; see the ``Clone
+offload'' column above and its footnotes. Anything else, including an image or
+storage pair the backend cannot copy, falls back to the usual host-side copy.
+The `clone` bandwidth limit does not apply to an offloaded copy, as the data
+does not pass through the host.
+
+copy-offload-timeout::
+
+How long to wait, in seconds, for an offloaded copy to become independent of its
+source before giving up and cleaning up the unfinished target (default: 86400,
+one day). The timer restarts every time the backend reports progress, so this
+bounds a copy that has stalled rather than one that is merely slow. On Ceph/RBD,
+time a copy spends queued behind other manager tasks reports no progress and
+counts toward the timeout, so do not set it too low.
+
+Only relevant for backends that copy in the background, such as Ceph/RBD, where
+the clone is readable immediately but has to be flattened before it stops
+depending on its source. Backends that finish instantly never reach it.
+
WARNING: It is not advisable to use the same storage pool on different
{pve} clusters. Some storage operation need exclusive access to the
storage, so proper locking is required. While this is implemented
--
2.55.0
prev parent reply other threads:[~2026-11-26 16:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 16:56 [RFC PATCH storage/qemu-server/docs v2 0/6] offload full clone to the storage backend Ciro Iriarte
2026-11-26 16:56 ` [RFC PATCH storage v2 1/6] storage: add asynchronous copy-offload hook for full copies Ciro Iriarte
2026-11-26 16:56 ` [RFC PATCH storage v2 2/6] rbd: implement copy-offload via snapshot + clone + flatten Ciro Iriarte
2026-11-26 16:57 ` [RFC PATCH storage v2 3/6] dir: implement copy-offload via reflink (FICLONE) Ciro Iriarte
2026-11-26 16:57 ` [RFC PATCH storage v2 4/6] btrfs, lvmthin: implement copy-offload (atomic class) Ciro Iriarte
2026-11-26 16:57 ` [RFC PATCH qemu-server v2 5/6] use storage copy-offload for full clone Ciro Iriarte
2026-11-26 16:57 ` Ciro Iriarte [this message]
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=20261126.6.copyoffload-v2@cyruspy.gmail.com \
--to=cyruspy@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox