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 822B01FF0B3 for ; Thu, 26 Nov 2026 16:13:33 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 00B38217C8; Thu, 26 Nov 2026 16:11:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neatech-ar.20260707.gappssmtp.com; s=20260707; t=1795705852; x=1796310652; darn=lists.proxmox.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Br+2D3C3O8abGm3D2+HJLju14XqCXTG0Oy+RqI9zd00=; b=MoKNI28IJHg7NSg5d9I8NgZminMZ9ve6EJy6xsKJJoQCEsPQ8/Or+BV/3vi/kvG/WY dCevMUIBEHJUyc10dzBix46PQfton8VZFziq3BruT7dEyPWch0oFnih1XOH+jpQH2XAM eeI5BFh332UMRdsh2cyprz1pRBiLALe+Mcas/GD79q1KqwiQuMncf53YZlCeeOFgGDMG mwEYrudM+JzaKMTZcJCNNqbqd+1wuKDzj5sM1mR3+y5ipSURfgDe2crE0IJkwDQNrmba wk6c2xuKaoZPbydZbXlsgyddKTgWZmpsHTCIstzU+8OsdFBNeDu5qIaJYWFoNYhKHyLF 0pGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795705852; x=1796310652; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Br+2D3C3O8abGm3D2+HJLju14XqCXTG0Oy+RqI9zd00=; b=wWPG9hdi26YjLlJDnp4w4nDX0LOHDHrd1r5SqNzlgPWAluuMN9BuOv9FW6UB2fKxjB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aJrB+03eF1VYii9A1Sl3ppcVWvGoWJ GLadRfp/izoHuCKL6UBZ6kQFVpFy28A== X-Received: by 2002:ac5:cc70:0:b0:5ea:a8cc:e6fa with SMTP id 71dfb90a1353d-5ee8af22cf6mr13463817e0c.4.1795705851577; Thu, 26 Nov 2026 07:10:51 -0800 (PST) From: Joaquin Varela To: pve-devel@lists.proxmox.com Subject: [PATCH docs v5] storage: document ZFS over NVMe/TCP Date: Thu, 26 Nov 2026 12:10:51 -0300 Message-ID: <20261126151052.310848-1-joaquinvarela@neatech.ar> X-Mailer: git-send-email 2.54.0.windows.1 In-Reply-To: <20261126150956.310593-1-joaquinvarela@neatech.ar> References: <20261126150956.310593-1-joaquinvarela@neatech.ar> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.257 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 DMARC_PASS -0.1 DMARC pass policy KAM_ASCII_DIVIDERS 0.8 Email that uses ascii formatting dividers and possible spam tricks PROLO_LEO1 0.1 Meta Catches all Leo drug variations so far 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: WGB4XDX47YOXMAFGB2JWOTHQBQFC3GXD X-Message-ID-Hash: WGB4XDX47YOXMAFGB2JWOTHQBQFC3GXD X-MailFrom: joaquinvarela@neatech.ar 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: Add a chapter for the zfsnvme storage type with its prerequisites, properties, an example, what happens when all paths are down, how to clean up after removing a storage and its limits. List the type in the table of storage types and include the chapter in pvesm. The chapter marks the type as a technology preview like the table does. It says that Proxmox VE refuses to add the first storage of the type until every node knows it, and how the type differs from NVMe over Fabrics. It also says that a removed storage or a failed add leaves its subsystem on the target. Removing that subsystem is required before a key change, the revocation of a node, or reusing its portals. Signed-off-by: Joaquin Varela --- pve-storage-zfsnvme.adoc | 210 +++++++++++++++++++++++++++++++++++++++ pvesm.adoc | 5 + 2 files changed, 215 insertions(+) create mode 100644 pve-storage-zfsnvme.adoc diff --git a/pve-storage-zfsnvme.adoc b/pve-storage-zfsnvme.adoc new file mode 100644 index 0000000..7374cff --- /dev/null +++ b/pve-storage-zfsnvme.adoc @@ -0,0 +1,210 @@ +[[storage_zfsnvme]] +ZFS over NVMe/TCP Backend +------------------------- +ifdef::wiki[] +:pve-toplevel: +:title: Storage: ZFS over NVMe/TCP +endif::wiki[] + +WARNING: ZFS over NVMe/TCP is currently a **technology preview** in {pve}. + +Storage pool type: `zfsnvme` + +This backend accesses a remote Linux machine with a ZFS pool and the kernel NVMe +target via `ssh`. For each guest disk it creates a ZVOL and exports it as an +NVMe namespace over TCP. The {pve} nodes connect with the native NVMe multipath +of the Linux kernel. + +Unlike xref:storage_nvmeof[NVMe over Fabrics], which uses namespaces that a +storage array already serves, this backend creates and manages the ZVOLs itself +and exports them with the kernel `nvmet` target, with DH-HMAC-CHAP +authentication, snapshots and clones. + +Prerequisites +~~~~~~~~~~~~~ + +. Upgrade all nodes to a {pve} version that includes this storage type, also + nodes that will not use it. A node without support removes such storages + when it writes the cluster-wide storage configuration, so adding the first + ZFS over NVMe/TCP storage is refused while a node is offline or runs an + older version. +. The target needs OpenZFS, configfs, and the `nvmet` and `nvmet-tcp` kernel + modules with NVMe in-band authentication support. The plugin loads + `nvmet_tcp` and mounts configfs on the target when needed. Root needs a POSIX + compatible login shell. The target needs `zfs`, `modprobe`, `mount`, `find`, + `grep`, `dd`, `tee`, `sha256sum`, `cat`, `chmod`, `env`, `ln`, `mkdir`, + `printf`, `rm`, `rmdir` and `test`, but not Perl or Bash. +. Configure root `ssh` access like for xref:storage_zfs[ZFS over iSCSI], with + the key at `/etc/pve/priv/zfs/_id_rsa`. +. Disable cloud-init on the target. It can otherwise take a guest disk with a + `cidata` file system for its own datasource at boot. +. Install `nvme-cli` on every node. It creates the host NQN in + `/etc/nvme/hostnqn` and the host ID in `/etc/nvme/hostid`, which must be unique + for each node. The nodes also need native NVMe multipath, which is the kernel + default (`nvme_core.multipath=Y`). The plugin loads the `nvme-tcp` kernel + module when it activates a storage. + +Configuration +~~~~~~~~~~~~~ + +The backend supports the common storage properties `content`, `nodes`, +`disable`, and the following ZFS over NVMe/TCP specific properties. The +properties `server`, `pool`, `blocksize`, `subsysnqn` and `nvme-portals` cannot +be changed after the storage is added. A change to `nvme-keep-alive-tmo` or +`nvme-nr-io-queues` only applies to new connections. + +server:: Required. IP address or DNS name for the `ssh` connection to the + target. Guest I/O only uses the NVMe/TCP paths, but volume operations need + this connection. Use the same value in all storages on one target. + +pool:: Required. ZFS pool or child dataset on the target that holds the volumes. + It must not contain, or be contained in, the pool of another storage on the + same target. + +blocksize:: Required. ZFS volume block size, for example `16k`. + +sparse:: Use ZFS thin provisioning. Otherwise volumes reserve their full size. + +subsysnqn:: Required. NVMe qualified name of the subsystem. It must be unique in + the cluster. + +nvme-portals:: Required. Comma-separated IP addresses of the NVMe/TCP listeners + on the target, at most 16. The default port is `4420`. Put IPv6 addresses in + brackets, for example `[2001:db8::10]:4420`. ++ +Every storage needs its own listeners, which must not publish any other `nvmet` +subsystem. If a listener does not publish the subsystem yet, for example while +the target restores its configuration, `nvmet` rejects the connection in a way +that makes the node delete the controller. Adding, updating or activating a +storage fails if a portal has the address and port of another ZFS over NVMe/TCP +storage, or an address that another storage reaches with a different `server`. + +nvme-host-ifaces:: Required. Comma-separated local interfaces, one for each + portal in the same order. Every node needs interfaces with these names. This + keeps a failed path from reconnecting over the management network. + +nvme-host-nqns:: Required. Comma-separated contents of `/etc/nvme/hostnqn` of + all nodes that may use the storage, at most 64. Activation fails on a node + whose host NQN is not listed, so add the NQN of a new node first. Host NQNs can + only be added. + +dhchap-key:: Required when the storage is added. NVMe DH-HMAC-CHAP secret in + `DHHC-1` format, for example from `nvme gen-dhchap-key`. It cannot be changed. + As a sensitive property it is stored below `/etc/pve/priv/storage/` and not in + `storage.cfg`. With `pvesm`, pass the path of a file that contains the key. + The target keeps one key for each host NQN, so storages on one target with + overlapping `nvme-host-nqns` need the same key. + +nvme-iopolicy:: Native multipath I/O policy: `round-robin` (default), + `queue-depth` or `numa`. + +nvme-keep-alive-tmo:: Keep-alive timeout in seconds. The default is 5. + +nvme-reconnect-delay:: Seconds between the attempts to reconnect a lost + controller. The default is 2. + +nvme-ctrl-loss-tmo:: Seconds that the kernel keeps reconnecting a lost + controller before it deletes it. The default is 600. With `-1` it retries + forever. + +nvme-fast-io-fail-tmo:: Optional. Seconds after which I/O to a reconnecting + controller fails. Without it, the kernel queues I/O until the controller is + lost. It must not exceed a finite `nvme-ctrl-loss-tmo`. + +nvme-nr-io-queues:: Optional number of I/O queues for each controller. + +.Configuration Example (`/etc/pve/storage.cfg`) +---- +zfsnvme: nvme-shared + server 203.0.113.10 + pool tank/pve-nvme + subsysnqn nqn.2026-01.com.example:pve-nvme + nvme-portals 192.0.2.10,198.51.100.10 + nvme-host-ifaces ens1f0,ens1f1 + nvme-host-nqns nqn.2014-08.org.nvmexpress:uuid:11111111-1111-1111-1111-111111111111,nqn.2014-08.org.nvmexpress:uuid:22222222-2222-2222-2222-222222222222 + blocksize 16k + sparse 1 + content images +---- + +The key is not part of `storage.cfg`. In the web interface, add the storage as +*ZFS over NVMe/TCP* and enter the key there. With `pvesm`, save the key in a +file with mode `0600` and pass its path as `--dhchap-key`, then remove the file. + +.Storage features for backend `zfsnvme` +[width="100%",cols="m,m,3*d",options="header"] +|============================================================================== +|Content types |Image formats |Shared |Snapshots |Clones +|images |raw |yes |yes |yes +|============================================================================== + +Security and Availability +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The target allows only the host NQNs of `nvme-host-nqns`. All nodes share the +DH-HMAC-CHAP key of the storage, so any holder of it can connect as any allowed +host. The key only authenticates the hosts to the target. The target is not +authenticated, and the data is not encrypted, so use isolated storage networks. +The kernel exposes the key in sysfs on the nodes and in configfs on the target, +so limit shell access on all of them to trusted administrators. + +The key cannot be rotated. To change it, or to revoke a node, remove the node +from the cluster first. Every cluster member can read the keys below +`/etc/pve/priv/`, which include the `ssh` keys of the targets, so replace those +too. Then move all volumes off the storage, remove it, and remove its subsystem +on the target as described under xref:storage_zfsnvme_limits[Limits]. This +step is required. Until the subsystem is gone, the target still allows the +revoked host NQN with the old key, and it refuses a new key for a host NQN that +the subsystem still allows. Add a new storage with a new key and `subsysnqn`, +without the revoked host NQN. Storages on one target with overlapping host NQNs +share the key, so replace them together. + +Shared access relies on the cluster locking and fencing of {pve}, so test +quorum and fencing before you place production guests on the storage. Make sure +that the ZFS target is not a single point of failure. Changes to the target are +serialized by a cluster-wide lock and need quorum. Do not use a target with more +than one cluster. + +While all paths of a node are down, I/O is queued until a path returns, or +fails after `nvme-fast-io-fail-tmo` if set. When they stay down longer than +`nvme-ctrl-loss-tmo`, the kernel deletes the controllers and the multipath +devices of the storage on that node. Running guests keep the removed device +open, so stop and start them after the paths are back, for example with +`qm stop ` and `qm start `. A reboot inside the guest is not enough. +A target that rejects a connection, for example for a wrong key, makes the +kernel delete the controller regardless of the timeout. With `-1` the devices +are kept, but guest I/O can block for the whole outage unless +`nvme-fast-io-fail-tmo` is set. Choose these timeouts to fit the workload. + +[[storage_zfsnvme_limits]] +Limits +~~~~~~ + +* Only VM disks and VM states are supported, not container volumes. +* Online resize of a running guest disk is not supported. Stop the VM first. +* Volumes cannot be renamed. `pvesm export` and `pvesm import` are not + supported, so remote migration cannot move disks of this storage. Migration + between nodes of the cluster works, as the storage is shared and no disk is + copied. +* Removing a storage never deletes volumes. It only removes the key file of the + storage. The controllers stay connected on the nodes. Disconnect them on each + node under *NVMe over Fabrics* in its *SAN* panel, where they show no storage + once it is gone. +* Removing a storage, or a failed add, leaves its subsystem on the target, with + its host objects and their key. Remove that subsystem before you add a storage + with another key for the same host NQNs, or reuse its portals. Otherwise the + target refuses the new key, or a portal publishes two subsystems. It is also + what ends the access of a revoked node. To do it, remove the port links, + the allowed host links, the namespaces and the subsystem directory under + `/sys/kernel/config/nvmet`, or use `nvmetcli`. After a plain removal with no + new storage it is optional. The `nvmet` configuration is not persistent unless + you save it, so a reboot of the target also drops it. + +ifdef::wiki[] + +See Also +~~~~~~~~ + +* link:/wiki/Storage[Storage] + +endif::wiki[] diff --git a/pvesm.adoc b/pvesm.adoc index ec2ef97..e40c16f 100644 --- a/pvesm.adoc +++ b/pvesm.adoc @@ -83,6 +83,7 @@ nodes that can be accessed as RBD (RADOS Block Device). |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 +|ZFS over NVMe/TCP|zfsnvme |block |yes |yes |TP^5^ |======================================================================== ^1^: Disk images for VMs are stored in ZFS volume (zvol) datasets, which provide @@ -539,6 +540,8 @@ See Also * link:/wiki/Storage:_ZFS_over_ISCSI[Storage: ZFS over ISCSI] +* link:/wiki/Storage:_ZFS_over_NVMe/TCP[Storage: ZFS over NVMe/TCP] + endif::wiki[] ifndef::wiki[] @@ -575,6 +578,8 @@ include::pve-storage-btrfs.adoc[] include::pve-storage-zfs.adoc[] +include::pve-storage-zfsnvme.adoc[] + ifdef::manvolnum[] include::pve-copyright.adoc[] base-commit: 0d8269d6c45caeffed7a6d71b695ad25217c4a4c -- 2.54.0.windows.1