From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 9F5E51FF0B3 for ; Thu, 26 Nov 2026 17:58:25 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id DC496217F1; Thu, 26 Nov 2026 17:58:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795712258; x=1796317058; darn=lists.proxmox.com; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=O7j6sNTI1jpHGg9XFhwsF0HNlxfC/RUe5jqmD981IbU=; b=eshuTAUSxPdsG1dhl6vAZ9sco6SPdHaJv+2iV0tPzzbBYNljQQcfJ3BWtr4YxMQRHi TcelYUSN7jvX3ShXZhMnvfT+0AHUAR3TFlcytVU5WlpW0n3Lgh66piKFnD2UsTRPmVUl eBpZUkT86gqv2aB8zIl7zPqEm5tKhv4RRsvQlXOICTfEcHhdztQh2UOB66QvQx6NcuHb pnw5Pw/iPc4OHOGAtzZSEW5jtPAIFkHSsgfcZoLwGjq/0bkAmUUb5unn5zAPZF4LjjEz 2p4/11Ve6n713QrrB3XBcKWraALgJ6FzqrLcRDGU/kehZg8Wk3tBcd7gBKo96Cn6hqzd xOjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795712258; x=1796317058; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=O7j6sNTI1jpHGg9XFhwsF0HNlxfC/RUe5jqmD981IbU=; b=0i2QlILvKYyEEumQLQGl3b9OO9dWTrVgZmCk+KZamI4mRXuy16jffNuA0pp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93 with SMTP id 71dfb90a1353d-5ee8af03fefmr12368791e0c.13.1795712257923; Thu, 26 Nov 2026 08:57:37 -0800 (PST) Date: Thu, 26 Nov 2026 13:57:07 -0300 From: Ciro Iriarte 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 Message-ID: <20261126.6.copyoffload-v2@cyruspy.gmail.com> In-Reply-To: <20261126.0.copyoffload-v2@cyruspy.gmail.com> References: <20261126.0.copyoffload-v2@cyruspy.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.230 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider KAM_ASCII_DIVIDERS 0.8 Email that uses ascii formatting dividers and possible spam tricks RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no 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: ZVONP2GGS7WUIEVOO5DI2JMYZ5VZPHRO X-Message-ID-Hash: ZVONP2GGS7WUIEVOO5DI2JMYZ5VZPHRO X-MailFrom: cyruspy@gmail.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: From: Ciro Iriarte 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 --- 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