* [PATCH v5 docs 16/26] storage: document NVMe over Fabrics storages
2026-11-23 13:31 9% applied: [PATCH v5 storage,docs,manager 00/26] NVMe over Fabrics storage Thomas Lamprecht
@ 2026-11-23 13:32 24% ` Thomas Lamprecht
0 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-23 13:32 UTC (permalink / raw)
To: pve-devel
Add a chapter for the nvmeof storage type: prerequisites, setting up
shared LVM on a namespace with the guided setup or by hand, the
properties, checking and disconnecting paths, and the limits of the
storage type. The introduction lists it among the network storages, and
the LVM chapter names it next to iSCSI as base storage.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
notifications.adoc | 5 +-
pve-gui.adoc | 12 ++-
pve-intro.adoc | 3 +-
pve-storage-lvm.adoc | 10 +-
pve-storage-multipath.adoc | 3 +-
pve-storage-nvmeof.adoc | 207 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 24 +++--
7 files changed, 243 insertions(+), 21 deletions(-)
create mode 100644 pve-storage-nvmeof.adoc
diff --git a/notifications.adoc b/notifications.adoc
index 96ca47b..b5606a3 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -495,8 +495,9 @@ Notification Events
| `job-id` | Job ID
|=======================================================================
-A `multipath` notification groups affected LUNs on the same node. If any LUN
-in a problem notification is *Failed*, the severity is `error`.
+A `multipath` notification groups the affected LUNs and NVMe namespaces of a
+node. If any of them in a problem notification is *Failed*, the severity is
+`error`.
NOTE: Backup job notifications only have `job-id` set if the backup job
was executed automatically based on its schedule, but not if it was triggered
diff --git a/pve-gui.adoc b/pve-gui.adoc
index 9a1f70b..a514eca 100644
--- a/pve-gui.adoc
+++ b/pve-gui.adoc
@@ -233,10 +233,11 @@ On the datacenter level, you can access cluster-wide settings and information.
* *Options:* view and manage cluster-wide default settings.
* *Storage:* provides an interface for managing cluster storage. The *Add* menu
- offers guided setups for shared LVM on iSCSI and Fibre Channel LUNs.
+ offers guided setups for shared LVM on iSCSI and Fibre Channel LUNs and on
+ NVMe over Fabrics namespaces.
-* *SAN:* shows the state of the SAN LUNs on all nodes and manages the multipath
- configuration.
+* *SAN:* shows the state of the SAN LUNs and NVMe namespaces on all nodes and
+ manages the multipath configuration.
* *Backup:* schedule backup jobs. This operates cluster wide, so it doesn't
matter where the VMs/containers are on your cluster when scheduling.
@@ -288,8 +289,9 @@ The top header has useful buttons such as 'Reboot', 'Shutdown', 'Shell',
* *Disks:* get an overview of the attached disks, and manage how they are used.
-* *SAN:* get an overview of the SAN LUNs of the node, with their paths and
- usage. Below it, *iSCSI* shows the iSCSI targets and sessions.
+* *SAN:* get an overview of the SAN LUNs and NVMe namespaces of the node, with
+ their paths and usage. Below it, *iSCSI* shows the iSCSI targets and sessions,
+ and *NVMe over Fabrics* the connected controllers.
* *Ceph:* is only used if you have installed a Ceph server on your
host. In this case, you can manage your Ceph cluster and see the status
diff --git a/pve-intro.adoc b/pve-intro.adoc
index c2a0b6a..baec59f 100644
--- a/pve-intro.adoc
+++ b/pve-intro.adoc
@@ -103,9 +103,10 @@ the cluster have direct access to VM disk images.
The following network storage types are supported:
-* LVM group (network backing with iSCSI targets)
+* LVM group (network backing with iSCSI targets or NVMe over Fabrics)
* iSCSI target
* iSCSI LUNs (direct use)
+* NVMe over Fabrics subsystem
* NFS share
* CIFS share
* Ceph RBD
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index 92019fc..8b9564c 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -34,7 +34,8 @@ LVM volume group name. This must point to an existing volume group.
Base volume. This volume is automatically activated before accessing
the storage. This is mostly useful when the LVM volume group resides
-on a remote iSCSI server.
+on a remote iSCSI server or on an xref:storage_nvmeof[NVMe over Fabrics]
+namespace.
`saferemove`::
@@ -143,9 +144,10 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
-TIP: *Shared LVM on iSCSI* or *Shared LVM on Fibre Channel* in *Datacenter ->
-Storage -> Add* in the web UI creates a shared LVM storage on a SAN LUN, see
-xref:storage_multipath_setup[Multipath].
+TIP: *Shared LVM on iSCSI*, *Shared LVM on Fibre Channel* or *Shared LVM on NVMe
+over Fabrics* in *Datacenter -> Storage -> Add* in the web UI creates a shared
+LVM storage on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace].
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
index 3e07eba..45ab3a8 100644
--- a/pve-storage-multipath.adoc
+++ b/pve-storage-multipath.adoc
@@ -15,7 +15,8 @@ Fibre Channel.
{pve} sets up the maps on all nodes and shows their state under *Datacenter ->
SAN*. An iSCSI storage with *Multipath* enabled requests the maps of its LUNs, a
Fibre Channel LUN needs a multipath entry. NVMe namespaces use the multipath
-support of the kernel instead and are not covered here.
+support of the kernel instead, see xref:storage_nvmeof[NVMe over Fabrics], and
+are not covered here.
Prerequisites
~~~~~~~~~~~~~
diff --git a/pve-storage-nvmeof.adoc b/pve-storage-nvmeof.adoc
new file mode 100644
index 0000000..3a37045
--- /dev/null
+++ b/pve-storage-nvmeof.adoc
@@ -0,0 +1,207 @@
+[[storage_nvmeof]]
+NVMe over Fabrics Backend
+-------------------------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: NVMe over Fabrics
+endif::wiki[]
+
+Storage pool type: `nvmeof`
+
+NVMe over Fabrics (NVMe-oF) gives a node access to the namespaces of an NVMe
+subsystem on a storage array over TCP. Namespaces are the NVMe counterpart of
+LUNs. Use one as the base volume of a shared LVM storage, or use the namespaces
+directly as disk images.
+
+Each node connects one controller per portal of the storage. The kernel
+combines these paths into one device per namespace with its native NVMe
+multipath and reconnects lost paths on its own. `multipath-tools` is not
+involved.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes to `pve-manager` 9.2.38 or newer before adding the first
+ NVMe over Fabrics storage, also nodes that will not use it. A node without
+ support for this storage type removes such storages from the cluster-wide
+ storage configuration when it writes that configuration, for example when a
+ storage is added or edited on that node. Adding the first such storage is
+ refused while a node is offline or runs an older version.
+. Install `nvme-cli` on every participating node. The `libpve-storage-perl`
+ package recommends it, but installations without recommended packages need it
+ added separately. Its installation creates the node's host NQN in
+ `/etc/nvme/hostnqn` and host ID in `/etc/nvme/hostid`. Nodes cloned from one
+ image share them. Give each a new identity before it connects, with
+ `nvme gen-hostnqn > /etc/nvme/hostnqn` and `uuidgen > /etc/nvme/hostid`.
+. Allow each node's host NQN on the array. The names are shown under
+ *Datacenter -> SAN* and in the guided setup.
+. Present the same namespace to all intended nodes. Portals are IP addresses
+ that every node of the storage can reach; host names are not accepted.
+. Use a storage network that only trusted hosts can reach. The connections use
+ neither authentication nor TLS.
+. Keep native NVMe multipath enabled, which is the kernel default
+ (`nvme_core.multipath=Y`). It joins the paths of a namespace only if the
+ target declares that the subsystem may have several controllers, which most
+ targets do, also with a single portal. A namespace that it does not join is
+ refused as volume.
+
+[[storage_nvmeof_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~~
+
+. On a node that can reach the array, select *Shared LVM on NVMe over Fabrics*
+ under *Datacenter -> Storage -> Add*. The *Add Shared LVM* menu of
+ *Datacenter -> SAN* has the same setup.
+. Enter the *ID* of the new LVM storage, a discovery portal and the subsystem,
+ and check the portals. If no NVMe over Fabrics storage connects the nodes to
+ that subsystem yet, the setup adds one named after the ID with a `-base`
+ suffix, or as set under *Advanced*. This storage connects to the subsystem
+ with `content none`, while the LVM storage manages guest disks. Clear the
+ nodes in the list of host NQNs that should not use the storages. Continuing
+ creates or reuses the NVMe over Fabrics storage before you select a namespace.
+. Select the namespace after checking that no host uses it and that no data on
+ it must be kept. The volume group is named after the ID unless set under
+ *Advanced*.
+. Check the state of the namespace on each node of the storage, which the
+ setup shows once the storage is added, as described for LUNs in
+ xref:storage_multipath_setup[Multipath]. For a node that stays *Missing*,
+ check its access to the namespace on the array before placing guests on the
+ storage.
+
+The discovery fills in *Portals*. A discovery portal without a port is asked at
+port 8009, or at 4420 if that fails. Some targets, such as the Linux kernel
+target, report only the portal that was asked: add the others to the list.
+With a single portal, the state of the namespace shows `1/1`, which has no path
+redundancy.
+Portals can also be changed later in the edit dialog of the NVMe over Fabrics
+storage; each node then connects new ones on its own. The guided setup needs
+the discovery service of the target, also to reuse an existing connection;
+without one, add the storages as described next.
+
+*Datacenter -> Storage -> Add -> NVMe over Fabrics* adds only the NVMe over
+Fabrics storage. Without a discovery portal, enter the subsystem NQN and its
+portals as they are. Enable *Use namespaces directly* there to use whole
+namespaces as guest disks, or add an *LVM* storage on a namespace later, with
+the NVMe over Fabrics storage as *Base storage*. Both at once are refused, as
+with direct use every namespace of the subsystem counts as in use by the
+storage. Before disabling direct use, check that no guest on any node has a
+namespace of the subsystem configured as disk: disabling it does not detach such
+disks.
+
+To set it up by hand, run these commands on a node that can reach the array:
+
+----
+# pvesm scan nvmeof <portal>
+# pvesm add nvmeof <nvmeof-storage> --subsysnqn <nqn> --portals <portals> \
+ --content none
+# pvesm list <nvmeof-storage>
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, `<nvmeof-storage>:nvme-<wwid>`.
+Adding the LVM storage creates the volume group if it does not exist yet.
+Creating it is refused if the namespace holds data that {pve} recognizes, such
+as partitions, a file system or a volume group, or if another storage references
+it. To keep an existing volume group, add the LVM storage with its name. To
+discard the data of a namespace instead, stop its users on all hosts and wipe it
+as described for LUNs in xref:storage_multipath_setup[Multipath].
+
+Configuration
+~~~~~~~~~~~~~
+
+The backend supports the common storage properties `content`, `nodes`,
+`disable`, and the following NVMe over Fabrics specific properties:
+
+subsysnqn::
+
+The NQN of the NVMe subsystem. It cannot be changed later, and only one storage
+can use a subsystem.
+
+portals::
+
+Comma-separated list of the subsystem's TCP portals, one per path. Each is an
+IPv4 address or an IPv6 address in brackets, with an optional port (default
+4420).
+
+fast-io-fail-tmo::
+
+Seconds a path may be reconnecting before I/O sent to it fails. The default is
+120 seconds. If no usable path of a namespace remains, its I/O can fail once its
+paths have been reconnecting that long. With `-1`, I/O waits until a path
+returns. A change applies to newly connected controllers only.
+
+.Configuration Example (`/etc/pve/storage.cfg`)
+----
+nvmeof: fabric
+ subsysnqn nqn.2010-06.com.example:array1
+ portals 192.0.2.10,192.0.2.11
+ content none
+----
+
+.Storage features for backend `nvmeof`
+[width="100%",cols="m,m,3*d",options="header"]
+|==============================================================================
+|Content types |Image formats |Shared |Snapshots |Clones
+|images none |raw |yes |no |no
+|==============================================================================
+
+{pve} does not create or delete namespaces; manage them on the array. A volume
+is named `nvme-<wwid>` after its namespace, like its link in `/dev/disk/by-id/`.
+
+Checking and Disconnecting Paths
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> SAN* lists the namespaces of NVMe over Fabrics storages among the
+LUNs, with their state on each node of the storage and *Multipath* shown as
+*Native*, as does *Node -> SAN* for the namespaces of a node. Expand a namespace
+under *Node -> SAN* to inspect its paths. Its *State* counts the usable paths
+out of the portals of the storage, or out of the connected paths if more are
+connected, for example `1/2` while one of two paths is unusable, and shows
+*Failed* without a usable path. *Node -> SAN -> NVMe over Fabrics* lists the
+node's controllers, one per connected portal, with their *State*: *Connected*,
+or *Reconnecting* while the kernel retries a lost path. A node sends a
+xref:notification_events[multipath notification] when the paths of a namespace
+stay degraded or failed in two consecutive checks, and when they recover, under
+the same rules as for a LUN. This does not need `multipathd`.
+
+Each node of an enabled storage connects to the portals that it is not yet
+connected to. A portal that failed is retried after a minute. Removing a portal,
+or disabling or removing the storage, does not disconnect anything. To remove
+such a path, select its controller under *Node -> SAN -> NVMe over Fabrics* on
+each node and press *Disconnect*, or run
+`pvesh delete /nodes/<node>/san/nvmeof/controller/<controller>`. This is refused
+if a namespace that is mounted, in use by another device or as swap, open in a
+process such as a running guest, or referenced by a storage would lose its last
+usable path. If the controller is no usable path itself, such as one that keeps
+reconnecting to a deleted subsystem, the local uses are still checked, but not
+the storage references, as that check reads the namespace. While a namespace has
+no usable path, its I/O waits until a path is usable again, or until
+`fast-io-fail-tmo` has passed for reconnecting controllers. An LVM command of
+the status checks can keep the namespace open meanwhile, and Disconnect refuses
+while it does. The process check does not find a process that opened the
+namespace through another device node, for example one in a container. A
+controller with namespaces that do not use native NVMe multipath is refused as
+well. A storage that still lists the portal connects to it again. Namespaces of
+a subsystem that no storage uses then show fewer paths, but none as missing, as
+nothing tells how many paths they should have.
+
+Limits
+~~~~~~
+
+* Only the TCP transport is supported, without authentication or TLS.
+* The disk lists under *Node -> Disks* and for Ceph OSDs leave out namespaces
+ attached over TCP or RDMA, like iSCSI LUNs, as other nodes use them too.
+ *Node -> SAN* lists them.
+* NVMe/FC namespaces need no storage of this type, and the guided setups and
+ the cluster-wide status do not cover them. *Node -> SAN* lists them. Create
+ their volume group on the whole namespace under *Node -> Disks -> LVM*; with
+ *Add Storage* enabled, this adds a shared LVM storage.
+
+ifdef::wiki[]
+
+See Also
+~~~~~~~~
+
+* link:/wiki/Storage[Storage]
+
+endif::wiki[]
diff --git a/pvesm.adoc b/pvesm.adoc
index 8f1b24e..0bea1d2 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -79,6 +79,7 @@ nodes that can be accessed as RBD (RADOS Block Device).
|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
@@ -96,11 +97,13 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
-a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
-reachable over several paths; xref:storage_multipath[Multipath] describes how
-{pve} manages them in a cluster. FC and SAS LUNs need a
-xref:storage_multipath_entries[multipath entry].
+^3^: With iSCSI, NVMe over Fabrics (NVMe-oF), Fibre Channel (FC), or SAS block
+storage as shared storage in a cluster, LVM is used to split the LUN or
+namespace into virtual disks. A LUN is usually reachable over several paths;
+xref:storage_multipath[Multipath] describes how {pve} manages them in a cluster.
+FC and SAS LUNs need a xref:storage_multipath_entries[multipath entry].
+NVMe-oF namespaces use the kernel's native multipath instead, see
+xref:storage_nvmeof[NVMe over Fabrics].
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -154,9 +157,10 @@ is available on all nodes, but it is physically different and can have
totally different content.
Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
-on a xref:storage_multipath_setup[SAN LUN], use *Shared LVM on iSCSI* or
-*Shared LVM on Fibre Channel* there instead. It creates the storages that are
-needed and enables multipath for the LUN.
+on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace], use *Shared LVM on iSCSI*, *Shared
+LVM on Fibre Channel* or *Shared LVM on NVMe over Fabrics* there instead. It
+creates the storages that are needed and enables multipath for a LUN.
Storage Pools
@@ -507,6 +511,8 @@ See Also
* link:/wiki/Storage:_Multipath[Storage: Multipath]
+* link:/wiki/Storage:_NVMe_over_Fabrics[Storage: NVMe over Fabrics]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -551,6 +557,8 @@ include::pve-storage-iscsidirect.adoc[]
include::pve-storage-multipath.adoc[]
+include::pve-storage-nvmeof.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 24%]
* applied: [PATCH v5 storage,docs,manager 00/26] NVMe over Fabrics storage
@ 2026-11-23 13:31 9% Thomas Lamprecht
2026-11-23 13:32 24% ` [PATCH v5 docs 16/26] storage: document NVMe over Fabrics storages Thomas Lamprecht
0 siblings, 1 reply; 37+ results
From: Thomas Lamprecht @ 2026-11-23 13:31 UTC (permalink / raw)
To: pve-devel
This has been already applied in the current form, sorry for the noise,
but I figured this is the cleaner way than replying to v4 with an
exhaustive list of changes.
A storage type for NVMe subsystems reached over TCP, on top of the
applied SAN series [0]: namespaces as base volumes of shared LVM, or
directly as raw VM disks, using the kernel's native NVMe multipath.
This is a deliberately small first version: TCP only, without
authentication or TLS, so access relies on the target's host NQN list
and a dedicated storage network. The plugin connects missing portals and
never disconnects controllers on config change or removal; disconnecting
a controller is an explicit per-node action. The kernel handles path
reconnection, and the SAN series provides LUN inventory, guided setup,
and pre-write guards.
Two operational prerequisites:
- Cloned nodes need distinct /etc/nvme/hostnqn and /etc/nvme/hostid
before connecting.
- All cluster nodes must be upgraded to pve-manager 9.2.38 before
adding the first nvmeof storage, as older nodes drop unknown storage
types when writing storage.cfg; creating the first one is refused
until all nodes are online on 9.2.38+.
What it adds:
- Storage type 'nvmeof' (subsysnqn + TCP portals, one storage per
subsystem, isolated properties, volumes as nvme-<wwid>,
ctrl_loss_tmo=-1, configurable fast-io-fail-tmo defaulting to 120s).
- Shared LVM support with nvmeof volumes as base, discovery via
/nodes/{node}/scan/nvmeof and 'pvesm scan nvmeof', and nvme-cli as a
Recommends of libpve-storage-perl.
- /nodes/{node}/san/nvmeof for host identity, controller listing, and
guarded per-controller disconnect (refused if a namespace in use or
referenced by a storage would lose its last usable path).
- Cluster-wide SAN status and pvestatd path notifications covering
nvmeof namespaces (without requiring multipathd), plus pvereport
output and documentation.
- Web UI: guided "Shared LVM on NVMe over Fabrics" setup, nvmeof
storage dialog with discovery, Node > SAN > NVMe over Fabrics
controller view, host NQN column, and native multipath state display.
Changes since v4 [1], mostly from its automated review:
- New first patch: do not activate a new storage with the storage
configuration locked (see below).
- Volumes & guards: only accept namespaces that native multipath joins
(a namespace device of a single controller is refused); refuse SAN
reference checks when the subsystem NQN cannot be read; refuse an
LVM base storage that serves its namespaces as disk images, also
when reusing an existing VG, and an unidentifiable namespace instead
of treating it as a local disk; the LVM dialog hides such bases.
- Activation: take liveness from the controller state after a connect,
and report that no controller is live, instead of "not online", when
every portal already has a non-live controller.
- Disconnect: recheck paths (including a last path that recovered),
namespace heads by WWID, controller-owned devices and the controller
identity right before removal; walks over a subsystem refuse an
unreadable sysfs directory instead of treating it as empty.
- Wipe: separate messages for a partition of a network namespace, an
unknown transport, and a transport that changed meanwhile.
- Web UI: the controller list explains its namespace count, and the
portal trim moved before the NVMe-oF setup, as a fix of the existing
iSCSI one.
- Docs: direct use and LVM on the same subsystem exclude each other,
discovery ports (8009, then 4420), the multipath prerequisite on the
target side, and that the guided setup needs discovery.
- Smaller: shared node and transport helpers, clearer errors and
commit messages.
The first patch is a generic fix: adding a storage activated it while
holding the cluster-wide storage.cfg lock, so an unreachable iSCSI or
NVMe over Fabrics portal blocked every other storage configuration
change meanwhile. The activation now runs once the configuration is
written, retried once as pvestatd may activate the new storage at the
same time, and a storage that still fails is removed again. An LVM
storage on such a base gets its base activated before the lock.
Tested as v4, and for these changes on the nested cluster against Linux
nvmet and the NetApp AFF A20: activation and paths of all namespaces
through the new head check, Disconnect of a redundant controller and
refusal of the last path on both targets, and the guided setup end to
end with the release packages on all six nodes; the rest by unit tests.
The ZFS-over-NVMe/TCP plugin on the list [2] ships its own initiator;
isolated properties prevent option clashes, and connect helpers can be
shared later. Leaving NVMe/FC partition wipes and Ceph OSDs on NVMe/FC
aligned with Fibre Channel LUNs is left for a SAN-wide follow-up.
[0]: https://lore.proxmox.com/pve-devel/20261119194655.3163258-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20261123020041.3728085-1-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20261005002609.571-1-joaquinvarela@neatech.ar/
pve-storage:
Thomas Lamprecht (15):
api: config: activate a new storage without holding the lock
diskmanage: skip SMART queries for NVMe fabric namespaces
diskmanage: list NVMe namespaces attached over TCP or RDMA for SAN only
api: disks: refuse a local wipe of a network NVMe namespace
nvmeof: add a storage for NVMe over Fabrics subsystems
d/control: bump pve-common for plain parameter error names
api: config: check the cluster version before the first nvmeof storage
lvm: allow a volume group on an NVMe over Fabrics namespace
api: scan: add NVMe over Fabrics discovery
pvesm: add a scan command for NVMe over Fabrics
api: san luns: attribute NVMe namespaces to storage
api: add node-level NVMe over Fabrics status and controller removal
multipath: report the NVMe host NQN of each node
multipath: report NVMe over Fabrics namespaces in the cluster status
d/control: break pve-manager versions without namespace notifications
ApiChangeLog | 20 +-
debian/control | 5 +-
src/PVE/API2/Disks.pm | 23 +
src/PVE/API2/Makefile | 1 +
src/PVE/API2/NVMeOF.pm | 200 +++++
src/PVE/API2/SAN/Cluster.pm | 38 +-
src/PVE/API2/SAN/Node.pm | 17 +-
src/PVE/API2/Storage/Config.pm | 74 +-
src/PVE/API2/Storage/Scan.pm | 49 ++
src/PVE/CLI/pvesm.pm | 13 +
src/PVE/Diskmanage.pm | 58 +-
src/PVE/Makefile | 1 +
src/PVE/Multipath/Status.pm | 69 +-
src/PVE/NVMeOF.pm | 566 ++++++++++++++
src/PVE/Storage.pm | 2 +
src/PVE/Storage/LVMPlugin.pm | 24 +-
src/PVE/Storage/Makefile | 1 +
src/PVE/Storage/NVMeOFPlugin.pm | 307 ++++++++
src/PVE/Storage/Plugin.pm | 2 +-
src/PVE/Storage/SAN.pm | 34 +-
src/test/Makefile | 10 +
src/test/disk_api_test.pm | 26 +-
.../multipath/disklist_expected.json | 16 -
.../nvme_smart/nvme0n1/device/transport | 1 +
src/test/disklist_test.pm | 104 ++-
src/test/run_multipath_api_tests.pl | 132 +++-
src/test/run_nvmeof_api_tests.pl | 287 +++++++
src/test/run_nvmeof_taint_tests.pl | 67 ++
src/test/run_nvmeof_tests.pl | 714 ++++++++++++++++++
src/test/run_san_api_tests.pl | 4 +-
src/test/run_san_lun_scan_tests.pl | 41 +
src/test/run_san_nvme_tests.pl | 65 ++
src/test/run_storage_create_tests.pl | 120 +++
33 files changed, 2991 insertions(+), 100 deletions(-)
pve-docs:
Thomas Lamprecht (1):
storage: document NVMe over Fabrics storages
notifications.adoc | 5 +-
pve-gui.adoc | 12 ++-
pve-intro.adoc | 3 +-
pve-storage-lvm.adoc | 10 +-
pve-storage-multipath.adoc | 3 +-
pve-storage-nvmeof.adoc | 207 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 24 +++--
7 files changed, 243 insertions(+), 21 deletions(-)
pve-manager:
Thomas Lamprecht (10):
report: add the NVMe over Fabrics host NQN and subsystems
ui: storage: add NVMe over Fabrics storage
ui: lvm: offer NVMe over Fabrics storages as base storage
ui: storage: SAN setup: ignore spaces around a typed portal
ui: storage: add a guided setup for shared LVM on NVMe over Fabrics
ui: node san: list NVMe over Fabrics controllers
ui: san: show the NVMe host NQN of each node
ui: san: show that a namespace uses native multipath
pvestatd: notify on NVMe over Fabrics namespaces as on multipath maps
d/control: bump versioned dependencies for NVMe over Fabrics
PVE/MultipathNotification.pm | 21 +-
PVE/Report.pm | 6 +
PVE/Service/pvestatd.pm | 16 +-
debian/control | 8 +-
test/MultipathNotification_test.pl | 28 ++-
www/manager6/Makefile | 4 +-
www/manager6/SANUtils.js | 7 +-
www/manager6/Utils.js | 7 +
www/manager6/dc/SAN.js | 49 +++-
www/manager6/dc/StorageView.js | 23 +-
www/manager6/node/Config.js | 9 +-
www/manager6/node/NVMeOFControllers.js | 175 +++++++++++++
www/manager6/storage/IScsiEdit.js | 5 +-
www/manager6/storage/LVMEdit.js | 20 +-
www/manager6/storage/NVMeOFEdit.js | 162 ++++++++++++
www/manager6/storage/wizard/LunSelect.js | 35 ++-
www/manager6/storage/wizard/NodeIdentities.js | 57 +++--
.../storage/wizard/{IScsi.js => Target.js} | 236 +++++++++++++-----
www/manager6/storage/wizard/Wizard.js | 62 +++--
www/manager6/window/SANLunState.js | 38 ++-
www/manager6/window/SANLunWipe.js | 24 +-
21 files changed, 805 insertions(+), 187 deletions(-)
^ permalink raw reply [relevance 9%]
* [PATCH v4 docs 15/25] storage: document NVMe over Fabrics storages
2026-11-23 1:47 9% [PATCH v4 storage,docs,manager 00/25] NVMe over Fabrics storage Thomas Lamprecht
@ 2026-11-23 1:47 24% ` Thomas Lamprecht
0 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-23 1:47 UTC (permalink / raw)
To: pve-devel
Add a chapter for the nvmeof storage type: prerequisites, setting up
shared LVM on a namespace with the guided setup or by hand, the
properties, checking and disconnecting paths, and the limits of the
storage type. The introduction lists it among the network storages, and
the LVM chapter names it next to iSCSI as base storage.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
notifications.adoc | 5 +-
pve-gui.adoc | 12 ++-
pve-intro.adoc | 3 +-
pve-storage-lvm.adoc | 10 +-
pve-storage-multipath.adoc | 3 +-
pve-storage-nvmeof.adoc | 200 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 24 +++--
7 files changed, 236 insertions(+), 21 deletions(-)
create mode 100644 pve-storage-nvmeof.adoc
diff --git a/notifications.adoc b/notifications.adoc
index 96ca47b..b5606a3 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -495,8 +495,9 @@ Notification Events
| `job-id` | Job ID
|=======================================================================
-A `multipath` notification groups affected LUNs on the same node. If any LUN
-in a problem notification is *Failed*, the severity is `error`.
+A `multipath` notification groups the affected LUNs and NVMe namespaces of a
+node. If any of them in a problem notification is *Failed*, the severity is
+`error`.
NOTE: Backup job notifications only have `job-id` set if the backup job
was executed automatically based on its schedule, but not if it was triggered
diff --git a/pve-gui.adoc b/pve-gui.adoc
index 9a1f70b..a514eca 100644
--- a/pve-gui.adoc
+++ b/pve-gui.adoc
@@ -233,10 +233,11 @@ On the datacenter level, you can access cluster-wide settings and information.
* *Options:* view and manage cluster-wide default settings.
* *Storage:* provides an interface for managing cluster storage. The *Add* menu
- offers guided setups for shared LVM on iSCSI and Fibre Channel LUNs.
+ offers guided setups for shared LVM on iSCSI and Fibre Channel LUNs and on
+ NVMe over Fabrics namespaces.
-* *SAN:* shows the state of the SAN LUNs on all nodes and manages the multipath
- configuration.
+* *SAN:* shows the state of the SAN LUNs and NVMe namespaces on all nodes and
+ manages the multipath configuration.
* *Backup:* schedule backup jobs. This operates cluster wide, so it doesn't
matter where the VMs/containers are on your cluster when scheduling.
@@ -288,8 +289,9 @@ The top header has useful buttons such as 'Reboot', 'Shutdown', 'Shell',
* *Disks:* get an overview of the attached disks, and manage how they are used.
-* *SAN:* get an overview of the SAN LUNs of the node, with their paths and
- usage. Below it, *iSCSI* shows the iSCSI targets and sessions.
+* *SAN:* get an overview of the SAN LUNs and NVMe namespaces of the node, with
+ their paths and usage. Below it, *iSCSI* shows the iSCSI targets and sessions,
+ and *NVMe over Fabrics* the connected controllers.
* *Ceph:* is only used if you have installed a Ceph server on your
host. In this case, you can manage your Ceph cluster and see the status
diff --git a/pve-intro.adoc b/pve-intro.adoc
index c2a0b6a..baec59f 100644
--- a/pve-intro.adoc
+++ b/pve-intro.adoc
@@ -103,9 +103,10 @@ the cluster have direct access to VM disk images.
The following network storage types are supported:
-* LVM group (network backing with iSCSI targets)
+* LVM group (network backing with iSCSI targets or NVMe over Fabrics)
* iSCSI target
* iSCSI LUNs (direct use)
+* NVMe over Fabrics subsystem
* NFS share
* CIFS share
* Ceph RBD
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index 92019fc..8b9564c 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -34,7 +34,8 @@ LVM volume group name. This must point to an existing volume group.
Base volume. This volume is automatically activated before accessing
the storage. This is mostly useful when the LVM volume group resides
-on a remote iSCSI server.
+on a remote iSCSI server or on an xref:storage_nvmeof[NVMe over Fabrics]
+namespace.
`saferemove`::
@@ -143,9 +144,10 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
-TIP: *Shared LVM on iSCSI* or *Shared LVM on Fibre Channel* in *Datacenter ->
-Storage -> Add* in the web UI creates a shared LVM storage on a SAN LUN, see
-xref:storage_multipath_setup[Multipath].
+TIP: *Shared LVM on iSCSI*, *Shared LVM on Fibre Channel* or *Shared LVM on NVMe
+over Fabrics* in *Datacenter -> Storage -> Add* in the web UI creates a shared
+LVM storage on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace].
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
index 3e07eba..45ab3a8 100644
--- a/pve-storage-multipath.adoc
+++ b/pve-storage-multipath.adoc
@@ -15,7 +15,8 @@ Fibre Channel.
{pve} sets up the maps on all nodes and shows their state under *Datacenter ->
SAN*. An iSCSI storage with *Multipath* enabled requests the maps of its LUNs, a
Fibre Channel LUN needs a multipath entry. NVMe namespaces use the multipath
-support of the kernel instead and are not covered here.
+support of the kernel instead, see xref:storage_nvmeof[NVMe over Fabrics], and
+are not covered here.
Prerequisites
~~~~~~~~~~~~~
diff --git a/pve-storage-nvmeof.adoc b/pve-storage-nvmeof.adoc
new file mode 100644
index 0000000..9b2a285
--- /dev/null
+++ b/pve-storage-nvmeof.adoc
@@ -0,0 +1,200 @@
+[[storage_nvmeof]]
+NVMe over Fabrics Backend
+-------------------------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: NVMe over Fabrics
+endif::wiki[]
+
+Storage pool type: `nvmeof`
+
+NVMe over Fabrics (NVMe-oF) gives a node access to the namespaces of an NVMe
+subsystem on a storage array over TCP. Namespaces are the NVMe counterpart of
+LUNs. Use one as the base volume of a shared LVM storage, or use the namespaces
+directly as disk images.
+
+Each node connects one controller per portal of the storage. The kernel
+combines these paths into one device per namespace with its native NVMe
+multipath and reconnects lost paths on its own. `multipath-tools` is not
+involved.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes to `pve-manager` 9.2.38 or newer before adding the first
+ NVMe over Fabrics storage, also nodes that will not use it. A node without
+ support for this storage type removes such storages from the cluster-wide
+ storage configuration when it writes that configuration, for example when a
+ storage is added or edited on that node. Adding the first such storage is
+ refused while a node is offline or runs an older version.
+. Install `nvme-cli` on every participating node. The `libpve-storage-perl`
+ package recommends it, but installations without recommended packages need it
+ added separately. Its installation creates the node's host NQN in
+ `/etc/nvme/hostnqn` and host ID in `/etc/nvme/hostid`. Nodes cloned from one
+ image share them. Give each a new identity before it connects, with
+ `nvme gen-hostnqn > /etc/nvme/hostnqn` and `uuidgen > /etc/nvme/hostid`.
+. Allow each node's host NQN on the array. The names are shown under
+ *Datacenter -> SAN* and in the guided setup.
+. Present the same namespace to all intended nodes. Portals are IP addresses
+ that every node can reach; host names are not accepted.
+. Use a storage network that only trusted hosts can reach. The connections use
+ neither authentication nor TLS.
+. Keep native NVMe multipath enabled, which is the kernel default
+ (`nvme_core.multipath=Y`).
+
+[[storage_nvmeof_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~~
+
+. On a node that can reach the array, select *Shared LVM on NVMe over Fabrics*
+ under *Datacenter -> Storage -> Add*. The *Add Shared LVM* menu of
+ *Datacenter -> SAN* has the same setup.
+. Enter the *ID* of the new storage, a discovery portal and the subsystem, and
+ check the portals. If no NVMe over Fabrics storage connects the nodes to that
+ subsystem yet, the setup adds one named after the ID with a `-base` suffix, or
+ as set under *Advanced*. This storage connects to the subsystem with `content
+ none`, while the LVM storage manages guest disks. Clear the nodes in the list
+ of host NQNs that should not use the storages. Continuing creates or reuses
+ the NVMe over Fabrics storage before you select a namespace.
+. Select the namespace after checking that no host uses it and that no data on
+ it must be kept. The volume group is named after the ID unless set under
+ *Advanced*.
+. Check the state of the namespace on each node of the storage, which the
+ setup shows once the storage is added, as described for LUNs in
+ xref:storage_multipath_setup[Multipath]. For a node that stays *Missing*,
+ check its access to the namespace on the array before placing guests on the
+ storage.
+
+The discovery fills in *Portals*. Some targets, such as the Linux kernel
+target, report only the portal that was asked: add the others to the list.
+With a single portal, the state of the namespace shows `1/1`, which has no path
+redundancy.
+Portals can also be changed later in the edit dialog of the NVMe over Fabrics
+storage; each node then connects new ones on its own.
+
+*Datacenter -> Storage -> Add -> NVMe over Fabrics* adds only the NVMe over
+Fabrics storage. Without a discovery portal, enter the subsystem NQN and its
+portals as they are. Enable *Use namespaces directly* there to use whole
+namespaces as guest disks, or add an *LVM* storage on a namespace later, with
+the NVMe over Fabrics storage as *Base storage*. With direct use, every
+namespace of the subsystem counts as in use by the storage, so no volume group
+can be created on one; keep it disabled on a storage that is the base of LVM
+storages. Disabling it later does not detach guest disks that use a namespace
+directly.
+
+To set it up by hand, run these commands on a node that can reach the array:
+
+----
+# pvesm scan nvmeof <portal>
+# pvesm add nvmeof <nvmeof-storage> --subsysnqn <nqn> --portals <portals> \
+ --content none
+# pvesm list <nvmeof-storage>
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, `<nvmeof-storage>:nvme-<wwid>`.
+Adding the LVM storage creates the volume group if it does not exist yet.
+Creating it is refused if the namespace holds data that {pve} recognizes, such
+as partitions, a file system or a volume group, or if another storage references
+it. To keep an existing volume group, add the LVM storage with its name. To
+discard the data of a namespace instead, stop its users on all hosts and wipe it
+as described for LUNs in xref:storage_multipath_setup[Multipath].
+
+Configuration
+~~~~~~~~~~~~~
+
+The backend supports the common storage properties `content`, `nodes`,
+`disable`, and the following NVMe over Fabrics specific properties:
+
+subsysnqn::
+
+The NQN of the NVMe subsystem. It cannot be changed later, and only one storage
+can use a subsystem.
+
+portals::
+
+Comma-separated list of the subsystem's TCP portals, one per path. Each is an
+IPv4 address or an IPv6 address in brackets, with an optional port (default
+4420).
+
+fast-io-fail-tmo::
+
+Seconds a path may be reconnecting before I/O sent to it fails. The default is
+120 seconds. If no usable path of a namespace remains, its I/O can fail once its
+paths have been reconnecting that long. With `-1`, I/O waits until a path
+returns. A change applies to newly connected controllers only.
+
+.Configuration Example (`/etc/pve/storage.cfg`)
+----
+nvmeof: fabric
+ subsysnqn nqn.2010-06.com.example:array1
+ portals 192.0.2.10,192.0.2.11
+ content none
+----
+
+.Storage features for backend `nvmeof`
+[width="100%",cols="m,m,3*d",options="header"]
+|==============================================================================
+|Content types |Image formats |Shared |Snapshots |Clones
+|images none |raw |yes |no |no
+|==============================================================================
+
+{pve} does not create or delete namespaces; manage them on the array. A volume
+is named `nvme-<wwid>` after its namespace, like its link in `/dev/disk/by-id/`.
+
+Checking and Disconnecting Paths
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> SAN* lists the namespaces of NVMe over Fabrics storages among the
+LUNs, with their state on each node of the storage and *Multipath* shown as
+*Native*, as does *Node -> SAN* for the namespaces of a node. Expand a namespace
+under *Node -> SAN* to inspect its paths. Its *State* counts the usable paths
+out of the portals of the storage, or out of the connected paths if more are
+connected, for example `1/2` while one of two paths is unusable, and shows
+*Failed* without a usable path. *Node -> SAN -> NVMe over Fabrics* lists the
+node's controllers, one per connected portal, with their *State*: *Connected*,
+or *Reconnecting* while the kernel retries a lost path. A node sends a
+xref:notification_events[multipath notification] when the paths of a namespace
+stay degraded or failed in two consecutive checks, and when they recover, under
+the same rules as for a LUN. This does not need `multipathd`.
+
+Each node of an enabled storage connects to the portals that it is not yet
+connected to. A portal that failed is retried after a minute. Removing a portal,
+or disabling or removing the storage, does not disconnect anything. To remove
+such a path, select its controller under *Node -> SAN -> NVMe over Fabrics* on
+each node and press *Disconnect*, or run
+`pvesh delete /nodes/<node>/san/nvmeof/controller/<controller>`. This is refused
+if a namespace that is mounted, in use by another device or as swap, open in a
+process such as a running guest, or referenced by a storage would lose its last
+usable path. If the controller is no usable path itself, such as one that keeps
+reconnecting to a deleted subsystem, the local uses are still checked, but not
+the storage references, as that check reads the namespace. While a namespace has
+no usable path, its I/O waits for `fast-io-fail-tmo`, so an LVM command of the
+status checks can keep it open that long, and Disconnect refuses until then. The
+process check does not find a process that opened the namespace through another
+device node, for example one in a container. A controller with namespaces that
+do not use native NVMe multipath is refused as well. A storage that still lists
+the portal connects to it again. Namespaces of a subsystem that no storage uses
+then show fewer paths, but none as missing, as nothing tells how many paths they
+should have.
+
+Limits
+~~~~~~
+
+* Only the TCP transport is supported, without authentication or TLS.
+* The disk lists under *Node -> Disks* and for Ceph OSDs leave out namespaces
+ attached over TCP or RDMA, like iSCSI LUNs, as other nodes use them too.
+ *Node -> SAN* lists them.
+* NVMe/FC namespaces need no storage of this type, and the guided setups and
+ the cluster-wide status do not cover them. *Node -> SAN* lists them. Create
+ their volume group on the whole namespace under *Node -> Disks -> LVM*; with
+ *Add Storage* enabled, this adds a shared LVM storage.
+
+ifdef::wiki[]
+
+See Also
+~~~~~~~~
+
+* link:/wiki/Storage[Storage]
+
+endif::wiki[]
diff --git a/pvesm.adoc b/pvesm.adoc
index 8f1b24e..0bea1d2 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -79,6 +79,7 @@ nodes that can be accessed as RBD (RADOS Block Device).
|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
@@ -96,11 +97,13 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
-a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
-reachable over several paths; xref:storage_multipath[Multipath] describes how
-{pve} manages them in a cluster. FC and SAS LUNs need a
-xref:storage_multipath_entries[multipath entry].
+^3^: With iSCSI, NVMe over Fabrics (NVMe-oF), Fibre Channel (FC), or SAS block
+storage as shared storage in a cluster, LVM is used to split the LUN or
+namespace into virtual disks. A LUN is usually reachable over several paths;
+xref:storage_multipath[Multipath] describes how {pve} manages them in a cluster.
+FC and SAS LUNs need a xref:storage_multipath_entries[multipath entry].
+NVMe-oF namespaces use the kernel's native multipath instead, see
+xref:storage_nvmeof[NVMe over Fabrics].
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -154,9 +157,10 @@ is available on all nodes, but it is physically different and can have
totally different content.
Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
-on a xref:storage_multipath_setup[SAN LUN], use *Shared LVM on iSCSI* or
-*Shared LVM on Fibre Channel* there instead. It creates the storages that are
-needed and enables multipath for the LUN.
+on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace], use *Shared LVM on iSCSI*, *Shared
+LVM on Fibre Channel* or *Shared LVM on NVMe over Fabrics* there instead. It
+creates the storages that are needed and enables multipath for a LUN.
Storage Pools
@@ -507,6 +511,8 @@ See Also
* link:/wiki/Storage:_Multipath[Storage: Multipath]
+* link:/wiki/Storage:_NVMe_over_Fabrics[Storage: NVMe over Fabrics]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -551,6 +557,8 @@ include::pve-storage-iscsidirect.adoc[]
include::pve-storage-multipath.adoc[]
+include::pve-storage-nvmeof.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 24%]
* [PATCH v4 storage,docs,manager 00/25] NVMe over Fabrics storage
@ 2026-11-23 1:47 9% Thomas Lamprecht
2026-11-23 1:47 24% ` [PATCH v4 docs 15/25] storage: document NVMe over Fabrics storages Thomas Lamprecht
0 siblings, 1 reply; 37+ results
From: Thomas Lamprecht @ 2026-11-23 1:47 UTC (permalink / raw)
To: pve-devel
A storage type for NVMe subsystems reached over TCP, on top of the
applied SAN series [0]: namespaces as base volumes of shared LVM, or
directly as raw VM disks, using the kernel's native NVMe multipath.
This is a deliberately small first version: TCP only, without
authentication or TLS, so access relies on the target's host NQN list
and a dedicated storage network. The plugin connects missing portals and
never disconnects controllers on config change or removal; disconnecting
a controller is an explicit per-node action. The kernel handles path
reconnection, and the SAN series provides LUN inventory, guided setup,
and pre-write guards.
Two operational prerequisites:
- Cloned nodes need distinct /etc/nvme/hostnqn and /etc/nvme/hostid
before connecting.
- All cluster nodes must be upgraded to pve-manager 9.2.38 before
adding the first nvmeof storage, as older nodes drop unknown storage
types when writing storage.cfg; creating the first one is refused
until all nodes are online on 9.2.38+.
What it adds:
- Storage type 'nvmeof' (subsysnqn + TCP portals, one storage per
subsystem, isolated properties, volumes as nvme-<wwid>,
ctrl_loss_tmo=-1, configurable fast-io-fail-tmo defaulting to 120s).
- Shared LVM support with nvmeof volumes as base, discovery via
/nodes/{node}/scan/nvmeof and 'pvesm scan nvmeof', and nvme-cli as a
Recommends of libpve-storage-perl.
- /nodes/{node}/san/nvmeof for host identity, controller listing, and
guarded per-controller disconnect (refused if a namespace in use or
referenced by a storage would lose its last usable path).
- Cluster-wide SAN status and pvestatd path notifications covering
nvmeof namespaces (without requiring multipathd), plus pvereport
output and documentation.
- Web UI: guided "Shared LVM on NVMe over Fabrics" setup, nvmeof
storage dialog with discovery, Node > SAN > NVMe over Fabrics
controller view, host NQN column, and native multipath state display.
Changes since v3 [1]:
- Cluster version & packaging: refuse adding the first nvmeof storage
until all nodes run pve-manager 9.2.38+, and add versioned package
relations assuming the next releases: libpve-storage-perl 9.1.23
(depending on libpve-common-perl 9.2.14 and breaking pve-manager <<
9.2.38), pve-docs 9.2.21, and pve-manager 9.2.38.
- Local disk & wipe isolation: omit TCP/RDMA namespaces from Node >
Disks and Ceph OSD selection (keeping NVMe/FC listed for local LVM
setup), and refuse local wipe on TCP/RDMA namespaces, their
partitions, and detached namespaces without a controller.
- Activation & config hardening: bound activation connect attempts
(~45s without a live controller, ~15s once one is live) and
check_connection (15s); fail activation when all controllers are
reconnecting; keep busy-lock waits out of cooldown while arming
cooldown on hanging connects; clear cooldown on portal edits; refuse
enabling direct image use while an LVM storage uses the subsystem as
base; reject ASCII control chars in NQNs; trim padded discovery
fields; preserve nvme-cli diagnostics on errors.
- Disconnect hardening: also check exclusive claims (e.g. mounts in
other mount namespaces) and non-multipath namespaces numbered after
the subsystem, tolerate brief openers (<1s, e.g. LVM scans), and
give disconnect a 300s lock budget for large subsystems.
- Reporting & notifications: notify on namespaces even without
multipathd; treat unreadable sysfs attributes as incomplete rather
than absent; track absence per source (maps vs namespaces) and label
namespaces as such.
- Web UI & docs: clear stale discovery state immediately when the
discovery portal changes, ignore leading/trailing spaces on typed
portals (also in the shared iSCSI setup), improve narrow-screen
layout of the controller view, refine wipe/edit wording, and update
the storage chapter and cluster API docs.
Tested on a six-node nested cluster against Linux nvmet and a NetApp
AFF A20 (two portals each): both guided setups, live migrations, single
and dual path cuts under write I/O with namespace notifications across
all nodes, restricted users, cluster-version refusal during upgrade,
local disk/wipe exclusions, and removal via wipe + Disconnect in the
web UI. Remaining edge cases (time limits, brief openers, detached
namespaces, multipathd-free notifications, etc.) are covered by unit
tests.
The ZFS-over-NVMe/TCP plugin on the list [2] ships its own initiator;
isolated properties prevent option clashes, and connect helpers can be
shared later. Leaving NVMe/FC partition wipes and Ceph OSDs on NVMe/FC
aligned with Fibre Channel LUNs is left for a SAN-wide follow-up.
[0]: https://lore.proxmox.com/pve-devel/20261119194655.3163258-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20261122012605.1848824-1-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20261005002609.571-1-joaquinvarela@neatech.ar/
pve-storage:
Thomas Lamprecht (14):
diskmanage: skip SMART queries for NVMe fabric namespaces
diskmanage: list NVMe namespaces attached over TCP or RDMA for SAN only
api: disks: refuse a local wipe of a network NVMe namespace
nvmeof: add a storage for NVMe over Fabrics subsystems
d/control: bump pve-common for plain parameter error names
api: config: check the cluster version before the first nvmeof storage
lvm: allow a volume group on an NVMe over Fabrics namespace
api: scan: add NVMe over Fabrics discovery
pvesm: add a scan command for NVMe over Fabrics
api: san luns: attribute NVMe namespaces to storage
api: add node-level NVMe over Fabrics status and controller removal
multipath: report the NVMe host NQN of each node
multipath: report NVMe over Fabrics namespaces in the cluster status
d/control: break pve-manager versions without namespace notifications
ApiChangeLog | 9 +-
debian/control | 5 +-
src/PVE/API2/Disks.pm | 14 +
src/PVE/API2/Makefile | 1 +
src/PVE/API2/NVMeOF.pm | 200 ++++++
src/PVE/API2/SAN/Cluster.pm | 38 +-
src/PVE/API2/SAN/Node.pm | 17 +-
src/PVE/API2/Storage/Config.pm | 5 +
src/PVE/API2/Storage/Scan.pm | 49 ++
src/PVE/CLI/pvesm.pm | 13 +
src/PVE/Diskmanage.pm | 58 +-
src/PVE/Makefile | 1 +
src/PVE/Multipath/Status.pm | 72 +-
src/PVE/NVMeOF.pm | 514 +++++++++++++
src/PVE/Storage.pm | 2 +
src/PVE/Storage/LVMPlugin.pm | 3 +-
src/PVE/Storage/Makefile | 1 +
src/PVE/Storage/NVMeOFPlugin.pm | 300 ++++++++
src/PVE/Storage/Plugin.pm | 2 +-
src/PVE/Storage/SAN.pm | 32 +-
src/test/Makefile | 6 +
src/test/disk_api_test.pm | 20 +-
.../multipath/disklist_expected.json | 16 -
.../nvme_smart/nvme0n1/device/transport | 1 +
src/test/disklist_test.pm | 104 ++-
src/test/run_multipath_api_tests.pl | 132 +++-
src/test/run_nvmeof_api_tests.pl | 222 ++++++
src/test/run_nvmeof_taint_tests.pl | 67 ++
src/test/run_nvmeof_tests.pl | 680 ++++++++++++++++++
src/test/run_san_api_tests.pl | 4 +-
src/test/run_san_lun_scan_tests.pl | 41 ++
src/test/run_san_nvme_tests.pl | 33 +
32 files changed, 2580 insertions(+), 82 deletions(-)
pve-docs:
Thomas Lamprecht (1):
storage: document NVMe over Fabrics storages
notifications.adoc | 5 +-
pve-gui.adoc | 12 ++-
pve-intro.adoc | 3 +-
pve-storage-lvm.adoc | 10 +-
pve-storage-multipath.adoc | 3 +-
pve-storage-nvmeof.adoc | 200 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 24 +++--
7 files changed, 236 insertions(+), 21 deletions(-)
pve-manager:
Thomas Lamprecht (10):
report: add the NVMe over Fabrics host NQN and subsystems
ui: storage: add NVMe over Fabrics storage
ui: lvm: offer NVMe over Fabrics storages as base storage
ui: storage: add a guided setup for shared LVM on NVMe over Fabrics
ui: node san: list NVMe over Fabrics controllers
ui: san: show the NVMe host NQN of each node
ui: san: show that a namespace uses native multipath
pvestatd: notify on NVMe over Fabrics namespaces as on multipath maps
ui: storage: SAN setup: ignore spaces around a typed portal
d/control: bump versioned dependencies for NVMe over Fabrics
PVE/MultipathNotification.pm | 21 +-
PVE/Report.pm | 6 +
PVE/Service/pvestatd.pm | 16 +-
debian/control | 8 +-
test/MultipathNotification_test.pl | 28 ++-
www/manager6/Makefile | 4 +-
www/manager6/SANUtils.js | 7 +-
www/manager6/Utils.js | 7 +
www/manager6/dc/SAN.js | 49 +++-
www/manager6/dc/StorageView.js | 23 +-
www/manager6/node/Config.js | 9 +-
www/manager6/node/NVMeOFControllers.js | 170 +++++++++++++
www/manager6/storage/IScsiEdit.js | 5 +-
www/manager6/storage/LVMEdit.js | 12 +-
www/manager6/storage/NVMeOFEdit.js | 162 ++++++++++++
www/manager6/storage/wizard/LunSelect.js | 35 ++-
www/manager6/storage/wizard/NodeIdentities.js | 57 +++--
.../storage/wizard/{IScsi.js => Target.js} | 236 +++++++++++++-----
www/manager6/storage/wizard/Wizard.js | 62 +++--
www/manager6/window/SANLunState.js | 38 ++-
www/manager6/window/SANLunWipe.js | 24 +-
21 files changed, 792 insertions(+), 187 deletions(-)
^ permalink raw reply [relevance 9%]
* [PATCH v3 docs 10/18] storage: document NVMe over Fabrics storages
@ 2026-11-22 1:25 25% ` Thomas Lamprecht
0 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-22 1:25 UTC (permalink / raw)
To: pve-devel
Add a chapter for the nvmeof storage type: prerequisites, setting up
shared LVM on a namespace with the guided setup or by hand, the
properties, checking and disconnecting paths, and the limits of the
storage type. The introduction lists it among the network storages, and
the LVM chapter names it next to iSCSI as base storage.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pve-gui.adoc | 12 ++-
pve-intro.adoc | 3 +-
pve-storage-lvm.adoc | 10 +-
pve-storage-multipath.adoc | 3 +-
pve-storage-nvmeof.adoc | 189 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 24 +++--
6 files changed, 222 insertions(+), 19 deletions(-)
create mode 100644 pve-storage-nvmeof.adoc
diff --git a/pve-gui.adoc b/pve-gui.adoc
index 9a1f70b..a514eca 100644
--- a/pve-gui.adoc
+++ b/pve-gui.adoc
@@ -233,10 +233,11 @@ On the datacenter level, you can access cluster-wide settings and information.
* *Options:* view and manage cluster-wide default settings.
* *Storage:* provides an interface for managing cluster storage. The *Add* menu
- offers guided setups for shared LVM on iSCSI and Fibre Channel LUNs.
+ offers guided setups for shared LVM on iSCSI and Fibre Channel LUNs and on
+ NVMe over Fabrics namespaces.
-* *SAN:* shows the state of the SAN LUNs on all nodes and manages the multipath
- configuration.
+* *SAN:* shows the state of the SAN LUNs and NVMe namespaces on all nodes and
+ manages the multipath configuration.
* *Backup:* schedule backup jobs. This operates cluster wide, so it doesn't
matter where the VMs/containers are on your cluster when scheduling.
@@ -288,8 +289,9 @@ The top header has useful buttons such as 'Reboot', 'Shutdown', 'Shell',
* *Disks:* get an overview of the attached disks, and manage how they are used.
-* *SAN:* get an overview of the SAN LUNs of the node, with their paths and
- usage. Below it, *iSCSI* shows the iSCSI targets and sessions.
+* *SAN:* get an overview of the SAN LUNs and NVMe namespaces of the node, with
+ their paths and usage. Below it, *iSCSI* shows the iSCSI targets and sessions,
+ and *NVMe over Fabrics* the connected controllers.
* *Ceph:* is only used if you have installed a Ceph server on your
host. In this case, you can manage your Ceph cluster and see the status
diff --git a/pve-intro.adoc b/pve-intro.adoc
index c2a0b6a..baec59f 100644
--- a/pve-intro.adoc
+++ b/pve-intro.adoc
@@ -103,9 +103,10 @@ the cluster have direct access to VM disk images.
The following network storage types are supported:
-* LVM group (network backing with iSCSI targets)
+* LVM group (network backing with iSCSI targets or NVMe over Fabrics)
* iSCSI target
* iSCSI LUNs (direct use)
+* NVMe over Fabrics subsystem
* NFS share
* CIFS share
* Ceph RBD
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index 92019fc..8b9564c 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -34,7 +34,8 @@ LVM volume group name. This must point to an existing volume group.
Base volume. This volume is automatically activated before accessing
the storage. This is mostly useful when the LVM volume group resides
-on a remote iSCSI server.
+on a remote iSCSI server or on an xref:storage_nvmeof[NVMe over Fabrics]
+namespace.
`saferemove`::
@@ -143,9 +144,10 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
-TIP: *Shared LVM on iSCSI* or *Shared LVM on Fibre Channel* in *Datacenter ->
-Storage -> Add* in the web UI creates a shared LVM storage on a SAN LUN, see
-xref:storage_multipath_setup[Multipath].
+TIP: *Shared LVM on iSCSI*, *Shared LVM on Fibre Channel* or *Shared LVM on NVMe
+over Fabrics* in *Datacenter -> Storage -> Add* in the web UI creates a shared
+LVM storage on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace].
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
index 3e07eba..45ab3a8 100644
--- a/pve-storage-multipath.adoc
+++ b/pve-storage-multipath.adoc
@@ -15,7 +15,8 @@ Fibre Channel.
{pve} sets up the maps on all nodes and shows their state under *Datacenter ->
SAN*. An iSCSI storage with *Multipath* enabled requests the maps of its LUNs, a
Fibre Channel LUN needs a multipath entry. NVMe namespaces use the multipath
-support of the kernel instead and are not covered here.
+support of the kernel instead, see xref:storage_nvmeof[NVMe over Fabrics], and
+are not covered here.
Prerequisites
~~~~~~~~~~~~~
diff --git a/pve-storage-nvmeof.adoc b/pve-storage-nvmeof.adoc
new file mode 100644
index 0000000..2a5aaa6
--- /dev/null
+++ b/pve-storage-nvmeof.adoc
@@ -0,0 +1,189 @@
+[[storage_nvmeof]]
+NVMe over Fabrics Backend
+-------------------------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: NVMe over Fabrics
+endif::wiki[]
+
+Storage pool type: `nvmeof`
+
+NVMe over Fabrics (NVMe-oF) gives a node access to the namespaces of an NVMe
+subsystem on a storage array over TCP. Namespaces are the NVMe counterpart of
+LUNs. Use one as the base volume of a shared LVM storage, or use the namespaces
+directly as disk images.
+
+Each node connects one controller per portal of the storage. The kernel
+combines these paths into one device per namespace with its native NVMe
+multipath and reconnects lost paths on its own. `multipath-tools` is not
+involved.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before adding the first NVMe over Fabrics storage, also
+ nodes that will not use it. A node without support for this storage type
+ removes such storages from the cluster-wide storage configuration when it
+ writes that configuration, for example when a storage is added or edited on
+ that node.
+. Install `nvme-cli` on every participating node. The `libpve-storage-perl`
+ package recommends it, but installations without recommended packages need it
+ added separately. Its installation creates the node's host NQN in
+ `/etc/nvme/hostnqn` and host ID in `/etc/nvme/hostid`. Nodes cloned from one
+ image share them. Give each a new identity before it connects, with
+ `nvme gen-hostnqn > /etc/nvme/hostnqn` and `uuidgen > /etc/nvme/hostid`.
+. Allow each node's host NQN on the array. The names are shown under
+ *Datacenter -> SAN* and in the guided setup.
+. Present the same empty namespace to all intended nodes. Portals are IP
+ addresses that every node can reach; host names are not accepted.
+. Use a storage network that only trusted hosts can reach. The connections use
+ neither authentication nor TLS.
+. Keep native NVMe multipath enabled, which is the kernel default
+ (`nvme_core.multipath=Y`).
+
+[[storage_nvmeof_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~~
+
+. On a node that can reach the array, select *Shared LVM on NVMe over Fabrics*
+ under *Datacenter -> Storage -> Add*. The *Add Shared LVM* menu of
+ *Datacenter -> SAN* has the same setup.
+. Enter the *ID* of the new storage, a discovery portal and the subsystem, and
+ check the portals. If no NVMe over Fabrics storage connects the nodes to that
+ subsystem yet, the setup adds one named after the ID with a `-base` suffix, or
+ as set under *Advanced*. This storage connects to the subsystem with `content
+ none`, while the LVM storage manages guest disks. Clear the nodes in the list
+ of host NQNs that should not use the storages. Continuing creates or reuses
+ the NVMe over Fabrics storage before you select a namespace.
+. Select the namespace after checking that no host uses it and that no data on
+ it must be kept. The volume group is named after the ID unless set under
+ *Advanced*.
+. Check the state of the namespace on each node of the storage, which the
+ setup shows once the storage is added, as described for LUNs in
+ xref:storage_multipath_setup[Multipath]. For a node that stays *Missing*,
+ check its access to the namespace on the array before placing guests on the
+ storage.
+
+The discovery fills in *Portals*. Some targets, such as the Linux kernel
+target, report only the portal that was asked: add the others to the list.
+With a single portal, the state of the namespace shows `1/1`, which has no path
+redundancy.
+Portals can also be changed later in the edit dialog of the NVMe over Fabrics
+storage; each node then connects new ones on its own.
+
+*Datacenter -> Storage -> Add -> NVMe over Fabrics* adds only the NVMe over
+Fabrics storage. Without a discovery portal, enter the subsystem NQN and its
+portals as they are. Enable *Use namespaces directly* there to use whole
+namespaces as guest disks, or add an *LVM* storage on a namespace later, with
+the NVMe over Fabrics storage as *Base storage*.
+
+To set it up by hand, run these commands on a node that can reach the array:
+
+----
+# pvesm scan nvmeof <portal>
+# pvesm add nvmeof <nvmeof-storage> --subsysnqn <nqn> --portals <portals> \
+ --content none
+# pvesm list <nvmeof-storage>
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, `<nvmeof-storage>:nvme-<wwid>`.
+Adding the LVM storage creates the volume group if it does not exist yet.
+Creating it is refused if the namespace holds data that {pve} recognizes, such
+as partitions, a file system or a volume group, or if another storage references
+it. To reuse a namespace, wipe it as described for LUNs in
+xref:storage_multipath_setup[Multipath].
+
+Configuration
+~~~~~~~~~~~~~
+
+The backend supports the common storage properties `content`, `nodes`,
+`disable`, and the following NVMe over Fabrics specific properties:
+
+subsysnqn::
+
+The NQN of the NVMe subsystem. It cannot be changed later, and only one storage
+can use a subsystem.
+
+portals::
+
+Comma-separated list of the subsystem's TCP portals, one per path. Each is an
+IPv4 address or an IPv6 address in brackets, with an optional port (default
+4420).
+
+fast-io-fail-tmo::
+
+Seconds a path may be reconnecting before I/O sent to it fails. The default is
+120: guests get I/O errors once all paths of a namespace have been lost for
+that long. With `-1`, I/O waits until a path returns. A change applies to newly
+connected controllers only.
+
+.Configuration Example (`/etc/pve/storage.cfg`)
+----
+nvmeof: fabric
+ subsysnqn nqn.2010-06.com.example:array1
+ portals 192.0.2.10,192.0.2.11
+ content none
+----
+
+.Storage features for backend `nvmeof`
+[width="100%",cols="m,m,3*d",options="header"]
+|==============================================================================
+|Content types |Image formats |Shared |Snapshots |Clones
+|images none |raw |yes |no |no
+|==============================================================================
+
+{pve} does not create or delete namespaces; manage them on the array. A volume
+is named `nvme-<wwid>` after its namespace, like its link in `/dev/disk/by-id/`.
+
+Checking and Disconnecting Paths
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> SAN* lists the namespaces of NVMe over Fabrics
+storages among the LUNs, with their state on each node of the storage and
+*Multipath* shown as *Native*, as does *Node -> SAN* for the namespaces of a
+node. Expand a namespace under *Node -> SAN* to inspect its paths.
+Its *State* counts the usable paths out of the portals of the storage, for
+example `1/2` while one of two paths is unusable, and shows *Failed* without a
+usable path. *Node -> SAN ->
+NVMe over Fabrics* lists the node's controllers, one per connected portal,
+with their *State*: *Connected*, or *Reconnecting* while the kernel retries a
+lost path. A node sends a xref:notification_events[multipath notification] when
+a namespace loses or regains paths, as for a multipath map. A node that cannot
+query `multipathd` sends no such notifications, also not for its namespaces,
+although *Datacenter -> SAN* still shows their state.
+
+Each node of an enabled storage connects to the portals that it is not yet
+connected to. A portal that failed is retried after a minute. Removing a portal,
+or disabling or removing the storage, does not disconnect anything. To remove
+such a path, select its controller under *Node -> SAN -> NVMe over Fabrics* on
+each node and press *Disconnect*, or run
+`pvesh delete /nodes/<node>/san/nvmeof/controller/<controller>`.
+This is refused if a namespace that is mounted, in use by another device or as
+swap, open in a process such as a running guest, or referenced by a storage
+would lose its last usable path. For a controller that is no usable path itself,
+such as one that keeps reconnecting to a deleted subsystem, only the local uses
+count, not a storage reference. The process check does not find a process that
+opened the namespace through another device node, for example one in a
+container. A controller with namespaces that do not use native NVMe multipath is
+refused as well. A storage that still lists the portal connects to it again.
+Namespaces of a subsystem that no storage uses then show fewer paths, but none
+as missing, as nothing tells how many paths they should have.
+
+Limits
+~~~~~~
+
+* Only the TCP transport is supported, without authentication or TLS.
+* NVMe/FC namespaces need no storage of this type, and the guided setups and
+ the cluster-wide status do not cover them. *Node -> SAN* lists them. Create
+ their volume group under *Node -> Disks -> LVM*; with *Add Storage* enabled,
+ this adds a shared LVM storage.
+
+ifdef::wiki[]
+
+See Also
+~~~~~~~~
+
+* link:/wiki/Storage[Storage]
+
+endif::wiki[]
diff --git a/pvesm.adoc b/pvesm.adoc
index 8f1b24e..0bea1d2 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -79,6 +79,7 @@ nodes that can be accessed as RBD (RADOS Block Device).
|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
@@ -96,11 +97,13 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
-a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
-reachable over several paths; xref:storage_multipath[Multipath] describes how
-{pve} manages them in a cluster. FC and SAS LUNs need a
-xref:storage_multipath_entries[multipath entry].
+^3^: With iSCSI, NVMe over Fabrics (NVMe-oF), Fibre Channel (FC), or SAS block
+storage as shared storage in a cluster, LVM is used to split the LUN or
+namespace into virtual disks. A LUN is usually reachable over several paths;
+xref:storage_multipath[Multipath] describes how {pve} manages them in a cluster.
+FC and SAS LUNs need a xref:storage_multipath_entries[multipath entry].
+NVMe-oF namespaces use the kernel's native multipath instead, see
+xref:storage_nvmeof[NVMe over Fabrics].
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -154,9 +157,10 @@ is available on all nodes, but it is physically different and can have
totally different content.
Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
-on a xref:storage_multipath_setup[SAN LUN], use *Shared LVM on iSCSI* or
-*Shared LVM on Fibre Channel* there instead. It creates the storages that are
-needed and enables multipath for the LUN.
+on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace], use *Shared LVM on iSCSI*, *Shared
+LVM on Fibre Channel* or *Shared LVM on NVMe over Fabrics* there instead. It
+creates the storages that are needed and enables multipath for a LUN.
Storage Pools
@@ -507,6 +511,8 @@ See Also
* link:/wiki/Storage:_Multipath[Storage: Multipath]
+* link:/wiki/Storage:_NVMe_over_Fabrics[Storage: NVMe over Fabrics]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -551,6 +557,8 @@ include::pve-storage-iscsidirect.adoc[]
include::pve-storage-multipath.adoc[]
+include::pve-storage-nvmeof.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 25%]
* Re: [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
2026-11-19 19:46 13% [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
` (2 preceding siblings ...)
2026-11-19 19:46 20% ` [PATCH v8 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
@ 2026-11-20 8:45 16% ` Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-20 8:45 UTC (permalink / raw)
To: pve-devel
On Thu, 19 Nov 2026 20:46:05 +0100, Thomas Lamprecht wrote:
> This is v8 of the combined and reduced series of the cluster-wide
> multipath work [0][1] and Dietmar's RFC for guided remote storage setup
> and SAN visibility [2].
>
> If nothing grave comes up I plan to apply this as is.
>
> v8 is v7 [9] plus what an independent review of v7 turned up and held
> up when checked against the code and the lab, i.e.:
>
> [...]
Applied, big thanks here to Blockbridge [0], which where very reactive
and tested basically every version here, ensuring a much better end
result!
[0]: https://www.blockbridge.com
Compared to v8 as posted, I folded in fixes for quite a few more findings,
but mostly rather targeted edge cases:
- If the multipath map of a LUN was not set up on a node, for example
because multipathd failed there, LVM on that node hid the PV on the
LUN, so a wipe from there could destroy the volume group of a shared
storage. The checks before a wipe or a volume group creation now see
such PVs, and also read the LVM label directly.
- The wipe and the volume group creation checked the LUN through its
name, which can lead to another device by the time they write. Both
now check the device they hold open.
- Creating a volume group through the disk API on a LUN that already
had one of the same name, for example from another node, just
succeeded, so two guided setups on one LUN could end with two storages
on the same volume group. This is refused now; only adding a storage
with the LUN as base volume takes over an existing volume group.
- A wipe of a multipath map without any working path could hang in its
checks until the cluster lock timed out. It is now refused right away,
as the volume group creation already did.
- An entry with the name of a map instead of a WWID was accepted by
'multipath -a' without an error, but never showed up as added, so the
node reloaded multipathd on every pass. Such an entry is now reported
as refused.
- The status report that each node publishes only had room for about
180 LUNs. It is stored compressed now, which raises that to about 700.
- The LUN list, the checks and the status each worked out on their own
which LUN an LVM storage uses as base, and did not always agree: a
base with a partition suffix, for example, did not protect its LUN
from a wipe. They now use one helper.
- The cluster status still expected the LUN of a disabled LVM storage
on its nodes, so the LUN showed as missing everywhere once its iSCSI
sessions were gone. A disabled storage now expects nothing.
- A hand-edited overrides file skipped the syntax check that the API
does, so it could hold a multipaths section that the API refuses.
Such a file now stops the apply with an error, instead of being
installed.
- A node without iscsiadm, but in the scope of an iSCSI storage with
multipath management, could neither apply its Fibre Channel entries
nor show Node > SAN. It now only asks iscsiadm about targets that
have paths on that node.
- Adding a second entry for the same WWID now shows the error at the
WWID field, instead of as a generic error.
- If the base volume of an LVM storage could not be activated, a status
pass repeated slow LVM scans for it. It now stops at the first
failure.
- In the web UI, a LUN that is unknown on all nodes no longer lists
every node in its state, the Target/Subsystem header is one string
for translators, and the iSCSI setup says where to allow the
initiator names.
- The multipath chapter is shorter and simpler, and also covers the
options of a multipath entry and that nothing notifies about a lost
path. The web UI and pvestatd chapters mention the SAN panels and
what pvestatd does for multipath.
- Plus some rewording of comments, test descriptions and commit
messages.
Still open (just for sake of completness):
- Nothing notifies about a lost path yet, so an admin has to look at
the SAN view. A notification could build on the status that every
node already reports.
- Storage plugins cannot tell how many paths a volume should have, so
a namespace that a plugin connected looks single-path once one of its
paths is gone. A plugin method for the expected paths could add that.
- NVMe over Fabrics support follows as v3 of its own series, on top of
this.
[pve-cluster]
[01/43] cfs: observe the multipath configuration files
commit: f196907143173a904a24a42f7c2a9f7f78c183c4
[pve-storage]
[02/43] diskmanage: collect disk transport type from lsblk
commit: d5167f815b6344718506e4a5449096ed9518bf4c
[03/43] diskmanage: qualify NVMe over Fabrics transport
commit: 968f1549f8acc3874d253de8a476664438a18d16
[04/43] diskmanage: optionally include iSCSI session devices in disk enumeration
commit: 08c04c8d7a077ff03f4a6fbdab466037ed6e85dd
[05/43] diskmanage: collect native NVMe multipath path state
commit: 6e52aaf06509dc8314030793e1b76f785ee7367a
[06/43] iscsi: factor out session device map from device list
commit: e9e65e672d19cc5d1f33c13a5175cb1eee90fd34
[07/43] multipath: add a library around multipathd
commit: dfe34094562cfc5de060ff835b6e75debc2be12a
[08/43] diskmanage: add helper to list multipath devices
commit: d3e5f28dae60dac121a46a42d63527e5db6f03b5
[09/43] multipath: add a cluster-wide configuration
commit: 59948403ba368b3b771f4860f359c62d1347bd3e
[10/43] iscsi: add an option to manage storage LUNs with multipath
commit: 55dd1de9a1d8017b23ffe53c2815ce5fcfc5a217
[11/43] lvm: activate a missing base volume before using the volume group
commit: 44bc0e3e4e4b261fc4cc76e47dc233f0b4768694
[12/43] multipath: apply the configuration on every node
commit: 51b8a5c820b9ba68d511022350eab4e9cc614937
[13/43] multipath: publish per-node status
commit: e72b1be2793c36e6991d87fe7707ba5288d05509
[14/43] api: add endpoints for the cluster-wide multipath configuration
commit: f0d87e448c207bf166fd000bb880c35c551bfba5
[15/43] api: multipath: add the cluster-wide health status
commit: c98ecf288ff4423d5064e51d19e28734b99a6040
[16/43] diskmanage: look up the requested disks by name
commit: 8222e318de382ea22f554998dd876b67e8c08ee0
[17/43] diskmanage: read the udev data of all disks with one call
commit: 298dcfaec978ae611e6c54d155bd1cdd80e6d7fb
[18/43] api: scan: add a SAN LUN inventory
commit: 2e5f0afad07ffd1845c7d0940e9662df48c72836
[19/43] pvesm: expose the SAN LUN inventory
commit: 73091d3621e51ad5fccb316d2efd902c0570212d
[20/43] api: add node-level iSCSI status
commit: cdf8763f784d2eddadfacaa576d39b64b0c8dea4
[21/43] api: scan: name the portal of an iSCSI path
commit: ad2ccb2ead41c6f4675d9a8d9e382dd59863d7f6
[22/43] disks: lvm: drop unused imports
commit: 946c8422ed805512515864fe80b6aaae340315ec
[23/43] disks: lvm: allow volume groups on SAN LUNs and multipath maps
commit: 6a98c4ba61fb133a6dc82bf20931417f5c0c5ed8
[24/43] disks: lvm: refuse to destroy the volume group of a shared storage
commit: 679d241b7bb4c016704b2fd6ed7983a4983efd98
[25/43] disks: allow wiping a SAN LUN that no storage uses
commit: c5529caa6377f03654d121573659e1cfc0235074
[26/43] api: scan: report the process that has a SAN LUN open
commit: 8e9935f595a664290e6edd4ae8c23b28fe631018
[pve-docs]
[27/43] storage: document the cluster-wide multipath management
commit: 5704d152297524600925469f2065e66d21d49300
[28/43] storage: multipath: describe the use shown for an open LUN
commit: 64861a0de0a5e086f3f5557a6e9165cf75ff8996
[pve-manager]
[29/43] pvestatd: apply the multipath configuration and report the node status
commit: ec55d57a3288630c0690dea4e8d63280e70d58c3
[30/43] report: add the managed multipath configuration
commit: a87eab65140ac4ae098ee4304830d3b9815565a1
[31/43] api: cluster: add the multipath endpoints
commit: 0a6f615a5594135103c3f6aaedeaeefb08664114
[32/43] api: nodes: expose the iSCSI status
commit: faaaadcf6f29c7cd7b1d938d88f0957ceba4d5f8
[33/43] ui: dc: add a SAN view
commit: a335adb38a9b2b9d0a05a1e3afc720bf9a0897c1
[34/43] ui: storage: iscsi: add the multipath option
commit: ca0bfb7e4b079e328f60037ba784ec2354c836b4
[35/43] ui: lvm: enable shared when a base storage is selected
commit: 6cfb3b8ac945ae4b7b0b07ac122da7c5d5f20584
[36/43] ui: node: add SAN LUNs panel
commit: d079fb4b3bd3126df29684822083922e2469afde
[37/43] ui: node: san: wipe a LUN that no storage uses
commit: 966f798adacd34d5b726ae9e6265a8a02a7ec5c5
[38/43] ui: node: san: show iSCSI targets and sessions
commit: 56482f5dd485d37a06f33329216c375e135d5b33
[39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI
commit: e2094f57fff7b8058060b0fb7d0410c2ab3ec744
[40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel
commit: 39162712816a5fc715d00a07d86f683b9a005bf9
[41/43] ui: storage: point the iSCSI and LVM add dialogs to the SAN view
commit: ab30edfcf78d6b6017ebb82354a20402dab22d3b
[42/43] ui: san: show the guest or process that has a LUN open
commit: 188f844baad0ce05b701f0f1a9018ff05f207a25
[43/43] ui: node: san: add a column for the target or subsystem of a LUN
commit: 215871e61ea8ab696d5a4400707d2ea18fb46fa2
^ permalink raw reply [relevance 16%]
* superseded: [PATCH v7 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
2026-11-18 20:25 13% [PATCH v7 cluster,storage,docs,manager 00/43] " Thomas Lamprecht
` (2 preceding siblings ...)
2026-11-18 20:26 20% ` [PATCH v7 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
@ 2026-11-19 19:49 9% ` Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-19 19:49 UTC (permalink / raw)
To: pve-devel
Superseded-by: 20261119194655.3163258-1-t.lamprecht@proxmox.com
^ permalink raw reply [relevance 9%]
* [PATCH v8 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI
2026-11-19 19:46 13% [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-19 19:46 18% ` [PATCH v8 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
@ 2026-11-19 19:46 15% ` Thomas Lamprecht
2026-11-19 19:46 20% ` [PATCH v8 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-20 8:45 16% ` [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-19 19:46 UTC (permalink / raw)
To: pve-devel
Shared LVM on an iSCSI LUN needs an iSCSI storage with multipath, the
right LUN as base volume and an LVM storage on top, in that order. Add a
guided setup for it to the SAN view: connect to the target, with the
initiator names of the nodes at hand for the access rules of the array,
select a LUN, name the volume group and storage, and confirm.
The setup starts from the SAN view and not from Datacenter > Storage >
Add, as it creates a volume group and up to two storages, while an entry
of the Add menu attaches one storage. Its menu is named Guided Setup, as
in the documentation, so that it is not taken for an Add menu or button.
Continuing from the target step creates or reuses the connection storage
before the confirm step, so the target step says so.
The menu needs Datastore.Allocate. It also needs Datastore.Audit or
Datastore.AllocateSpace, as the setup reads the storage list and the
LUNs of the connection storage.
The LUN list comes from the node serving the web UI, and offers the LUNs
of the connection storage, also one that the node reaches through
several targets. A LUN that a storage uses cannot be selected, and a
search field finds one by name, WWID or path. If the target is used by
another storage that cannot be reused, the setup names it and says why.
For a shared storage it matters whether the other nodes see the LUN as
well. So the setup ends with the state of the LUN on each node of the
storage, from the cluster-wide status. Nodes set up a new LUN with their
next status updates, so for the first minute a node without the LUN
shows as pending and not as missing.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 5 +
www/manager6/dc/SAN.js | 20 +-
www/manager6/storage/wizard/IScsi.js | 306 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 204 ++++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 94 ++++++
www/manager6/storage/wizard/Wizard.js | 184 +++++++++++
www/manager6/window/SANLunState.js | 115 +++++++
7 files changed, 927 insertions(+), 1 deletion(-)
create mode 100644 www/manager6/storage/wizard/IScsi.js
create mode 100644 www/manager6/storage/wizard/LunSelect.js
create mode 100644 www/manager6/storage/wizard/NodeIdentities.js
create mode 100644 www/manager6/storage/wizard/Wizard.js
create mode 100644 www/manager6/window/SANLunState.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 4a6c8af72..09a02a9c4 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -137,6 +137,7 @@ JSSRC= \
window/Restore.js \
window/SafeDestroyGuest.js \
window/SafeDestroyStorage.js \
+ window/SANLunState.js \
window/SANLunWipe.js \
window/Settings.js \
window/Snapshot.js \
@@ -385,6 +386,10 @@ JSSRC= \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
storage/ESXIEdit.js \
+ storage/wizard/Wizard.js \
+ storage/wizard/LunSelect.js \
+ storage/wizard/NodeIdentities.js \
+ storage/wizard/IScsi.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 12afa65df..6efb48bf6 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -50,9 +50,15 @@ Ext.define('PVE.dc.SANView', {
initComponent: function () {
let me = this;
- let caps = Ext.state.Manager.get('GuiCap').dc;
+ let allCaps = Ext.state.Manager.get('GuiCap');
+ let caps = allCaps.dc;
let canModify = !!caps['Sys.Modify'];
let canEdit = canModify && !!caps['Sys.Audit'];
+ // the setups also read the storage list and the LUNs of the connection storage
+ let storageCaps = allCaps.storage;
+ let canSetup =
+ !!storageCaps['Datastore.Allocate'] &&
+ !!(storageCaps['Datastore.Audit'] || storageCaps['Datastore.AllocateSpace']);
me.rstore = Ext.create('Proxmox.data.UpdateStore', {
storeid: 'dc-san-status',
model: 'pve-san-status',
@@ -105,6 +111,18 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
+ let setupItem = (wizardType, className) => ({
+ text: PVE.storage.wizard.SAN.subject(wizardType),
+ iconCls: 'fa fa-fw fa-building',
+ handler: () => Ext.create(className, { autoShow: true, reloadCallback: reload }),
+ });
+ me.tbar = [
+ {
+ text: gettext('Guided Setup'),
+ disabled: !canSetup,
+ menu: [setupItem('iscsi', 'PVE.storage.wizard.IScsi')],
+ },
+ ];
me.items = [
{
xtype: 'grid',
diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/IScsi.js
new file mode 100644
index 000000000..f9a53793b
--- /dev/null
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -0,0 +1,306 @@
+Ext.define('PVE.storage.wizard.IScsiTarget', {
+ extend: 'Proxmox.panel.InputPanel',
+ xtype: 'pveStorageWizardIScsiTarget',
+ onlineHelp: 'storage_open_iscsi',
+
+ updateConnectionField: function () {
+ let me = this;
+ let target = me.down('field[name=target]').getValue();
+ let storage = me.storages?.find(
+ (entry) => entry.type === 'iscsi' && entry.target === target,
+ );
+ let field = me.down('field[name=connection]');
+ if (storage) {
+ field.setValue(storage.storage);
+ } else if (field.readOnly) {
+ field.setValue('');
+ }
+ field.setReadOnly(!!storage);
+ },
+
+ onSubmit: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let values = me.getValues();
+ let params = {
+ type: 'iscsi',
+ storage: values.connection,
+ portal: values.portal,
+ target: values.target,
+ content: 'none',
+ 'managed-multipath': 1,
+ };
+ let nodes = []
+ .concat(values.nodes || [])
+ .filter(Boolean)
+ .join(',');
+ if (nodes) {
+ params.nodes = nodes;
+ }
+ let connected = function (connection) {
+ if (wizard.destroyed) {
+ return;
+ }
+ wizard.connection = connection;
+ // the step does not come back, the cluster status of its initiator names is not needed
+ me.down('pveStorageWizardNodeIdentities').rstore.stopUpdate();
+ let tabs = wizard.down('#wizcontent');
+ wizard.down('#luns').enable();
+ tabs.setActiveTab(wizard.down('#luns'));
+ me.disable();
+ };
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ let users = me.storages.filter((entry) => entry.target === values.target);
+ if (users.length) {
+ let base = users[0];
+ let conflict;
+ if (users.length !== 1) {
+ conflict = Ext.String.format(
+ gettext(
+ 'Storages {0} use this target. The setup can only reuse a target that one storage uses.',
+ ),
+ users.map((entry) => entry.storage).join(', '),
+ );
+ } else if (base.type !== 'iscsi') {
+ conflict = Ext.String.format(
+ gettext(
+ 'Storage "{0}" uses this target. The setup can only reuse an iSCSI storage.',
+ ),
+ base.storage,
+ );
+ } else if (`${base.content ?? ''}` !== 'none') {
+ conflict = Ext.String.format(
+ gettext(
+ 'Storage "{0}" uses the LUNs of this target directly. If no guest uses them, clear Use LUNs directly in its edit dialog, otherwise use another target.',
+ ),
+ base.storage,
+ );
+ }
+ if (conflict) {
+ wizard.showError(Ext.htmlEncode(conflict));
+ return;
+ }
+ if (base.disable) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ let baseNodes = base.nodes ? base.nodes.split(',') : [];
+ if (baseNodes.length && !baseNodes.includes(Proxmox.NodeName)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Connection storage "{0}" is not available on node "{1}". Open the web UI on one of its nodes.',
+ ),
+ base.storage,
+ Proxmox.NodeName,
+ ),
+ ),
+ );
+ return;
+ }
+ let selectedNodes = nodes ? nodes.split(',') : baseNodes;
+ if (
+ baseNodes.length &&
+ selectedNodes.some((node) => !baseNodes.includes(node))
+ ) {
+ wizard.showError(
+ gettext(
+ 'The connection storage is not available on all selected nodes.',
+ ),
+ );
+ return;
+ }
+ let connection = {
+ storage: base.storage,
+ target: base.target,
+ nodes: selectedNodes.join(','),
+ };
+ if (!base['managed-multipath']) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Enable Multipath in the edit dialog of storage "{0}" before using it here.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ connected(connection);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () =>
+ connected({ storage: params.storage, target: params.target, nodes }),
+ });
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ let common = PVE.panel.StorageBase.commonFields(true);
+ // wide enough for the longest label of the step
+ let labelWidth = 150;
+ me.items = [
+ {
+ xtype: 'textfield',
+ name: 'portal',
+ fieldLabel: gettext('Portal'),
+ labelWidth,
+ allowBlank: false,
+ listeners: {
+ change: {
+ buffer: 500,
+ fn: function (field, value) {
+ let target = me.down('field[name=target]');
+ target.setDisabled(!value);
+ target.setValue('');
+ target.setPortal(value);
+ },
+ },
+ },
+ },
+ {
+ xtype: 'pveIScsiScan',
+ name: 'target',
+ fieldLabel: gettext('Target'),
+ labelWidth,
+ disabled: true,
+ showNodeSelector: false,
+ nodename: Proxmox.NodeName,
+ listeners: { change: () => me.updateConnectionField() },
+ listConfig: {
+ width: 650,
+ emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')),
+ columns: [
+ {
+ text: gettext('Target'),
+ dataIndex: 'target',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Portals'),
+ dataIndex: 'portal',
+ width: 220,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ },
+ {
+ ...common.id,
+ name: 'connection',
+ fieldLabel: gettext('Connection Storage'),
+ labelWidth,
+ },
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ // TRANSLATORS: {0} is the label of the Next button.
+ 'Pressing {0} creates or reuses the connection storage before you select a LUN.',
+ ),
+ gettext('Next'),
+ ),
+ )}`,
+ },
+ { xtype: 'pveStorageWizardNodeIdentities' },
+ ];
+ me.advancedItems = [
+ {
+ ...common.nodes,
+ labelWidth,
+ validator: PVE.storage.wizard.SAN.validateNodes,
+ listeners: {
+ change: (field, value) =>
+ me.down('pveStorageWizardNodeIdentities').setNodes(value),
+ },
+ },
+ ];
+ me.callParent();
+ me.on('afterrender', () =>
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: me,
+ failure: function (response) {
+ if (!me.destroyed) {
+ me.up('window').showError(response.htmlStatus);
+ }
+ },
+ success: function (response) {
+ if (!me.destroyed) {
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ }
+ },
+ }),
+ );
+ },
+});
+
+Ext.define('PVE.storage.wizard.IScsi', {
+ extend: 'PVE.storage.wizard.SAN',
+ wizardType: 'iscsi',
+
+ createStorage: function (values, lun) {
+ let me = this;
+ let fail = (response) => me.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(me.connection.storage)}/content`,
+ method: 'GET',
+ params: { content: 'images' },
+ waitMsgTarget: me,
+ failure: fail,
+ success: function (response) {
+ if (me.destroyed) {
+ return;
+ }
+ let volume = response.result.data.find((entry) =>
+ entry.volid.endsWith(`.dm-uuid-mpath-${lun.wwid}`),
+ );
+ if (!volume) {
+ me.showError(
+ gettext(
+ 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.',
+ ),
+ );
+ return;
+ }
+ me.addLVMStorage({ ...values, base: volume.volid }, fail);
+ },
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
new file mode 100644
index 000000000..e42779927
--- /dev/null
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -0,0 +1,204 @@
+Ext.define('PVE.storage.wizard.LunSelect', {
+ extend: 'Ext.panel.Panel',
+ xtype: 'pveStorageWizardLunSelect',
+ layout: { type: 'vbox', align: 'stretch' },
+
+ // as an input panel does, so that the wizard shows its help button for this step
+ listeners: {
+ activate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxShowHelp', this.onlineHelp);
+ },
+ deactivate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxHideHelp', this.onlineHelp);
+ },
+ },
+
+ getSelection: function () {
+ return this.down('grid').getSelection()[0]?.data;
+ },
+
+ reload: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let grid = me.down('grid');
+ me.rstore.stopUpdate();
+ let connection = wizard.connection;
+ // The scan names one target per LUN, also for a LUN reached through several. The content
+ // listing has the LUNs of the connection, and a LUN that shows up later is listed once the
+ // scan names the target of the connection for it.
+ let filter = {
+ id: 'connection',
+ filterFn: (rec) =>
+ rec.get('iscsi-target') === connection.target ||
+ (me.connectionWwids ?? []).includes(rec.get('wwid')),
+ };
+ me.store.addFilter(filter);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`,
+ method: 'GET',
+ waitMsgTarget: grid,
+ failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
+ success: function (response) {
+ if (!me.destroyed) {
+ me.connectionWwids = response.result.data
+ .map((entry) => entry.volid.match(/\.dm-uuid-mpath-(.+)$/)?.[1])
+ .filter(Boolean);
+ me.store.addFilter(filter);
+ }
+ },
+ callback: function () {
+ if (!me.destroyed && wizard.down('#wizcontent').getActiveTab() === me) {
+ me.rstore.startUpdate();
+ }
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-luns',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sortAfterUpdate: true,
+ });
+ let inUse = (row) => row['used-by-storage'];
+ let noLunsText = gettext('No LUNs found. Check connections and array access.');
+ let updateSelection = function () {
+ let row = me.getSelection();
+ me.down('#selection').setValue(row && !inUse(row) ? row.wwid : '');
+ };
+ me.items = [
+ {
+ xtype: 'textfield',
+ itemId: 'selection',
+ hidden: true,
+ allowBlank: false,
+ submitValue: false,
+ },
+ {
+ xtype: 'component',
+ cls: 'pmx-hint',
+ margin: '0 0 10 0',
+ html: gettext(
+ 'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store: me.store,
+ emptyText: noLunsText,
+ viewConfig: {
+ enableTextSelection: true,
+ getRowClass: (rec) => (inUse(rec.data) ? 'x-item-disabled' : ''),
+ },
+ listeners: {
+ beforeselect: (sm, rec) => !inUse(rec.data),
+ selectionchange: updateSelection,
+ },
+ columns: [
+ {
+ text: gettext('Name'),
+ dataIndex: 'display-name',
+ flex: 1,
+ minWidth: 260,
+ renderer: Ext.htmlEncode,
+ },
+ { text: 'LUN', dataIndex: 'iscsi-lun', width: 60 },
+ {
+ text: gettext('Model'),
+ dataIndex: 'model',
+ width: 160,
+ renderer: (value, md, rec) =>
+ Ext.htmlEncode([rec.get('vendor'), value].filter(Boolean).join(' ')),
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 140,
+ renderer: PVE.SANUtils.renderLunState,
+ },
+ {
+ text: gettext('Multipath'),
+ dataIndex: 'multipath',
+ width: 170,
+ renderer: PVE.SANUtils.renderSanLunMultipath,
+ },
+ {
+ text: gettext('Used By'),
+ dataIndex: 'used-by',
+ width: 130,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Size'),
+ dataIndex: 'size',
+ width: 100,
+ renderer: Proxmox.Utils.render_size,
+ },
+ {
+ text: gettext('Device'),
+ dataIndex: 'devpath',
+ width: 180,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ tbar: [
+ {
+ text: gettext('Reload'),
+ iconCls: 'fa fa-refresh',
+ handler: () => me.reload(),
+ },
+ '->',
+ {
+ xtype: 'tbtext',
+ html: Ext.htmlEncode(`${gettext('Scan node')}: ${Proxmox.NodeName}`),
+ },
+ ' ',
+ gettext('Search') + ':',
+ ' ',
+ {
+ xtype: 'pveRecordSearchField',
+ emptyText: gettext('Name, WWID, Path'),
+ searchFields: ['name', 'wwid', 'devpath', 'path-search'],
+ listeners: {
+ // no hit for a search is no sign of a connection problem
+ searchchange: function (field, query) {
+ let grid = me.down('grid');
+ if (grid?.rendered) {
+ grid.setEmptyText(
+ query ? gettext('No LUNs match the search.') : noLunsText,
+ );
+ }
+ },
+ },
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
+ me.mon(me.rstore, 'load', updateSelection);
+ me.mon(me.store, 'refresh', () => PVE.SANUtils.deselectHidden(me.down('grid')));
+ let search = me.down('pveRecordSearchField');
+ me.on('activate', function () {
+ search.setTargetStore(me.store);
+ me.reload();
+ });
+ // The setup can update the selected row after this step, which the search must not hide.
+ me.on('deactivate', function () {
+ me.rstore.stopUpdate();
+ search.setTargetStore(null);
+ });
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js
new file mode 100644
index 000000000..a0ef62fee
--- /dev/null
+++ b/www/manager6/storage/wizard/NodeIdentities.js
@@ -0,0 +1,94 @@
+Ext.define('pve-san-node-identity', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'iscsi-initiator-name'],
+});
+
+Ext.define('PVE.storage.wizard.NodeIdentities', {
+ extend: 'Ext.grid.Panel',
+ xtype: 'pveStorageWizardNodeIdentities',
+ height: 220,
+ disableSelection: true,
+ viewConfig: { enableTextSelection: true },
+ columns: [
+ { text: gettext('Node'), dataIndex: 'node', width: 100, renderer: Ext.htmlEncode },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 175,
+ renderer: PVE.SANUtils.renderState,
+ },
+ {
+ text: gettext('Initiator Name'),
+ dataIndex: 'iscsi-initiator-name',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+
+ // Lists only the given nodes, or all nodes for none, which Copy then follows.
+ setNodes: function (nodes) {
+ let me = this;
+ nodes = [].concat(nodes || []).filter(Boolean);
+ if (nodes.length) {
+ me.store.addFilter({ id: 'nodes', filterFn: (rec) => nodes.includes(rec.get('node')) });
+ } else {
+ me.store.removeFilter('nodes');
+ }
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-identities',
+ model: 'pve-san-node-identity',
+ interval: 5000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: (raw) => ({
+ ...raw,
+ data: Object.entries(raw.data.nodes).map(([node, report]) => ({
+ ...report,
+ node,
+ })),
+ }),
+ },
+ },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.tbar = [
+ {
+ xtype: 'tbtext',
+ text: gettext('Allow the initiator names of the nodes that will use the target.'),
+ },
+ '->',
+ {
+ text: gettext('Copy Initiator Names'),
+ iconCls: 'fa fa-clipboard',
+ handler: () =>
+ PVE.Utils.copyToClipboard(
+ me.store
+ .getRange()
+ .map((rec) => rec.get('iscsi-initiator-name'))
+ .filter(Boolean)
+ .join('\n'),
+ ),
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me, me.rstore);
+ me.on('afterrender', () => me.rstore.startUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
new file mode 100644
index 000000000..e0541375b
--- /dev/null
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -0,0 +1,184 @@
+Ext.define('PVE.storage.wizard.SAN', {
+ extend: 'PVE.window.Wizard',
+ width: 1050,
+ height: 620,
+
+ statics: {
+ subject: (type) =>
+ Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type)),
+
+ // a validator of a Nodes field, which ExtJS calls with the field as this
+ validateNodes: function () {
+ let nodes = [].concat(this.getValue() || []).filter(Boolean);
+ return (
+ !nodes.length ||
+ nodes.includes(Proxmox.NodeName) ||
+ Ext.String.format(
+ gettext('Must include node "{0}", which sets up the volume group.'),
+ Proxmox.NodeName,
+ )
+ );
+ },
+ },
+
+ showError: function (message) {
+ if (this.destroyed) {
+ return;
+ }
+ this.down('#submit').enable();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
+ volumeSettings: function () {
+ let me = this;
+ let value = (name) => me.down(`field[name=${name}]`).getValue();
+ return {
+ storage: value('storage'),
+ vgname: value('vgname'),
+ 'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
+ nodes: me.connection.nodes,
+ };
+ },
+
+ // Adds the LVM storage with the volume settings as the last request of a setup. Only the node
+ // serving the web UI looked at the LUN, so show its state on the other nodes afterwards.
+ addLVMStorage: function (values, failure) {
+ let me = this;
+ let params = { type: 'lvm', shared: 1, content: 'images,rootdir', ...values };
+ if (!params.nodes) {
+ delete params.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: me,
+ failure,
+ success: function () {
+ // the storage is added, also if the setup got closed in the meantime
+ if (me.destroyed) {
+ return;
+ }
+ let wwid = me.down('#luns').getSelection().wwid;
+ me.close();
+ Ext.create('PVE.window.SANLunState', {
+ wwid,
+ storage: values.storage,
+ nodes: params.nodes,
+ autoShow: true,
+ });
+ },
+ });
+ },
+
+ multipathSummary: function (lun) {
+ // an explicit entry takes precedence, also for a LUN of the connection storage
+ if (lun.multipath === 'manual') {
+ return PVE.SANUtils.multipathText('manual');
+ }
+ return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ },
+
+ updateSummary: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ let rows = [
+ [gettext('Connection Storage'), me.connection.storage],
+ [gettext('Storage ID'), values.storage],
+ [gettext('Volume Group'), values.vgname],
+ ['WWID', lun.wwid],
+ [gettext('Multipath'), me.multipathSummary(lun)],
+ [gettext('Size'), Proxmox.Utils.format_size(lun.size)],
+ [gettext('Nodes'), values.nodes || gettext('All (No restrictions)')],
+ [
+ gettext('Allow Snapshots as Volume-Chain'),
+ Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
+ ],
+ ];
+ me.down('#summary')
+ .getStore()
+ .setData(rows.map(([key, value]) => ({ key, value })));
+ },
+
+ finish: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ me.down('#submit').disable();
+ me.createStorage(values, lun);
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.subject = PVE.storage.wizard.SAN.subject(me.wizardType);
+ me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
+ let common = PVE.panel.StorageBase.commonFields(true);
+ let settings = {
+ xtype: 'inputpanel',
+ title: gettext('Volume Group'),
+ onlineHelp: 'storage_multipath',
+ items: [
+ { ...common.id, fieldLabel: gettext('Storage ID') },
+ {
+ xtype: 'textfield',
+ name: 'vgname',
+ fieldLabel: gettext('Volume Group'),
+ allowBlank: false,
+ vtype: 'StorageId',
+ },
+ PVE.panel.StorageBase.volumeChainField(true, 'lvm'),
+ ],
+ };
+ me.items = [
+ { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ {
+ xtype: 'pveStorageWizardLunSelect',
+ title: 'LUN',
+ itemId: 'luns',
+ onlineHelp: 'storage_multipath',
+ },
+ settings,
+ {
+ title: gettext('Confirm'),
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'grid',
+ itemId: 'summary',
+ store: { fields: ['key', 'value'] },
+ columns: [
+ {
+ text: gettext('Setting'),
+ dataIndex: 'key',
+ width: 280,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Value'),
+ dataIndex: 'value',
+ flex: 1,
+ cellWrap: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ ],
+ listeners: { activate: () => me.updateSummary() },
+ onSubmit: () => me.finish(),
+ },
+ ];
+ me.callParent();
+ let tabs = me.down('#wizcontent');
+ tabs.on('tabchange', function (tp, tab) {
+ if (tab === me.down('#luns')) {
+ me.down('#back').disable();
+ }
+ me.down('#submit').setText(
+ tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
+ );
+ });
+ me.down('#submit').setText(gettext('Next'));
+ me.on('destroy', () => me.reloadCallback?.());
+ },
+});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
new file mode 100644
index 000000000..6d5221329
--- /dev/null
+++ b/www/manager6/window/SANLunState.js
@@ -0,0 +1,115 @@
+Ext.define('pve-san-lun-node', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'paths-active', 'paths-total', 'paths-expected'],
+});
+
+// Shows the state of the LUN of a new storage on each of its nodes, from the cluster-wide status.
+Ext.define('PVE.window.SANLunState', {
+ extend: 'Ext.window.Window',
+
+ modal: true,
+ width: 550,
+ height: 400,
+ layout: { type: 'vbox', align: 'stretch' },
+ bodyPadding: 10,
+
+ initComponent: function () {
+ let me = this;
+ if (!me.wwid || !me.storage) {
+ throw 'no LUN or storage specified';
+ }
+ me.title = Ext.String.format(gettext('Storage {0}: LUN State'), me.storage);
+ // The other nodes set up a new LUN with their next status updates.
+ let pendingUntil = Date.now() + 60000;
+ let rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-lun-state',
+ model: 'pve-san-lun-node',
+ interval: 3000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: function (raw) {
+ let lun = raw.data?.luns?.find((entry) => entry.wwid === me.wwid);
+ // other storages or entries of the LUN can expect it on more nodes
+ let wanted = me.nodes?.split(',');
+ let nodes = Object.entries(lun?.nodes ?? {}).filter(
+ ([node]) => !wanted || wanted.includes(node),
+ );
+ return { ...raw, data: nodes.map(([node, state]) => ({ ...state, node })) };
+ },
+ },
+ },
+ });
+ let store = Ext.create('Proxmox.data.DiffStore', {
+ rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.items = [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
+ me.storage,
+ ),
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store,
+ disableSelection: true,
+ emptyText: gettext('No node reported this LUN yet.'),
+ columns: [
+ {
+ text: gettext('Node'),
+ dataIndex: 'node',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ flex: 1,
+ renderer: function (value, metaData, rec) {
+ if (value === 'missing' && Date.now() < pendingUntil) {
+ let tip = gettext(
+ 'Not reported by the node yet; the SAN view shows that as "Missing".',
+ );
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(Ext.htmlEncode(tip))}"`;
+ return `<i class="fa fa-fw fa-spinner fa-pulse"></i> ${Ext.htmlEncode(gettext('Pending'))}`;
+ }
+ return PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ );
+ },
+ },
+ {
+ text: gettext('Active Paths'),
+ dataIndex: 'paths-active',
+ width: 120,
+ renderer: (value, metaData, rec) =>
+ value === undefined
+ ? ''
+ : Ext.htmlEncode(PVE.SANUtils.pathCount(rec.data)),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), rstore);
+ me.on('destroy', function () {
+ store.destroy();
+ rstore.destroy();
+ });
+ rstore.startUpdate();
+ },
+});
^ permalink raw reply related [relevance 15%]
* [PATCH v8 docs 27/43] storage: document the cluster-wide multipath management
2026-11-19 19:46 13% [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
@ 2026-11-19 19:46 18% ` Thomas Lamprecht
2026-11-19 19:46 15% ` [PATCH v8 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
` (2 subsequent siblings)
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-19 19:46 UTC (permalink / raw)
To: pve-devel
Add a chapter for multipath on iSCSI and Fibre Channel SANs, written
around the tasks an admin has: prerequisites, setting up shared LVM
with the guided setup or by hand, adding, growing and removing a LUN,
reading the states during a path failure, array-specific settings and
moving over from a hand-made multipath.conf.
Removing a LUN stays a manual procedure, as Proxmox VE never removes a
WWID or a map by itself, so the chapter spells it out including how to
get out of queued I/O.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 321 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 +-
6 files changed, 351 insertions(+), 6 deletions(-)
create mode 100644 pve-storage-multipath.adoc
diff --git a/pmxcfs.adoc b/pmxcfs.adoc
index 1128425..2ab3fb3 100644
--- a/pmxcfs.adoc
+++ b/pmxcfs.adoc
@@ -105,6 +105,8 @@ Files
|`ha/manager_status` | JSON-formatted information regarding HA services on the cluster
|`ha/resources.cfg` | Resources managed by high availability, and their current state
|`ha/rules.cfg` | Rules putting constraints on the HA manager's scheduling of HA resources
+|`multipath-overrides.conf` | Hardware-specific multipath settings, in `multipath.conf` format, applied on all nodes
+|`multipath.cfg` | {pve} cluster-wide multipath configuration (LUN entries)
|`nodes/<NAME>/config` | Node-specific configuration
|`nodes/<NAME>/lxc/<VMID>.conf` | VM configuration data for LXC containers
|`nodes/<NAME>/openvz/` | Prior to {pve} 4.0, used for container configuration data (deprecated, removed soon)
diff --git a/pve-storage-iscsi.adoc b/pve-storage-iscsi.adoc
index a02ed46..2dcc196 100644
--- a/pve-storage-iscsi.adoc
+++ b/pve-storage-iscsi.adoc
@@ -23,6 +23,10 @@ resources.
Low-level iscsi management task can be done using the `iscsiadm` tool.
+TIP: To set up shared LVM on a LUN of an iSCSI target, use the guided setup
+under *Datacenter -> Storage -> SAN* in the web UI, see
+xref:storage_multipath_setup[Multipath].
+
Configuration
~~~~~~~~~~~~~
@@ -38,6 +42,13 @@ target::
iSCSI target.
+managed-multipath::
+
+Combine the paths to each LUN of the target into one `dm-multipath` map on every
+node the storage is enabled on, and monitor the maps cluster-wide. A shared LVM
+storage on a target with several portals needs multipath, through this option
+or set up by hand. See xref:storage_multipath[Multipath].
+
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-iscsidirect.adoc b/pve-storage-iscsidirect.adoc
index ae722e8..97b0979 100644
--- a/pve-storage-iscsidirect.adoc
+++ b/pve-storage-iscsidirect.adoc
@@ -21,7 +21,7 @@ Configuration
~~~~~~~~~~~~~
The user mode iSCSI backend uses the same configuration options as the
-Open-iSCSI backend.
+Open-iSCSI backend, except for `managed-multipath`.
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index d85c6f4..d09206b 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -143,6 +143,9 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
+TIP: The guided setup under *Datacenter -> Storage -> SAN* in the web UI creates
+a shared LVM storage on a SAN LUN, see xref:storage_multipath_setup[Multipath].
+
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
devices again, for example with `pvscan --cache`. This command also resets the
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
new file mode 100644
index 0000000..e56bd92
--- /dev/null
+++ b/pve-storage-multipath.adoc
@@ -0,0 +1,321 @@
+[[storage_multipath]]
+Multipath
+---------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: Multipath
+endif::wiki[]
+
+Use multipath for shared LVM on an iSCSI or Fibre Channel SAN with redundant
+connections. Device-mapper multipath combines the paths to a LUN into one block
+device, called a map, so I/O can continue when a path fails. Its World Wide
+Identifier (WWID) identifies the same LUN on every node.
+
+{pve} configures maps cluster-wide and shows their state under *Datacenter ->
+Storage -> SAN*. An iSCSI storage with *Multipath* enabled requests maps for its
+LUNs; Fibre Channel LUNs need entries in `/etc/pve/multipath.cfg`. NVMe
+namespaces use kernel-native multipath instead; the procedures below cover SCSI
+LUNs.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before enabling cluster-wide multipath management. A node
+ with an older version does not apply the multipath configuration, and it
+ removes the *Multipath* option of iSCSI storages from the cluster-wide storage
+ configuration when it writes that configuration, for example when a storage is
+ added or edited on that node.
+. Install `multipath-tools` on every participating node. The
+ `libpve-storage-perl` package recommends it, but installations without
+ recommended packages need it added separately. A node without it shows
+ *Multipath unavailable* with the reason under *Datacenter -> Storage -> SAN*.
+ Plain iSCSI and LVM without the multipath option still work without it.
+. Allow each node's iSCSI initiator name on the array; the names are shown under
+ *Datacenter -> Storage -> SAN* and in the guided setup. Install `open-iscsi`
+ if needed.
+ For Fibre Channel, configure zoning and LUN masking for the WWPNs of each
+ node's HBA ports, which `cat /sys/class/fc_host/host*/port_name` lists.
+. Present the same empty LUN to all intended nodes over redundant paths. A node
+ does not scan for a Fibre Channel LUN that is mapped to it later, so rescan
+ the Fibre Channel hosts on each node:
++
+----
+# for host in /sys/class/fc_host/host*; do echo '- - -' > /sys/class/scsi_host/${host##*/}/scan; done
+----
++
+If the LUN still does not show up, check the target ports of the array on the
+node. This lists the WWPN, state and roles of each remote port; those of the
+array need the state `Online` and the role `FCP Target`. A `Blocked` port needs
+its connection restored before a rescan can reach it:
++
+----
+# for port in /sys/class/fc_remote_ports/rport-*; do echo $(cat $port/{port_name,port_state,roles}); done
+----
+
+[[storage_multipath_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~
+
+. Open *Datacenter -> Storage -> SAN* in the web UI on a node that can access
+ the LUN and select *Guided Setup -> LVM on iSCSI* or *LVM on Fibre Channel*.
+. For iSCSI, enter a portal, select the target and name the connection storage.
+ This storage connects to the target with `content none` and *Multipath*
+ enabled, while the LVM storage manages guest disks. Leave *Nodes* under
+ *Advanced* empty to use all nodes. With a reused connection storage, empty
+ means all nodes of that storage. Continuing creates or reuses the connection
+ storage before you select a LUN.
+. Select the LUN, choose the storage ID and volume group, then confirm. For
+ Fibre Channel, leave *Nodes* under *Advanced* empty to use all nodes. Virtual
+ machines on the storage can only have snapshots with
+ *Allow Snapshots as Volume-Chain*, which applies to disks created after it is
+ set; see xref:pvesm_lvm_config[LVM configuration].
+. Check the state of the LUN on each node of the storage, which the setup
+ shows once the storage is added. Before that, only the node serving the web
+ UI looked at the LUN; the LUN list names it as *Scan node*. The other nodes
+ set the LUN up with their next status updates and show *Pending* during the
+ first minute. For a node that stays *Missing*, check its access to the LUN
+ on the array before placing guests on the storage. *OK (1 path)* means that
+ the node reaches the LUN over a single path. The *State* column of the view
+ shows the same later.
+
+For Fibre Channel, the setup adds the multipath entry of the LUN if it has none.
+It then waits for the map on the node serving the web UI and sets *Expected
+Paths* of that entry to the number of paths of the map, if that is at least
+two. Existing entries and maps stay as they are; a map that was set up by hand
+gets no entry, so check that the other nodes have it as well. Set *Expected
+Paths* in the entry if it is missing or does not match the intended topology,
+for example because a fabric was down at that time or nodes have different
+path counts.
+
+If setup fails, check the error, the node's task log and *Datacenter ->
+Storage* before retrying; closing the dialog does not undo changes.
+
+A LUN that a storage uses cannot be selected, and the setup refuses a LUN with
+data it recognizes, such as a partition table, a file system or a volume group.
+To keep a volume group that a LUN already holds, do not wipe the LUN: add the
+volume group under *Datacenter -> Storage -> Add -> LVM* with *Shared* enabled.
+
+To reuse a LUN whose data is no longer needed, first stop all its users on all
+hosts and remove its storage references, then use *Wipe* under *Node -> SAN* as
+`root@pam`. This destroys its data. Before the setup or the wipe writes to a
+LUN, the node checks for processes that have it open, also through another of
+its paths, for example a guest that uses it as a disk. This does not find every
+user: not one that opened the LUN through another device node, and none on
+other hosts. A partition of a LUN or of its map, selected on its own, only gets
+the checks of a local disk. The usage shown for a LUN is cached per node, so
+other nodes can still show the old content after a wipe.
+
+The dialogs under *Datacenter -> Storage -> Add* can do the same for iSCSI in
+two steps: add an *iSCSI* storage with *Multipath* enabled and *Use LUNs
+directly* cleared, then an *LVM* storage with it as *Base storage* and the LUN
+as *Base volume*. Selecting a base storage enables *Shared*; keep it enabled.
+
+To set up iSCSI by hand, run these commands on a node with access to the target:
+
+----
+# pvesm add iscsi <connection> --portal <portal> --target <iqn> \
+ --content none --managed-multipath 1
+# pvesm list <connection> --content images
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, including the connection storage
+prefix and the `dm-uuid-mpath-<wwid>` suffix. Adding the LVM storage creates the
+volume group. Keep its base volume: it connects the target before LVM
+activation.
+
+For Fibre Channel, add an entry with the number of paths each node should
+have, wait for the scan to show a by-id path with `dm-uuid-mpath-<wwid>`, then
+create the volume group and shared storage:
+
+----
+# pvesh create /cluster/multipath/wwid --wwid <wwid> --paths-expected <paths>
+# pvesm scan san-luns --output-format json
+# pvesh create /nodes/<node>/disks/lvm --name <storage> \
+ --device /dev/disk/by-id/dm-uuid-mpath-<wwid> --add_storage 1
+----
+
+These examples allow all nodes. For a subset, set `--nodes <nodes>`, a
+comma-separated list, on the entry or iSCSI storage and on the LVM storage. For
+Fibre Channel, leave out `--add_storage 1` and then add the storage with `pvesm
+add lvm <storage> --vgname <storage> --shared 1 --nodes <nodes>`. `pvesh` waits
+for the creation task; check its output for errors before using the storage.
+
+Adding Another LUN
+~~~~~~~~~~~~~~~~~~
+
+. Present the new LUN to the same nodes on the array. Enabled iSCSI storages
+ rescan their sessions automatically; for Fibre Channel, rescan the hosts as
+ shown in the prerequisites.
+. Run the guided setup again. For iSCSI, select the same target to reuse its
+ connection storage. If it lacks *Multipath*, enable that option in its edit
+ dialog first, observing the migration advice below.
+. Select the new LUN and create a separate LVM storage. By hand, repeat the
+ iSCSI listing and LVM command above, or the Fibre Channel procedure.
+
+[[storage_multipath_grow]]
+Growing a LUN
+~~~~~~~~~~~~~
+
+. Grow the LUN on the array. Never shrink a LUN in use.
+. Wait for the iSCSI session rescan, or rescan each SCSI path on every Fibre
+ Channel node with `echo 1 > /sys/block/<path>/device/rescan`, where `<path>`
+ is a member device such as `sdc`, not the map.
+. Check the map size on every node with `multipath -ll <wwid>` or under
+ *Node -> SAN*. The generated configuration sets `auto_resize grow_only`:
+ the map grows once all its paths report the new size. If necessary, run
+ `multipathd resize map <map>` after all paths have grown.
+. Run `pvresize /dev/disk/by-id/dm-uuid-mpath-<wwid>` on one node only, after
+ every node's map has grown. A smaller map cannot access the added space.
+
+[[storage_multipath_remove]]
+Removing a LUN
+~~~~~~~~~~~~~~
+
+{pve} never flushes maps or removes WWIDs from `/etc/multipath/wwids`.
+Removing a configuration entry is not enough. A map that queues I/O without
+paths can block guests and LVM commands, so disable queueing before unmapping:
+
+. Stop all users of the LUN on all hosts, or move their data elsewhere. Remove
+ the LVM storage with `pvesm remove <storage>` and deactivate its volume group
+ on every node with `vgchange -an <vg>`. Neither command erases the data.
+. Set an existing entry to fail I/O with
+ `pvesh set /cluster/multipath/wwid/<wwid> --no-path-retry fail`.
+ If none exists, create one with
+ `pvesh create /cluster/multipath/wwid --wwid <wwid> --no-path-retry fail`.
+ Add `--nodes <nodes>` if only a subset of nodes sees the LUN.
+. Wait until `multipath -ll <wwid>` on every participating node no longer lists
+ `queue_if_no_path` in the map's features. Wait for offline nodes to return.
+ Record the map name and member devices, and each member's identifier from
+ `/sys/block/<path>/device/wwid`.
+. Unmap the LUN on the array.
+. On every node, flush the map with `multipath -f <map>`. If it is busy, retry
+ after a few seconds; if it stays busy, find and stop its remaining users. Do
+ not force removal. For each recorded path,
+ check that its identifier is unchanged, then delete it with
+ `echo 1 > /sys/block/<path>/device/delete`. Skip paths already gone; stop if
+ an identifier changed.
+. Remove the explicit entry with `pvesh delete /cluster/multipath/wwid/<wwid>`.
+ Removing it earlier makes the nodes apply the default retry policy of the
+ array again, which can queue I/O on a map that is not flushed yet and block
+ whatever opens it.
+. On every node, wait until its next status update has removed the WWID from
+ `/etc/multipath/conf.d/pve-aliases.conf`, which takes about ten seconds, then
+ run `multipath -w <wwid>` to remove it from the allow-list. Running it before
+ that update can let the update add the WWID again. Check that
+ `grep -c '^/<wwid>/$' /etc/multipath/wwids` prints 0, and again after the
+ next status update.
+
+If the LUN was already unmapped and I/O is stuck, run
+`multipathd disablequeueing map <map>` on each affected node, then continue
+with the removal procedure.
+
+[[storage_multipath_disconnect]]
+Removing an iSCSI connection storage does not log out its sessions. Keep it
+while other LUNs of the target are in use; session maintenance is done with
+`iscsiadm`, not the read-only *Node -> SAN -> iSCSI* view.
+
+Checking Path Failures
+~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> Storage -> SAN* shows node availability, configuration errors
+and LUN states. It lists the LUNs that {pve} manages or uses: those with an
+explicit entry, those of an iSCSI storage with *Multipath* enabled, and those
+that are the base volume of a storage or hold its volume group. Other maps of a
+node, for example the ones of a third-party storage plugin, are only counted
+under *Other Maps*; *Node -> SAN* lists them as well. The volume groups come
+from the hint file of LVM. While LVM has none, for example because it sees
+duplicate PVs, a node cannot tell which of its other maps hold the volume group
+of a storage and leaves them all out. A LUN that is only listed for its volume
+group then shows *Unknown* for that node, or is not listed if no node reports
+it.
+
+The *State* of a LUN is the worst known state among its nodes. For a state other
+than *Optimal*, it names the nodes in that state, unless all nodes are in it.
+Nodes in *Unknown* do not count for it and are listed after it. Hover over it
+for the states and path counts of all nodes. *Multipath* describes how the map
+is managed, not its health: by an explicit entry, by the storage that requests
+it, or *Unmanaged* for a map that {pve} did not set up. Under *Node -> SAN*, a
+degraded or failed LUN shows its usable and expected paths; expand it to inspect
+individual paths. An iSCSI or Fibre Channel LUN without a map has its devices
+as paths, in the state that the kernel reports for each, and nothing fails over
+between them. With a single device and no map requested for it, *Multipath*
+shows *Single path*. *Node -> SAN -> iSCSI* shows targets and sessions.
+
+*Optimal*:: All known paths are usable and no expected path is missing.
+*OK (1 path)*:: The only path is usable, and there is no other path to fail
+over to. The API reports this as `optimal` with one path.
+*Degraded*:: Some paths are unusable or fewer paths exist than expected.
+*Failed*:: No usable path remains; I/O queues or fails according to the retry
+policy.
+*Missing*:: A node with a current report is expected to have the LUN but does
+not.
+*Unknown*:: No usable current observation is available for that node.
+
+During a path failure, inspect the degraded LUN's paths and restore the failed
+connection. The state returns to *Optimal* when the paths recover. Check node
+availability too: unknown observations do not worsen a known LUN state.
+
+The status report of a node is limited to 32 KiB, which is enough for about 180
+listed LUNs with typical names. A node with more reports `too many LUNs to
+report` and no LUNs: those that the configuration expects on it show *Unknown*
+for that node, and LUNs that only this node reports are missing from the list.
+
+An iSCSI storage expects one path per portal. A portal that a node cannot reach
+keeps the LUNs of that storage *Degraded* on that node, so the array should
+report to each node only the portals that it can reach. For a Fibre Channel LUN,
+set *Expected Paths* in its multipath entry, as the guided setup does. Without
+it, a node only shows as *Degraded* while its lost paths are still listed.
+Depending on the settings for the array, the kernel removes a path that stays
+down longer than `dev_loss_tmo`, and the map then shows *Optimal* with fewer
+paths, or *OK (1 path)* for the last one. NVMe namespaces have no multipath
+entries and so no expected path count: once the kernel removes a lost path,
+after a timeout that depends on how the path was connected, the namespace shows
+its remaining paths in the same way.
+
+[[storage_multipath_config]]
+Array Settings and Existing Configurations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Use the built-in device profiles unless the array vendor requires changes.
+*Edit Overrides* under *Datacenter -> Storage -> SAN* edits
+`/etc/pve/multipath-overrides.conf` for all nodes. For example, to set a retry
+count for one array model (replace the vendor and product expressions):
+
+----
+devices {
+ device {
+ vendor "<vendor>"
+ product "<product>"
+ no_path_retry 12
+ }
+}
+----
+
+The generated configuration sets `auto_resize grow_only` for the growing of
+LUNs. `multipath` only has this setting for all maps of a node, so it also
+applies to maps that {pve} does not manage, for example the ones of a
+third-party storage plugin: they grow once all their paths have grown. To keep
+the resize manual on all nodes, add this to the overrides:
+
+----
+defaults {
+ auto_resize never
+}
+----
+
+To move from a hand-made `/etc/multipath.conf`:
+
+. Back up the local configuration on every node. Move shared array settings to
+ the overrides file; add WWID entries under *Datacenter -> Storage -> SAN* for
+ Fibre Channel LUNs or per-LUN aliases and `no-path-retry` settings.
+. Enable *Multipath* on existing iSCSI storages. Keep existing LVM base volumes.
+ Check `multipathd show config` on every node before removing duplicate local
+ settings. Do not edit the generated `/etc/multipath/conf.d/pve-*.conf` files.
+. Wait until *Datacenter -> Storage -> SAN* shows the LUNs of these storages on
+ every node. Then check active volume dependencies with `lsblk` on each node.
+ Enabling multipath does not move active volumes off individual paths. Stop and
+ restart affected guests, or migrate them away and back, before relying on path
+ redundancy. Keep `multipath_component_detection` enabled in
+ `/etc/lvm/lvm.conf`, as it is by default, and follow the
+ xref:storage_lvm[shared LVM autoactivation guidance].
diff --git a/pvesm.adoc b/pvesm.adoc
index 07a7917..f7de231 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -96,11 +96,10 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, FibreChannel (FC), or SAS block storage as shared storage in a
-cluster, LVM is used to split the LUN into virtual disks. The
-https://pve.proxmox.com/wiki/Multipath[Multipath Guide] explains how to
-configure it in a cluster, including multipathing which is usually a
-requirement in these scenarios.
+^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
+a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
+reachable over several paths; xref:storage_multipath[Multipath] describes how
+{pve} manages them in a cluster.
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -153,6 +152,11 @@ also useful for local storage types. In this case such local storage
is available on all nodes, but it is physically different and can have
totally different content.
+Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
+on a xref:storage_multipath_setup[SAN LUN], use *Guided Setup* under
+*Datacenter -> Storage -> SAN* instead. It creates the storages that are needed
+and enables multipath for the LUN.
+
Storage Pools
~~~~~~~~~~~~~
@@ -500,6 +504,8 @@ See Also
* link:/wiki/Storage:_iSCSI[Storage: iSCSI]
+* link:/wiki/Storage:_Multipath[Storage: Multipath]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -542,6 +548,8 @@ include::pve-storage-iscsi.adoc[]
include::pve-storage-iscsidirect.adoc[]
+include::pve-storage-multipath.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 18%]
* [PATCH v8 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel
2026-11-19 19:46 13% [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-19 19:46 18% ` [PATCH v8 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-19 19:46 15% ` [PATCH v8 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
@ 2026-11-19 19:46 20% ` Thomas Lamprecht
2026-11-20 8:45 16% ` [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-19 19:46 UTC (permalink / raw)
To: pve-devel
Fibre Channel LUNs show up as block devices on the nodes, without a
storage that connects to them, so Datacenter > Storage > Add has no
dialog to start from. Add a Fibre Channel entry to the guided setup of
the SAN view. The entry offers SCSI LUNs only. An NVMe/FC namespace uses
the native multipath of the kernel and has no storage that connects it,
so the cluster-wide status could not show its state on the nodes.
The setup enables multipath for the LUN if needed, so its menu entry
needs Sys.Modify as well. Then the setup creates the volume group on the
name of the map under /dev/disk/by-id, through the node serving the web
UI, and adds the shared LVM storage itself. The node disk API would add
the storage for all nodes and without the snapshot setting. Before it
changes anything, the setup checks that the storage ID is free, as it
cannot create the volume group a second time.
As the setup adds the storage, it waits for the volume group task on its
own, not in a task window. Closing a task window would end the setup
with a volume group and no storage. For the same reason, the setup
cannot be closed until the wait is over. If the task state cannot be
read for a while, the setup ends and says how to add the storage by
hand, as the task may still succeed and must not be started again.
No storage knows how many paths a node should have to a Fibre Channel
LUN. So a multipath entry that the setup adds expects as many paths as
the map has on the node serving the web UI. A node zoned to fewer
fabrics, or one that lost a path, then shows the LUN as degraded.
Nodes do not scan for a LUN that gets mapped to them after their login
to the array, so the setup points to the rescan of the Fibre Channel
hosts.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/dc/SAN.js | 8 +-
www/manager6/storage/wizard/FibreChannel.js | 196 ++++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 20 ++
www/manager6/storage/wizard/Wizard.js | 125 ++++++++++++-
www/manager6/window/SANLunState.js | 10 +-
6 files changed, 348 insertions(+), 12 deletions(-)
create mode 100644 www/manager6/storage/wizard/FibreChannel.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 09a02a9c4..1644e1d41 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -390,6 +390,7 @@ JSSRC= \
storage/wizard/LunSelect.js \
storage/wizard/NodeIdentities.js \
storage/wizard/IScsi.js \
+ storage/wizard/FibreChannel.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 6efb48bf6..888fda6fc 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -111,16 +111,20 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
- let setupItem = (wizardType, className) => ({
+ let setupItem = (wizardType, className, disabled) => ({
text: PVE.storage.wizard.SAN.subject(wizardType),
iconCls: 'fa fa-fw fa-building',
+ disabled,
handler: () => Ext.create(className, { autoShow: true, reloadCallback: reload }),
});
me.tbar = [
{
text: gettext('Guided Setup'),
disabled: !canSetup,
- menu: [setupItem('iscsi', 'PVE.storage.wizard.IScsi')],
+ menu: [
+ setupItem('iscsi', 'PVE.storage.wizard.IScsi'),
+ setupItem('fc', 'PVE.storage.wizard.FibreChannel', !canModify),
+ ],
},
];
me.items = [
diff --git a/www/manager6/storage/wizard/FibreChannel.js b/www/manager6/storage/wizard/FibreChannel.js
new file mode 100644
index 000000000..f93a0f999
--- /dev/null
+++ b/www/manager6/storage/wizard/FibreChannel.js
@@ -0,0 +1,196 @@
+Ext.define('PVE.storage.wizard.FibreChannel', {
+ extend: 'PVE.storage.wizard.SAN',
+ wizardType: 'fc',
+
+ createStorage: function (values, lun) {
+ let me = this;
+ let fail = (response) => me.showError(response.htmlStatus);
+ let create = function (row) {
+ if (me.destroyed) {
+ return;
+ }
+ // the request starts the task that waitForTask() then waits for, so keep the setup open
+ let keepOpen = () => false;
+ me.on('beforeclose', keepOpen);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/disks/lvm`,
+ method: 'POST',
+ params: { name: values.vgname, device: row['by-id'] },
+ waitMsgTarget: me,
+ callback: () => me.un('beforeclose', keepOpen),
+ failure: fail,
+ success: function (response) {
+ if (me.destroyed) {
+ return;
+ }
+ let recovery = (text) =>
+ Ext.htmlEncode(Ext.String.format(text, values.vgname, values.storage));
+ let addStorage = () =>
+ me.addLVMStorage(values, (res) =>
+ me.stopWithError(
+ res.htmlStatus +
+ '<br>' +
+ recovery(
+ gettext(
+ 'Volume group "{0}" was created, but adding storage "{1}" failed. Add it under Datacenter > Storage > Add > LVM with Shared enabled and the same nodes and snapshot setting as in the setup.',
+ ),
+ ),
+ ),
+ );
+ let lost = (status) =>
+ me.stopWithError(
+ status +
+ '<br>' +
+ recovery(
+ gettext(
+ 'Could not read the task status. The volume group creation task may still be running. Check its log under Node > Task History. If it succeeds, add volume group "{0}" as storage "{1}" under Datacenter > Storage > Add > LVM with Shared enabled and the same nodes and snapshot setting as in the setup.',
+ ),
+ ),
+ );
+ let message = gettext('Creating the volume group...');
+ me.waitForTask(response.result.data, message, addStorage, lost);
+ },
+ });
+ };
+ let hasMultipath = (row) => ['manual', 'storage', 'unmanaged'].includes(row.multipath);
+ // the volume group is created on the by-id path of the map, which names the WWID
+ let ready = (row) => hasMultipath(row) && !!row['by-id'];
+ // Fibre Channel has no storage that knows how many paths a node should have, so an entry
+ // the setup adds expects the paths of this node. A node with fewer paths then shows as
+ // degraded. The wizard remembers the entry it added, so that a retry still sets the
+ // expected paths before it creates the volume group.
+ let expectPaths = function (row) {
+ if (!(row['paths-total'] >= 2)) {
+ delete me.addedEntry;
+ create(row);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/cluster/multipath/wwid/${encodeURIComponent(lun.wwid)}`,
+ method: 'PUT',
+ params: { 'paths-expected': row['paths-total'] },
+ waitMsgTarget: me,
+ failure: fail,
+ success: () => {
+ delete me.addedEntry;
+ create(row);
+ },
+ });
+ };
+ let waitForMap = function () {
+ if (me.destroyed) {
+ return;
+ }
+ let store = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-map',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: {
+ type: 'proxmox',
+ url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns`,
+ },
+ });
+ let timer = Ext.defer(function () {
+ store.destroy();
+ if (!me.destroyed) {
+ me.setLoading(false);
+ me.showError(
+ gettext(
+ 'The multipath map or its name under /dev/disk/by-id did not appear within 90 seconds. Check Node > SAN, then reload the LUN list.',
+ ),
+ );
+ }
+ }, 90000);
+ me.on(
+ 'destroy',
+ () => {
+ clearTimeout(timer);
+ if (!store.destroyed) {
+ store.destroy();
+ }
+ },
+ null,
+ { single: true },
+ );
+ me.setLoading(gettext('Waiting for the multipath map...'));
+ store.on('load', function (s, records, success, operation) {
+ if (me.destroyed) {
+ return;
+ }
+ let row = records?.find((rec) => rec.get('wwid') === lun.wwid)?.data;
+ if (!success || (row && ready(row))) {
+ clearTimeout(timer);
+ store.destroy();
+ me.setLoading(false);
+ if (success) {
+ me.down('#luns').down('grid').getSelection()[0].set(row);
+ if (me.addedEntry === lun.wwid) {
+ expectPaths(row);
+ } else {
+ create(row);
+ }
+ } else {
+ me.showError(Proxmox.Utils.getResponseErrorMessage(operation.getError()));
+ }
+ }
+ });
+ store.startUpdate();
+ };
+ let setup = function () {
+ if (ready(lun)) {
+ if (me.addedEntry === lun.wwid) {
+ expectPaths(lun);
+ } else {
+ create(lun);
+ }
+ } else if (
+ hasMultipath(lun) ||
+ lun.multipath === 'pending' ||
+ me.addedEntry === lun.wwid
+ ) {
+ waitForMap();
+ } else {
+ let params = { wwid: lun.wwid };
+ if (values.nodes) {
+ params.nodes = values.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/cluster/multipath/wwid',
+ method: 'POST',
+ params,
+ waitMsgTarget: me,
+ failure: fail,
+ success: () => {
+ me.addedEntry = lun.wwid;
+ waitForMap();
+ },
+ });
+ }
+ };
+ // The storage is added last. Its ID has to be free before anything is created: once the
+ // volume group exists, the setup cannot create it again.
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: me,
+ failure: fail,
+ success: function (response) {
+ if (me.destroyed) {
+ return;
+ }
+ if (response.result.data.some((entry) => entry.storage === values.storage)) {
+ me.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext('Storage ID "{0}" is already in use. Choose another ID.'),
+ values.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ setup();
+ },
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
index e42779927..985131c00 100644
--- a/www/manager6/storage/wizard/LunSelect.js
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -23,6 +23,10 @@ Ext.define('PVE.storage.wizard.LunSelect', {
let grid = me.down('grid');
me.rstore.stopUpdate();
let connection = wizard.connection;
+ if (!connection) {
+ me.rstore.startUpdate();
+ return;
+ }
// The scan names one target per LUN, also for a LUN reached through several. The content
// listing has the LUNs of the connection, and a LUN that shows up later is listed once the
// scan names the target of the connection for it.
@@ -88,6 +92,15 @@ Ext.define('PVE.storage.wizard.LunSelect', {
'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
),
},
+ ...(me.rescanNote
+ ? [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${me.rescanNote}`,
+ },
+ ]
+ : []),
{
xtype: 'grid',
flex: 1,
@@ -189,6 +202,13 @@ Ext.define('PVE.storage.wizard.LunSelect', {
let search = me.down('pveRecordSearchField');
me.on('activate', function () {
search.setTargetStore(me.store);
+ if (me.up('window').wizardType === 'fc') {
+ me.down('gridcolumn[dataIndex=iscsi-lun]').hide();
+ me.store.addFilter({
+ id: 'transport',
+ filterFn: (rec) => ['fc', 'fcoe'].includes(rec.get('transport')),
+ });
+ }
me.reload();
});
// The setup can update the selected row after this step, which the search must not hide.
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
index e0541375b..8c88aae16 100644
--- a/www/manager6/storage/wizard/Wizard.js
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -5,7 +5,10 @@ Ext.define('PVE.storage.wizard.SAN', {
statics: {
subject: (type) =>
- Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type)),
+ Ext.String.format(
+ gettext('LVM on {0}'),
+ type === 'fc' ? gettext('Fibre Channel') : PVE.Utils.format_storage_type(type),
+ ),
// a validator of a Nodes field, which ExtJS calls with the field as this
validateNodes: function () {
@@ -21,6 +24,11 @@ Ext.define('PVE.storage.wizard.SAN', {
},
},
+ stopWithError: function (message) {
+ this.close();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
showError: function (message) {
if (this.destroyed) {
return;
@@ -29,6 +37,65 @@ Ext.define('PVE.storage.wizard.SAN', {
Ext.Msg.alert(gettext('Error'), message);
},
+ // Waits for a task with the setup masked and continues with next() once it succeeded. A task
+ // window of its own could be closed while the task runs, which would end the setup there. The
+ // setup cannot be closed during the wait either, for example with the Escape key.
+ // If the state of the task cannot be read for some time, lost() gets the error: the task may
+ // still be running then, so the setup must not start it again.
+ waitForTask: function (upid, message, next, lost) {
+ let me = this;
+ let task = Proxmox.Utils.parse_task_upid(upid);
+ let failures = 0;
+ let keepOpen = () => false;
+ let done = function (error) {
+ if (me.destroyed) {
+ return;
+ }
+ me.un('beforeclose', keepOpen);
+ me.setLoading(false);
+ if (error === undefined) {
+ next();
+ } else {
+ me.showError(error);
+ }
+ };
+ let poll = function () {
+ if (me.destroyed) {
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${task.node}/tasks/${encodeURIComponent(upid)}/status`,
+ method: 'GET',
+ failure: function (response) {
+ if (me.destroyed) {
+ return;
+ }
+ if (++failures < 5) {
+ Ext.defer(poll, 2000);
+ return;
+ }
+ me.un('beforeclose', keepOpen);
+ me.setLoading(false);
+ lost(response.htmlStatus);
+ },
+ success: function (response) {
+ failures = 0;
+ let { status, exitstatus } = response.result.data;
+ if (status !== 'stopped') {
+ Ext.defer(poll, 1000);
+ return;
+ }
+ let result = Proxmox.Utils.parse_task_status(exitstatus);
+ let failed = result === 'error' || result === 'unknown';
+ done(failed ? Ext.htmlEncode(exitstatus) : undefined);
+ },
+ });
+ };
+ me.on('beforeclose', keepOpen);
+ me.setLoading(message);
+ poll();
+ },
+
volumeSettings: function () {
let me = this;
let value = (name) => me.down(`field[name=${name}]`).getValue();
@@ -36,7 +103,13 @@ Ext.define('PVE.storage.wizard.SAN', {
storage: value('storage'),
vgname: value('vgname'),
'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
- nodes: me.connection.nodes,
+ nodes:
+ me.wizardType === 'fc'
+ ? []
+ .concat(value('nodes') || [])
+ .filter(Boolean)
+ .join(',')
+ : me.connection.nodes,
};
},
@@ -65,6 +138,7 @@ Ext.define('PVE.storage.wizard.SAN', {
wwid,
storage: values.storage,
nodes: params.nodes,
+ fc: me.wizardType === 'fc',
autoShow: true,
});
},
@@ -72,11 +146,18 @@ Ext.define('PVE.storage.wizard.SAN', {
},
multipathSummary: function (lun) {
+ let me = this;
// an explicit entry takes precedence, also for a LUN of the connection storage
if (lun.multipath === 'manual') {
return PVE.SANUtils.multipathText('manual');
}
- return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ if (me.connection) {
+ return PVE.SANUtils.multipathText('storage', me.connection.storage);
+ }
+ // the Fibre Channel setup adds an entry for a LUN without multipath
+ return lun.multipath === 'none'
+ ? gettext('Explicit entry, added by this setup')
+ : PVE.SANUtils.multipathText(lun.multipath, lun['multipath-storage']);
},
updateSummary: function () {
@@ -84,7 +165,6 @@ Ext.define('PVE.storage.wizard.SAN', {
let values = me.volumeSettings();
let lun = me.down('#luns').getSelection();
let rows = [
- [gettext('Connection Storage'), me.connection.storage],
[gettext('Storage ID'), values.storage],
[gettext('Volume Group'), values.vgname],
['WWID', lun.wwid],
@@ -96,6 +176,9 @@ Ext.define('PVE.storage.wizard.SAN', {
Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
],
];
+ if (me.connection) {
+ rows.unshift([gettext('Connection Storage'), me.connection.storage]);
+ }
me.down('#summary')
.getStore()
.setData(rows.map(([key, value]) => ({ key, value })));
@@ -111,6 +194,10 @@ Ext.define('PVE.storage.wizard.SAN', {
initComponent: function () {
let me = this;
+ if (!['iscsi', 'fc'].includes(me.wizardType)) {
+ throw 'no SAN storage type specified';
+ }
+ let iscsi = me.wizardType === 'iscsi';
me.subject = PVE.storage.wizard.SAN.subject(me.wizardType);
me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
let common = PVE.panel.StorageBase.commonFields(true);
@@ -130,13 +217,35 @@ Ext.define('PVE.storage.wizard.SAN', {
PVE.panel.StorageBase.volumeChainField(true, 'lvm'),
],
};
+ if (!iscsi) {
+ settings.advancedItems = [
+ { ...common.nodes, validator: PVE.storage.wizard.SAN.validateNodes },
+ ];
+ }
me.items = [
- { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ ...(iscsi
+ ? [
+ {
+ xtype: 'pveStorageWizardIScsiTarget',
+ title: gettext('Target'),
+ itemId: 'target',
+ },
+ ]
+ : []),
{
xtype: 'pveStorageWizardLunSelect',
title: 'LUN',
itemId: 'luns',
onlineHelp: 'storage_multipath',
+ // the nodes only see a newly mapped Fibre Channel LUN after a rescan
+ rescanNote: iscsi
+ ? undefined
+ : Ext.String.format(
+ gettext(
+ 'After mapping a new LUN on the array, rescan the Fibre Channel hosts of each node (<a href="{0}" target="_blank" rel="noopener noreferrer">documentation</a>).',
+ ),
+ Ext.htmlEncode(Proxmox.Utils.get_help_link('storage_multipath')),
+ ),
},
settings,
{
@@ -171,14 +280,16 @@ Ext.define('PVE.storage.wizard.SAN', {
me.callParent();
let tabs = me.down('#wizcontent');
tabs.on('tabchange', function (tp, tab) {
- if (tab === me.down('#luns')) {
+ if (iscsi && tab === me.down('#luns')) {
me.down('#back').disable();
}
me.down('#submit').setText(
tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
);
});
- me.down('#submit').setText(gettext('Next'));
+ if (iscsi) {
+ me.down('#submit').setText(gettext('Next'));
+ }
me.on('destroy', () => me.reloadCallback?.());
},
});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
index 6d5221329..6215f8e57 100644
--- a/www/manager6/window/SANLunState.js
+++ b/www/manager6/window/SANLunState.js
@@ -55,9 +55,13 @@ Ext.define('PVE.window.SANLunState', {
margin: '0 0 10 0',
html: Ext.htmlEncode(
Ext.String.format(
- gettext(
- 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
- ),
+ me.fc
+ ? gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array and rescan its Fibre Channel hosts.',
+ )
+ : gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
me.storage,
),
),
^ permalink raw reply related [relevance 20%]
* [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
@ 2026-11-19 19:46 13% Thomas Lamprecht
2026-11-19 19:46 18% ` [PATCH v8 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
` (3 more replies)
0 siblings, 4 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-19 19:46 UTC (permalink / raw)
To: pve-devel
This is v8 of the combined and reduced series of the cluster-wide
multipath work [0][1] and Dietmar's RFC for guided remote storage setup
and SAN visibility [2].
If nothing grave comes up I plan to apply this as is.
v8 is v7 [9] plus what an independent review of v7 turned up and held
up when checked against the code and the lab, i.e.:
- A WWID that multipath refuses, for example because the overrides
blacklist it, no longer stops the other WWIDs of a node or the reload
of the configuration. The node reports it as an error and tries it
again after five minutes, or after the overrides change; a multipath
that hangs ends the additions of that pass.
- The overrides also refuse a '{' that is not on the line of its
section name: multipath only warns about that and applies the
section, so a multipaths block could get past the check.
- A drop-in is only replaced if its first line is exactly the generated
one, no longer also with the header of the unreleased v1 to v3.
- A wipe that finished no longer ends as a failed task if udev does not
settle in time afterwards.
- The guided setups are one class per transport, instead of functions
on a namespace, and the note of the target step names the Next button
through a placeholder for translators.
- The setup procedure of the chapter keeps its steps short, with the
Fibre Channel details and keeping a volume group after the list. It
names multipath_component_detection and says that a portal a node
cannot reach keeps the LUNs of the storage Degraded there.
- A base volume is read as volume ID first, so a storage ID like
'scsi-a' no longer confuses which LUN an LVM storage has as base in
the LUN list and the status.
- Smaller ones: descriptions for the fields of the cluster-wide status,
if blocks instead of long post-ifs, clearer comments, test
descriptions and commit messages, and the chapter says why all nodes
need the upgrade first.
Blockbridge tested v7 with their plugin again, thanks! On their
suggestion, Node > SAN shows the namespace ID of an NVMe namespace in
the LUN column, now named LUN/NSID. Their note that a namespace their
plugin connected looks like a single-path one once a path is
disconnected led to two small changes: an explicit multipath entry for
an NVMe namespace is refused, as it showed the namespace as Missing on
every node and could not give it an expected path count, and the chapter
says that NVMe namespaces have none. A plugin method for the expected
paths of plugin volumes could follow as an addition.
What I left as is: points decided for v5 [3] to v7, such as the time
budget of the cluster lock for slow commands, storage IDs for node
auditors and a version check for mixed clusters, and master's behavior
of the other node disk endpoints, which keep allowing a Fibre Channel
LUN as local disk of one node.
Overview of what an admin gets with this:
- Datacenter > Storage > SAN, a new entry below Storage, shows the
multipath state of every node and of the LUNs that Proxmox VE
manages or has a storage on, and edits the multipath entries and
array-specific overrides. I explicitly chose this over the
client/plugin side of Storage, as we do not have e.g. Ceph or
ZFS/LVM/... creation in there either. We might want to rethink and
consolidate our storage interface vs. management story in the
future, but IMO a partial switch now is not worth it, that would add
even more potential for confusion than the new SAN view.
- Its Guided Setup menu leads through shared LVM on a LUN: for iSCSI it
connects or reuses a target, with the initiator names of its nodes at
hand, for Fibre Channel it takes a LUN the nodes already see. Both
set up multipath and end with the state of the LUN on every node.
- Datacenter > Storage > Add keeps its dialogs. The iSCSI one gets a
Multipath option and the LVM one enables Shared for a base storage,
and both point to the SAN view.
- Node > SAN lists the LUNs of a node with their paths and usage, can
wipe a LUN that no storage uses, and shows the iSCSI sessions.
The rules the series follows since v4: nodes add WWIDs and maps but
never remove them, a write is checked where it happens, lists do not
probe devices, there are no new iSCSI operations, the guided setup makes
the API calls an admin would make by hand, and multipath management is
turned on by the admin. The v4 cover [7] has the reasons.
Two things an admin will likely miss: there is no notification when a
LUN loses path redundancy, the state only shows on the SAN pages and in
the API. And Fibre Channel starts at a LUN the nodes already see; the
chapter gives the commands to list WWPNs and rescan the HBAs.
How it works:
- /etc/pve/multipath.cfg holds explicit entries per WWID,
/etc/pve/multipath-overrides.conf array settings; patch 01
registers both. An iSCSI storage with the 'managed-multipath' option
supplies its LUNs without entries. The option is not named
'multipath', as third-party plugins use that name, and the storage
layer leaves out a third-party plugin that declares a property of
another plugin.
- pvestatd calls one function of pve-storage per pass. It adds the
WWIDs the node needs to /etc/multipath/wwids, writes the drop-ins
/etc/multipath/conf.d/pve-*.conf, reloads multipathd after a change,
and publishes the state of the maps that Proxmox VE manages or that a
storage builds on through the node key-value store.
- /cluster/multipath/status aggregates these reports;
/cluster/multipath/{wwid,overrides} edit the two files;
/nodes/{node}/scan/san-luns lists the LUNs of a node and
/nodes/{node}/iscsi its sessions.
- The volumes of an iSCSI storage with the option are named after the
multipath map, so an LVM storage uses them through 'base' as before.
- Volume group creation and wipe run under a cluster lock per LUN. They
refuse a LUN that a storage uses or a process of the node has open,
also through another path. Opens through another device node, such as
one of a container, and users on other hosts are not seen.
Patches:
- cluster 01: register the two configuration files
- storage 02-26: helpers for the disk and iSCSI session inventory
(mostly Dietmar's), the multipath library and configuration, the
iSCSI option, the per-node apply and status with their API, the disk
list of many disks, the LUN inventory, the read-only iSCSI status and
the portal of an iSCSI path, volume groups on LUNs, the wipe and the
process that has a LUN open
- docs 27-28: the multipath chapter, rewritten around tasks, and the
paragraph for a LUN that a process has open
- manager 29-43: the pvestatd call, report and API mounts, then the
views, the two dialog changes, the two guided setups, the note in the
add dialogs, and the guest or process and the target of a LUN
Other changes since v7 [9]:
- rebased onto current master
When applying, versioned dependencies have to be set: pve-manager on
libpve-storage-perl, and libpve-storage-perl (also as build dependency)
on the libpve-cluster-perl with patch 01, as PVE::Storage
registers the two files when it is loaded. pve-cluster with the same
patch keeps the version counters of the two files; with an older pmxcfs
they are read and parsed again on every request. pve-manager also needs
the pve-doc-generator (build) and pve-docs with the multipath chapter,
for its help links. With these versions set, the chapter's request to
upgrade all nodes before enabling the management could name them. If the
bound for LVM status commands [4] gets applied too, whichever is applied
second has to pass the status cache to the two lvm_vgs() calls of the
base volume activation, as they can block a status pass otherwise. Both
mark the cache of the status update with 'status_only', in the same
line.
The per-node target and portal series [5][6] are independent of this
one. It takes the LUNs of an iSCSI storage from the sessions of its one
target, so if a storage can have several targets per node, whichever is
applied second has to cover that.
I tested v8 on the lab of v4 [7] to v7, upgraded from the v7 build, with
the NVMe over Fabrics series and [4] on top. A WWID that the overrides
blacklist next to another let the other be added and its map assembled,
with the refusal shown for each node in the SAN view; the two forms of a
'{' apart from its section name were refused; a drop-in with the old
header stayed and the node said why. The iSCSI setup on the NetApp, the
Fibre Channel setup and the NVMe over Fabrics setup ran to the end with
the new classes, and two wipes ended as OK tasks. With five refused
WWIDs, every node named three and counted the other two, and lifting the
blacklist of one let it be added in the next pass. An unquoted value
with braces in the overrides got the hint to quote it. An LVM storage on
a LUN of a second iSCSI storage named 'scsi-n02' showed as its user in
the LUN list and the cluster status, and the wipe of the LUN was
refused. For the rest, the tests of v7 [9] and v6 [8] still apply.
[0]: https://lore.proxmox.com/pve-devel/20260626121000.2095591-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20260703124707.1172980-2-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20260731102156.3947857-1-dietmar@proxmox.com/
[3]: https://lore.proxmox.com/pve-devel/20261116012355.3187417-1-t.lamprecht@proxmox.com/
[4]: https://lore.proxmox.com/pve-devel/20261111015217.941220-1-t.lamprecht@proxmox.com/
[5]: https://lore.proxmox.com/pve-devel/20260430173220.441001-1-m.limbeck@proxmox.com/
[6]: https://lore.proxmox.com/pve-devel/20260804090819.2136483-1-dietmar@proxmox.com/
[7]: https://lore.proxmox.com/pve-devel/20261113030146.1559030-1-t.lamprecht@proxmox.com/
[8]: https://lore.proxmox.com/pve-devel/20261118065302.3033937-1-t.lamprecht@proxmox.com/
[9]: https://lore.proxmox.com/pve-devel/20261118202646.3017286-1-t.lamprecht@proxmox.com/
pve-cluster:
Thomas Lamprecht (1):
cfs: observe the multipath configuration files
src/PVE/Cluster.pm | 2 ++
src/pmxcfs/status.c | 2 ++
2 files changed, 4 insertions(+)
pve-storage:
Dietmar Maurer (8):
diskmanage: collect disk transport type from lsblk
diskmanage: qualify NVMe over Fabrics transport
diskmanage: optionally include iSCSI session devices in disk enumeration
diskmanage: collect native NVMe multipath path state
iscsi: factor out session device map from device list
diskmanage: add helper to list multipath devices
pvesm: expose the SAN LUN inventory
api: add node-level iSCSI status
Thomas Lamprecht (17):
multipath: add a library around multipathd
multipath: add a cluster-wide configuration
iscsi: add an option to manage storage LUNs with multipath
lvm: activate a missing base volume before using the volume group
multipath: apply the configuration on every node
multipath: publish per-node status
api: add endpoints for the cluster-wide multipath configuration
api: multipath: add the cluster-wide health status
diskmanage: look up the requested disks by name
diskmanage: read the udev data of all disks with one call
api: scan: add a SAN LUN inventory
api: scan: name the portal of an iSCSI path
disks: lvm: drop unused imports
disks: lvm: allow volume groups on SAN LUNs and multipath maps
disks: lvm: refuse to destroy the volume group of a shared storage
disks: allow wiping a SAN LUN that no storage uses
api: scan: report the process that has a SAN LUN open
debian/control | 3 +-
src/PVE/API2/Disks.pm | 47 +-
src/PVE/API2/Disks/LVM.pm | 81 +-
src/PVE/API2/ISCSI.pm | 166 +++++
src/PVE/API2/Makefile | 2 +
src/PVE/API2/Multipath.pm | 537 +++++++++++++
src/PVE/API2/Storage/Scan.pm | 244 ++++++
src/PVE/CLI/pvesm.pm | 15 +
src/PVE/Diskmanage.pm | 386 ++++++++--
src/PVE/ISCSI/Topology.pm | 89 +++
src/PVE/Makefile | 6 +
src/PVE/Multipath.pm | 213 ++++++
src/PVE/Multipath/Config.pm | 215 ++++++
src/PVE/Multipath/Generator.pm | 156 ++++
src/PVE/Multipath/Identity.pm | 44 ++
src/PVE/Multipath/Status.pm | 229 ++++++
src/PVE/Storage.pm | 2 +-
src/PVE/Storage/ISCSIPlugin.pm | 219 ++++--
src/PVE/Storage/LVMPlugin.pm | 158 +++-
src/PVE/Storage/Makefile | 3 +-
src/PVE/Storage/SAN.pm | 463 ++++++++++++
src/test/Makefile | 37 +-
src/test/disk_api_test.pm | 314 ++++++++
src/test/disk_tests/iscsi/disklist | 1 +
.../disk_tests/iscsi/disklist_expected.json | 19 +
src/test/disk_tests/iscsi/lsblk | 5 +
src/test/disk_tests/iscsi/sda/device/model | 1 +
src/test/disk_tests/iscsi/sda/device/vendor | 1 +
.../disk_tests/iscsi/sda/queue/rotational | 1 +
src/test/disk_tests/iscsi/sda/size | 1 +
src/test/disk_tests/iscsi/sda_udevadm | 21 +
src/test/disk_tests/multipath/disklist | 11 +
.../multipath/disklist_expected.json | 107 +++
src/test/disk_tests/multipath/dm-0/dm/name | 1 +
src/test/disk_tests/multipath/dm-0/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-0/size | 1 +
src/test/disk_tests/multipath/dm-0_slaves | 4 +
src/test/disk_tests/multipath/dm-1/dm/name | 1 +
src/test/disk_tests/multipath/dm-1/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-1/size | 1 +
src/test/disk_tests/multipath/dm-1_slaves | 4 +
src/test/disk_tests/multipath/dm-2/dm/name | 1 +
src/test/disk_tests/multipath/dm-2/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-2/size | 1 +
src/test/disk_tests/multipath/dm-2_slaves | 0
src/test/disk_tests/multipath/dm-3/dm/name | 1 +
src/test/disk_tests/multipath/dm-3/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-3/size | 1 +
src/test/disk_tests/multipath/dm-3_slaves | 0
src/test/disk_tests/multipath/dm-4/dm/name | 1 +
src/test/disk_tests/multipath/dm-4/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-4/size | 1 +
src/test/disk_tests/multipath/dm-4_slaves | 0
src/test/disk_tests/multipath/lsblk | 77 ++
src/test/disk_tests/multipath/lvs | 0
src/test/disk_tests/multipath/mounts | 1 +
.../multipath/multipath_expected.json | 59 ++
src/test/disk_tests/multipath/multipathd | 124 +++
.../multipath/multipathd_status_expected.json | 40 +
.../nvme-subsystem/nvme-subsys0/nvme3/address | 1 +
.../nvme-subsys0/nvme3/nvme2c3n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme3/state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/address | 1 +
.../nvme-subsys0/nvme4/nvme2c4n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/state | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/address | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/state | 1 +
.../disk_tests/multipath/nvme8n1/device/model | 1 +
.../multipath/nvme8n1/device/transport | 1 +
.../multipath/nvme8n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme8n1/size | 1 +
src/test/disk_tests/multipath/nvme8n1_udevadm | 14 +
.../disk_tests/multipath/nvme9n1/device/model | 1 +
.../multipath/nvme9n1/device/nvme5/transport | 1 +
.../multipath/nvme9n1/device/vendor | 1 +
.../multipath/nvme9n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme9n1/size | 1 +
src/test/disk_tests/multipath/nvme9n1_udevadm | 12 +
.../multipath/nvme_path_status_expected.json | 19 +
src/test/disk_tests/multipath/partlist | 0
src/test/disk_tests/multipath/pvs | 1 +
.../disk_tests/multipath/sda/device/model | 1 +
.../disk_tests/multipath/sda/device/vendor | 1 +
.../disk_tests/multipath/sda/holders/holder | 1 +
.../disk_tests/multipath/sda/queue/rotational | 1 +
src/test/disk_tests/multipath/sda/size | 1 +
src/test/disk_tests/multipath/sda_udevadm | 18 +
.../disk_tests/multipath/sdb/device/model | 1 +
.../disk_tests/multipath/sdb/device/vendor | 1 +
.../disk_tests/multipath/sdb/holders/holder | 1 +
.../disk_tests/multipath/sdb/queue/rotational | 1 +
src/test/disk_tests/multipath/sdb/size | 1 +
src/test/disk_tests/multipath/sdb_udevadm | 18 +
.../disk_tests/multipath/sdc/device/model | 1 +
.../disk_tests/multipath/sdc/device/vendor | 1 +
.../disk_tests/multipath/sdc/holders/holder | 1 +
.../disk_tests/multipath/sdc/queue/rotational | 1 +
src/test/disk_tests/multipath/sdc/size | 1 +
src/test/disk_tests/multipath/sdc_udevadm | 18 +
.../disk_tests/multipath/sdd/device/model | 1 +
.../disk_tests/multipath/sdd/device/vendor | 1 +
.../disk_tests/multipath/sdd/holders/holder | 1 +
.../disk_tests/multipath/sdd/queue/rotational | 1 +
src/test/disk_tests/multipath/sdd/size | 1 +
src/test/disk_tests/multipath/sdd_udevadm | 18 +
src/test/disk_tests/multipath/zpool | 1 +
.../disk_tests/sas/disklist_expected.json | 1 +
src/test/disk_tests/sas/lsblk | 5 +
src/test/disklist_test.pm | 179 ++++-
src/test/multipath-three-states.json | 52 ++
src/test/plugin_properties_test.pm | 1 +
src/test/run_disk_api_tests.pl | 11 +
src/test/run_iscsi_activation_tests.pl | 109 +++
src/test/run_lun_identity_tests.pl | 57 ++
src/test/run_multipath_api_tests.pl | 705 ++++++++++++++++++
src/test/run_multipath_tests.pl | 194 +++++
src/test/run_san_api_tests.pl | 124 +++
src/test/run_san_library_tests.pl | 135 ++++
src/test/run_san_lun_scan_tests.pl | 338 +++++++++
src/test/run_san_nvme_tests.pl | 122 +++
src/test/run_san_taint_tests.pl | 60 ++
src/test/run_san_wipe_tests.pl | 271 +++++++
src/test/run_san_write_check_tests.pl | 219 ++++++
src/test/run_test_lvm_base_activation.pl | 121 +++
src/test/run_test_lvm_base_volume.pl | 16 +-
src/test/run_test_lvm_create.pl | 46 ++
126 files changed, 6846 insertions(+), 197 deletions(-)
pve-docs:
Thomas Lamprecht (2):
storage: document the cluster-wide multipath management
storage: multipath: describe the use shown for an open LUN
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 329 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 +-
6 files changed, 359 insertions(+), 6 deletions(-)
pve-manager:
Dietmar Maurer (2):
api: nodes: expose the iSCSI status
ui: node: san: show iSCSI targets and sessions
Thomas Lamprecht (13):
pvestatd: apply the multipath configuration and report the node status
report: add the managed multipath configuration
api: cluster: add the multipath endpoints
ui: dc: add a SAN view
ui: storage: iscsi: add the multipath option
ui: lvm: enable shared when a base storage is selected
ui: node: add SAN LUNs panel
ui: node: san: wipe a LUN that no storage uses
ui: dc: san: add a guided setup for shared LVM on iSCSI
ui: dc: san: add a guided setup for shared LVM on Fibre Channel
ui: storage: point the iSCSI and LVM add dialogs to the SAN view
ui: san: show the guest or process that has a LUN open
ui: node: san: add a column for the target or subsystem of a LUN
PVE/API2/Cluster.pm | 7 +
PVE/API2/Nodes.pm | 7 +
PVE/Report.pm | 3 +
PVE/Service/pvestatd.pm | 7 +
www/manager6/Makefile | 12 +
www/manager6/SANUtils.js | 239 +++++++++++
www/manager6/Utils.js | 19 +
www/manager6/dc/Config.js | 23 +-
www/manager6/dc/MultipathWwidEdit.js | 81 ++++
www/manager6/dc/SAN.js | 398 ++++++++++++++++++
www/manager6/node/Config.js | 24 ++
www/manager6/node/ISCSITargets.js | 150 +++++++
www/manager6/node/LVM.js | 5 +
www/manager6/node/SANLuns.js | 233 ++++++++++
www/manager6/storage/Base.js | 5 +
www/manager6/storage/IScsiEdit.js | 46 ++
www/manager6/storage/LVMEdit.js | 6 +
www/manager6/storage/wizard/FibreChannel.js | 196 +++++++++
www/manager6/storage/wizard/IScsi.js | 306 ++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 224 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 94 +++++
www/manager6/storage/wizard/Wizard.js | 295 +++++++++++++
www/manager6/window/SANLunState.js | 119 ++++++
www/manager6/window/SANLunWipe.js | 64 +++
24 files changed, 2557 insertions(+), 6 deletions(-)
^ permalink raw reply [relevance 13%]
* [PATCH v2 docs 10/17] storage: document NVMe over Fabrics storages
2026-11-18 20:42 9% [PATCH v2 storage,docs,manager 00/17] NVMe over Fabrics storage Thomas Lamprecht
@ 2026-11-18 20:42 22% ` Thomas Lamprecht
0 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 20:42 UTC (permalink / raw)
To: pve-devel
Add a chapter for the nvmeof storage type: prerequisites, setting up
shared LVM on a namespace with the guided setup or by hand, the
properties, checking and disconnecting paths, and the limits of the
storage type.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pve-storage-multipath.adoc | 4 +-
pve-storage-nvmeof.adoc | 167 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 20 +++--
3 files changed, 183 insertions(+), 8 deletions(-)
create mode 100644 pve-storage-nvmeof.adoc
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
index d74fa23..caeae9b 100644
--- a/pve-storage-multipath.adoc
+++ b/pve-storage-multipath.adoc
@@ -14,8 +14,8 @@ Identifier (WWID) identifies the same LUN on every node.
{pve} configures maps cluster-wide and shows their state under *Datacenter ->
Storage -> SAN*. An iSCSI storage with *Multipath* enabled requests maps for its
LUNs; Fibre Channel LUNs need entries in `/etc/pve/multipath.cfg`. NVMe
-namespaces use kernel-native multipath instead; the procedures below cover SCSI
-LUNs.
+namespaces use kernel-native multipath instead, see
+xref:storage_nvmeof[NVMe over Fabrics]; the procedures below cover SCSI LUNs.
Prerequisites
~~~~~~~~~~~~~
diff --git a/pve-storage-nvmeof.adoc b/pve-storage-nvmeof.adoc
new file mode 100644
index 0000000..aa464b6
--- /dev/null
+++ b/pve-storage-nvmeof.adoc
@@ -0,0 +1,167 @@
+[[storage_nvmeof]]
+NVMe over Fabrics Backend
+-------------------------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: NVMe over Fabrics
+endif::wiki[]
+
+Storage pool type: `nvmeof`
+
+NVMe over Fabrics (NVMe-oF) gives a node access to the namespaces of an NVMe
+subsystem on a storage array over TCP. Namespaces are the NVMe counterpart of
+LUNs. Use one as the base volume of a shared LVM storage, or use the namespaces
+directly as disk images.
+
+Each node connects one controller per portal of the storage. The kernel
+combines these paths into one device per namespace with its native NVMe
+multipath and reconnects lost paths on its own. `multipath-tools` is not
+involved.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before adding the first NVMe over Fabrics storage.
+. Install `nvme-cli` on every participating node. The `libpve-storage-perl`
+ package recommends it, but installations without recommended packages need it
+ added separately. Its installation creates the node's host NQN in
+ `/etc/nvme/hostnqn` and host ID in `/etc/nvme/hostid`. Nodes cloned from one
+ image share them. Give each a new identity before it connects, with
+ `nvme gen-hostnqn > /etc/nvme/hostnqn` and `uuidgen > /etc/nvme/hostid`.
+. Allow each node's host NQN on the array. The names are shown under
+ *Datacenter -> Storage -> SAN* and in the guided setup.
+. Present the same empty namespace to all intended nodes. Portals are IP
+ addresses that every node can reach; host names are not accepted.
+. Use a storage network that only trusted hosts can reach. The connections use
+ neither authentication nor TLS.
+. Keep native NVMe multipath enabled, which is the kernel default
+ (`nvme_core.multipath=Y`).
+
+[[storage_nvmeof_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~~
+
+. Open *Datacenter -> Storage -> SAN* in the web UI on a node that can reach
+ the array and select *Guided Setup -> LVM on NVMe over Fabrics*.
+. Enter a discovery portal, select the subsystem, check the portals and name
+ the connection storage. This storage connects to the subsystem with
+ `content none`, while the LVM storage manages guest disks. Continuing creates
+ or reuses the connection storage before you select a namespace.
+. Select the namespace, choose the storage ID and volume group, then confirm.
+ Leave *Nodes* empty for all nodes.
+. Check the state of the namespace on each node of the storage, which the
+ setup shows once the storage is added, as described for LUNs in
+ xref:storage_multipath_setup[Multipath]. For a node that stays *Missing*,
+ check its access to the namespace on the array before placing guests on the
+ storage.
+
+The discovery fills in *Portals*. Some targets, such as the Linux kernel
+target, report only the portal that was asked: add the others to the list.
+With a single portal, the state of the namespace reads *OK (1 path)*.
+Portals can also be changed later in the edit dialog of the connection storage;
+each node then connects new ones on its own.
+
+*Datacenter -> Storage -> Add -> NVMe over Fabrics* adds only the connection
+storage. Enable *Use namespaces directly* there to use whole namespaces as guest
+disks, or add an *LVM* storage on a namespace later, with the connection storage
+as *Base storage*.
+
+To set it up by hand, run these commands on a node that can reach the array:
+
+----
+# pvesm scan nvmeof <portal>
+# pvesm add nvmeof <connection> --subsysnqn <nqn> --portals <portals> --content none
+# pvesm list <connection>
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, `<connection>:nvme-<wwid>`. Adding
+the LVM storage creates the volume group if it does not exist yet. Creating it
+is refused if the namespace holds data that {pve} recognizes, such as
+partitions, a file system or a volume group, or if another storage references
+it. To reuse a namespace, wipe it as described for LUNs in
+xref:storage_multipath_setup[Multipath].
+
+Configuration
+~~~~~~~~~~~~~
+
+The backend supports the common storage properties `content`, `nodes`,
+`disable`, and the following NVMe over Fabrics specific properties:
+
+subsysnqn::
+
+The NQN of the NVMe subsystem. It cannot be changed later, and only one storage
+can use a subsystem.
+
+portals::
+
+Comma-separated list of the subsystem's TCP portals, one per path. Each is an
+IPv4 address or an IPv6 address in brackets, with an optional port (default
+4420).
+
+fast-io-fail-tmo::
+
+Seconds a path may be reconnecting before I/O sent to it fails. The default is
+120: guests get I/O errors once all paths of a namespace have been lost for
+that long. With `-1`, I/O waits until a path returns. A change applies to newly
+connected controllers only.
+
+.Configuration Example (`/etc/pve/storage.cfg`)
+----
+nvmeof: fabric
+ subsysnqn nqn.2010-06.com.example:array1
+ portals 192.0.2.10,192.0.2.11
+ content none
+----
+
+.Storage features for backend `nvmeof`
+[width="100%",cols="m,m,3*d",options="header"]
+|==============================================================================
+|Content types |Image formats |Shared |Snapshots |Clones
+|images none |raw |yes |no |no
+|==============================================================================
+
+{pve} does not create or delete namespaces; manage them on the array. A volume
+is named `nvme-<wwid>` after its namespace, like its link in `/dev/disk/by-id/`.
+
+Checking and Disconnecting Paths
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> Storage -> SAN* lists the namespaces of NVMe over Fabrics
+storages among the LUNs, with their state on each node of the storage and
+*Multipath* shown as *Native*, as does *Node -> SAN* for the namespaces of a
+node. Expand a namespace there to inspect its paths.
+Its *State* is *Degraded* while a path is unusable or fewer paths exist than
+the storage has portals, and *Failed* without a usable path. *Node -> SAN ->
+NVMe over Fabrics* lists the node's controllers, one per connected portal:
+*Connected*, or *Reconnecting* while the kernel retries a lost path.
+
+An enabled storage connects the portals a node has no controller for. A portal
+that failed is retried after a minute. Removing a portal, or disabling or
+removing the storage, does not disconnect anything. To remove such a path,
+select its controller under *Node -> SAN -> NVMe over Fabrics* on each node and
+press *Disconnect*, or run
+`pvesh delete /nodes/<node>/nvmeof/controller/<controller>`. This is refused if
+a namespace that is mounted, in use by another device, open in a process such
+as a running guest, or referenced by a storage would lose its last usable path.
+The process check does not find one that opened the namespace through another
+device node. A controller with namespaces that do not use native NVMe multipath
+is refused as well. A storage that still lists the portal connects to it again.
+
+Limits
+~~~~~~
+
+* Only the TCP transport is supported, without authentication or TLS.
+* NVMe/FC namespaces need no storage of this type, and the guided setups and
+ the cluster-wide status do not cover them. *Node -> SAN* lists them. Create
+ their volume group under *Node -> Disks -> LVM*; with *Add Storage* enabled,
+ this adds a shared LVM storage.
+
+ifdef::wiki[]
+
+See Also
+~~~~~~~~
+
+* link:/wiki/Storage[Storage]
+
+endif::wiki[]
diff --git a/pvesm.adoc b/pvesm.adoc
index f7de231..5cf0df2 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -79,6 +79,7 @@ nodes that can be accessed as RBD (RADOS Block Device).
|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
@@ -96,10 +97,12 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
-a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
-reachable over several paths; xref:storage_multipath[Multipath] describes how
-{pve} manages them in a cluster.
+^3^: With iSCSI, NVMe over Fabrics (NVMe-oF), Fibre Channel (FC), or SAS block
+storage as shared storage in a cluster, LVM is used to split the LUN or
+namespace into virtual disks. A LUN is usually reachable over several paths;
+xref:storage_multipath[Multipath] describes how {pve} manages them in a cluster.
+NVMe-oF namespaces use the kernel's native multipath instead, see
+xref:storage_nvmeof[NVMe over Fabrics].
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -153,9 +156,10 @@ is available on all nodes, but it is physically different and can have
totally different content.
Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
-on a xref:storage_multipath_setup[SAN LUN], use *Guided Setup* under
+on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace], use *Guided Setup* under
*Datacenter -> Storage -> SAN* instead. It creates the storages that are needed
-and enables multipath for the LUN.
+and enables multipath for a LUN.
Storage Pools
@@ -506,6 +510,8 @@ See Also
* link:/wiki/Storage:_Multipath[Storage: Multipath]
+* link:/wiki/Storage:_NVMe_over_Fabrics[Storage: NVMe over Fabrics]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -550,6 +556,8 @@ include::pve-storage-iscsidirect.adoc[]
include::pve-storage-multipath.adoc[]
+include::pve-storage-nvmeof.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 22%]
* [PATCH v2 storage,docs,manager 00/17] NVMe over Fabrics storage
@ 2026-11-18 20:42 9% Thomas Lamprecht
2026-11-18 20:42 22% ` [PATCH v2 docs 10/17] storage: document NVMe over Fabrics storages Thomas Lamprecht
0 siblings, 1 reply; 37+ results
From: Thomas Lamprecht @ 2026-11-18 20:42 UTC (permalink / raw)
To: pve-devel
A storage type for NVMe subsystems reached over TCP, on top of v7 of the
SAN series [0]: namespaces as base volumes of shared LVM, or directly as
disk images, with the kernel's native multipath.
This is v2 [1]. Besides following the SAN series, it adds three
checks, listed first below.
This is a deliberately small first version: TCP only, without
authentication or TLS, so access rests on the host NQN list of the
target and a separate storage network. It relies on the kernel to
reconnect lost paths and on the SAN series for the LUN inventory, the
guided setup and the checks before a namespace is written. The plugin
connects what is missing and removes nothing, also not when a portal or
the storage is removed: disconnecting a controller is an explicit action
per node.
Two prerequisites from the chapter: nodes cloned from one image need
distinct host NQNs before they connect. And as with every new storage
type, all nodes need the upgrade before the first such storage is added,
as a node that does not know the type drops its definitions when it
writes storage.cfg. I ran into that in the lab.
What it adds:
- storage type 'nvmeof' with a subsystem NQN and a list of TCP portals,
one storage per subsystem. Each node connects the portals it has no
controller for and leaves existing controllers as they are. New
controllers get ctrl_loss_tmo=-1, so the kernel keeps reconnecting,
and fail I/O on a lost path after 120 seconds unless configured
otherwise. Volumes are named nvme-<wwid>.
- LVM accepts such a volume as base, with the reference check and the
per-LUN lock of the SAN series.
- discovery: /nodes/{node}/scan/nvmeof and 'pvesm scan nvmeof'.
- /nodes/{node}/nvmeof: host identity, controller list, and removal of
one controller. That is refused if a namespace that is mounted, has a
holder, is open in a process or is referenced by a storage would lose
its last usable path. As in the SAN series, the process check misses
an open through another device node. A storage that still lists the
portal connects again.
- the node report and with it the cluster-wide status of the SAN series
include the namespaces of nvmeof storages, with their state on each
node of the storage. They do not need multipathd.
- web UI: the Guided Setup menu of the SAN view gets a third entry for
shared LVM on a namespace, which ends with the state of the namespace
on every node like the other two; Datacenter > Storage > Add gets the
dialog of the storage type, with subsystem discovery and the note
pointing to the SAN view; Node > SAN lists the controllers, next to
the namespaces that the SAN series lists with their paths; the SAN
view shows the host NQN of each node.
- nvme-cli becomes a Recommends of libpve-storage-perl.
Patches:
- storage 01-09: SMART skip for TCP and RDMA namespaces, the
plugin, LVM base, discovery, namespace attribution in the LUN
inventory, the node API, the host NQN and the namespaces in the node
report
- docs 10: the storage chapter
- manager 11-17: API mount, storage type and its dialog, LVM base
selector, guided setup, controller list, host NQN column, native
multipath in the LUN list of the SAN view
Changes since v1 [1]:
- the controller removal also refuses when a process has a namespace
open, and refuses a controller whose namespaces do not use native
NVMe multipath, as its checks go by their head devices
- resolving a volume ID to its path checks an existing device against
the subsystem of the storage, not only activation: a volume name can
be the by-id name of any NVMe device, and a live import, for example,
reads its source without activating it
- a second storage for the same subsystem is refused. The LUN list, the
controller list and the node report take the first storage they find,
so namespaces showed as unused next to a connection storage. One
storage lists all portals instead
- the discovery in the add dialog can run on another node, as for iSCSI
- the chapter lists the trusted storage network as a prerequisite
- NVMe/FC is no longer offered in the Fibre Channel setup, which covers
SCSI LUNs only; the chapter says how to set up such a namespace
- the controller list counts the namespaces in one pass: 8.4 seconds
for 1000 controllers before, 0.07 now, found by a plugin vendor
- the status update does not wait for a missing namespace, as in the
SAN series, and the hint of the namespace step speaks of a namespace
in use
- the subsystem and ID of a namespace in the LUN inventory, and the
subsystem in the target column of the LUN list of a node, come from
v7 of the SAN series now, which shows them for any namespace
- rebased onto v7 of the SAN series and plugin API 17, with 'vm-vol'
content and the plugin metadata, and with the namespace variants of
the setup texts that v7 changed
- the plugin isolates its properties, so they need no prefix:
'nvme-portals' and 'nvme-fast-io-fail-tmo' are now 'portals' and
'fast-io-fail-tmo', and a third-party plugin can declare these names
and 'subsysnqn' for itself. Being a new type, it has no
configurations to carry over. As the first in-tree plugin that
isolates, it makes the storage API check and describe the create and
update parameters per type, as an installed isolating third-party
plugin already does. For the in-tree types, the web UI and pvesm work
as before. A third-party plugin now has to list the sensitive
properties it uses in options() on every installation, which the
TrueNAS, Lightbits, simplyblock and Pure Storage plugins do. The API
viewer lists 186 parameters for creating a storage instead of 66, one
per property and type, and the pvesm man page grows from 880 to 1108
lines. pve-api-types does not generate these two calls
- the namespace ID left the content listing, where nothing read it;
style fixes, and the plugin module uses v5.36 and signatures
When applying, pve-manager needs a versioned dependency on the
libpve-storage-perl with this series, as its node API loads the new
PVE::API2::NVMeOF, and on the pve-doc-generator (build) and pve-docs
with the NVMe over Fabrics chapter, for its help links.
For v1 I tested this on a six-node nested cluster against a Linux nvmet
target and a NetApp AFF A20, each with two portals: both guided setup
variants, also with a node without access at first, path faults and a
stopped multipathd in the cluster-wide status, a guest on shared LVM on
a NetApp namespace through snapshot, rollback, live migration and a path
cut under I/O, the wipe and its refusals, and reconnecting after a node
reboot.
For v2 I upgraded that cluster and ran the new refusals (a process on
the only path, a second storage for a subsystem from CLI, API and
dialog), the discovery through another node, and a volume named after a
namespace of another subsystem. After the rebase onto v6 of the SAN
series, the guided setup ran again on the nvmet target, and the guest of
the SAN series' test had a data disk on such a namespace through
snapshots, live migrations and a node reboot. The controller list showed
1000 controllers in the web UI. The refusal for a controller outside of
native multipath and the status update that does not wait have unit
tests only. With the isolated properties, I added, edited and removed
such a storage from the CLI and the web UI, ran the guided setup up to a
new connection storage, and removed a NetApp controller on one node,
which connected again from the portals of its storage. On the build on
top of v7 of the SAN series, a guest with a partition of a namespace as
disk showed in the LUN list and kept the wipe from running.
[0]: https://lore.proxmox.com/pve-devel/20261118202646.3017286-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20261113030541.1591528-1-t.lamprecht@proxmox.com/
pve-storage:
Thomas Lamprecht (9):
diskmanage: skip SMART queries for NVMe fabric namespaces
nvmeof: add a storage for NVMe over Fabrics subsystems
lvm: allow a volume group on an NVMe over Fabrics namespace
api: scan: add NVMe over Fabrics discovery
pvesm: add a scan command for NVMe over Fabrics
api: scan: san-luns: attribute NVMe namespaces to storage
api: add node-level NVMe over Fabrics status and controller removal
multipath: report the NVMe host NQN of each node
multipath: report NVMe over Fabrics namespaces in the cluster status
ApiChangeLog | 7 +-
debian/control | 1 +
src/PVE/API2/Makefile | 1 +
src/PVE/API2/Multipath.pm | 13 +-
src/PVE/API2/NVMeOF.pm | 182 +++++++++++++
src/PVE/API2/Storage/Scan.pm | 58 ++++-
src/PVE/CLI/pvesm.pm | 13 +
src/PVE/Diskmanage.pm | 22 +-
src/PVE/Makefile | 1 +
src/PVE/Multipath/Status.pm | 63 ++++-
src/PVE/NVMeOF.pm | 380 ++++++++++++++++++++++++++++
src/PVE/Storage.pm | 2 +
src/PVE/Storage/LVMPlugin.pm | 3 +-
src/PVE/Storage/Makefile | 1 +
src/PVE/Storage/NVMeOFPlugin.pm | 223 ++++++++++++++++
src/PVE/Storage/Plugin.pm | 2 +-
src/PVE/Storage/SAN.pm | 29 ++-
src/test/Makefile | 7 +-
src/test/disklist_test.pm | 14 +
src/test/run_multipath_api_tests.pl | 107 +++++++-
src/test/run_nvmeof_api_tests.pl | 178 +++++++++++++
src/test/run_nvmeof_taint_tests.pl | 65 +++++
src/test/run_nvmeof_tests.pl | 375 +++++++++++++++++++++++++++
src/test/run_san_lun_scan_tests.pl | 28 ++
src/test/run_san_nvme_tests.pl | 33 +++
25 files changed, 1770 insertions(+), 38 deletions(-)
pve-docs:
Thomas Lamprecht (1):
storage: document NVMe over Fabrics storages
pve-storage-multipath.adoc | 4 +-
pve-storage-nvmeof.adoc | 167 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 20 +++--
3 files changed, 183 insertions(+), 8 deletions(-)
pve-manager:
Thomas Lamprecht (7):
api: nodes: mount the NVMe over Fabrics endpoints
ui: storage: add NVMe over Fabrics storage
ui: lvm: offer NVMe over Fabrics storages as base storage
ui: dc: san: add a guided setup for shared LVM on NVMe over Fabrics
ui: node: san: list NVMe over Fabrics controllers
ui: dc: san: show the NVMe host NQN of each node
ui: dc: san: show that a namespace uses native multipath
PVE/API2/Nodes.pm | 7 +
www/manager6/Makefile | 4 +-
www/manager6/SANUtils.js | 6 +
www/manager6/Utils.js | 7 +
www/manager6/dc/SAN.js | 41 +++--
www/manager6/dc/StorageView.js | 5 +-
www/manager6/node/Config.js | 9 +-
www/manager6/node/NVMeOFControllers.js | 115 +++++++++++++
www/manager6/storage/IScsiEdit.js | 5 +-
www/manager6/storage/LVMEdit.js | 12 +-
www/manager6/storage/NVMeOFEdit.js | 140 ++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 34 ++--
www/manager6/storage/wizard/NodeIdentities.js | 45 +++---
.../storage/wizard/{IScsi.js => Target.js} | 153 ++++++++++++------
www/manager6/storage/wizard/Wizard.js | 43 ++---
www/manager6/window/SANLunState.js | 23 ++-
16 files changed, 529 insertions(+), 120 deletions(-)
^ permalink raw reply [relevance 9%]
* superseded: [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
2026-11-18 6:52 13% [PATCH v6 cluster,storage,docs,manager 00/42] " Thomas Lamprecht
` (2 preceding siblings ...)
2026-11-18 6:52 20% ` [PATCH v6 manager 39/42] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
@ 2026-11-18 20:28 9% ` Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 20:28 UTC (permalink / raw)
To: pve-devel
superseded-by: https://lore.proxmox.com/pve-devel/20261118202646.3017286-1-t.lamprecht@proxmox.com
^ permalink raw reply [relevance 9%]
* [PATCH v7 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI
2026-11-18 20:25 13% [PATCH v7 cluster,storage,docs,manager 00/43] " Thomas Lamprecht
2026-11-18 20:26 18% ` [PATCH v7 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
@ 2026-11-18 20:26 15% ` Thomas Lamprecht
2026-11-18 20:26 20% ` [PATCH v7 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-19 19:49 9% ` superseded: [PATCH v7 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 20:26 UTC (permalink / raw)
To: pve-devel
Shared LVM on an iSCSI LUN needs an iSCSI storage with multipath, the
right LUN as base volume and an LVM storage on top, in that order. Add a
guided setup for it to the SAN view: connect to the target, with the
initiator names of the nodes at hand for the access rules of the array,
select a LUN, name the volume group and storage, and confirm.
The setup starts from the SAN view and not from Datacenter > Storage >
Add, as it creates a volume group and up to two storages, while an entry
of the Add menu attaches one storage. Its menu is named Guided Setup, as
in the documentation, so that it is not taken for an Add menu or button.
Continuing from the target step creates or reuses the connection storage
before the confirm step, so the target step says so.
The menu needs Datastore.Allocate. It also needs Datastore.Audit or
Datastore.AllocateSpace, as the setup reads the storage list and the
LUNs of the connection storage.
The LUN list comes from the node serving the web UI, and offers the LUNs
of the connection storage, also one that the node reaches through
several targets. A LUN that a storage uses cannot be selected, and a
search field finds one by name, WWID or path. If the target is used by
another storage that cannot be reused, the setup names it and says why.
For a shared storage it matters whether the other nodes see the LUN as
well. So the setup ends with the state of the LUN on each node of the
storage, from the cluster-wide status. Nodes set up a new LUN with their
next status updates, so for the first minute a node without the LUN
shows as pending and not as missing.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 5 +
www/manager6/dc/SAN.js | 25 +-
www/manager6/storage/wizard/IScsi.js | 297 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 204 ++++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 94 ++++++
www/manager6/storage/wizard/Wizard.js | 183 +++++++++++
www/manager6/window/SANLunState.js | 115 +++++++
7 files changed, 922 insertions(+), 1 deletion(-)
create mode 100644 www/manager6/storage/wizard/IScsi.js
create mode 100644 www/manager6/storage/wizard/LunSelect.js
create mode 100644 www/manager6/storage/wizard/NodeIdentities.js
create mode 100644 www/manager6/storage/wizard/Wizard.js
create mode 100644 www/manager6/window/SANLunState.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 4a6c8af72..09a02a9c4 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -137,6 +137,7 @@ JSSRC= \
window/Restore.js \
window/SafeDestroyGuest.js \
window/SafeDestroyStorage.js \
+ window/SANLunState.js \
window/SANLunWipe.js \
window/Settings.js \
window/Snapshot.js \
@@ -385,6 +386,10 @@ JSSRC= \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
storage/ESXIEdit.js \
+ storage/wizard/Wizard.js \
+ storage/wizard/LunSelect.js \
+ storage/wizard/NodeIdentities.js \
+ storage/wizard/IScsi.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 12afa65df..72cb96291 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -50,9 +50,15 @@ Ext.define('PVE.dc.SANView', {
initComponent: function () {
let me = this;
- let caps = Ext.state.Manager.get('GuiCap').dc;
+ let allCaps = Ext.state.Manager.get('GuiCap');
+ let caps = allCaps.dc;
let canModify = !!caps['Sys.Modify'];
let canEdit = canModify && !!caps['Sys.Audit'];
+ // the setups also read the storage list and the LUNs of the connection storage
+ let storageCaps = allCaps.storage;
+ let canSetup =
+ !!storageCaps['Datastore.Allocate'] &&
+ !!(storageCaps['Datastore.Audit'] || storageCaps['Datastore.AllocateSpace']);
me.rstore = Ext.create('Proxmox.data.UpdateStore', {
storeid: 'dc-san-status',
model: 'pve-san-status',
@@ -105,6 +111,23 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
+ let setupItem = (wizardType) => ({
+ text: PVE.storage.wizard.subject(wizardType),
+ iconCls: 'fa fa-fw fa-building',
+ handler: () =>
+ Ext.create('PVE.storage.wizard.SAN', {
+ wizardType,
+ autoShow: true,
+ reloadCallback: reload,
+ }),
+ });
+ me.tbar = [
+ {
+ text: gettext('Guided Setup'),
+ disabled: !canSetup,
+ menu: [setupItem('iscsi')],
+ },
+ ];
me.items = [
{
xtype: 'grid',
diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/IScsi.js
new file mode 100644
index 000000000..d23cf3bb2
--- /dev/null
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -0,0 +1,297 @@
+Ext.define('PVE.storage.wizard.IScsiTarget', {
+ extend: 'Proxmox.panel.InputPanel',
+ xtype: 'pveStorageWizardIScsiTarget',
+ onlineHelp: 'storage_open_iscsi',
+
+ updateConnectionField: function () {
+ let me = this;
+ let target = me.down('field[name=target]').getValue();
+ let storage = me.storages?.find(
+ (entry) => entry.type === 'iscsi' && entry.target === target,
+ );
+ let field = me.down('field[name=connection]');
+ if (storage) {
+ field.setValue(storage.storage);
+ } else if (field.readOnly) {
+ field.setValue('');
+ }
+ field.setReadOnly(!!storage);
+ },
+
+ onSubmit: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let values = me.getValues();
+ let params = {
+ type: 'iscsi',
+ storage: values.connection,
+ portal: values.portal,
+ target: values.target,
+ content: 'none',
+ 'managed-multipath': 1,
+ };
+ let nodes = []
+ .concat(values.nodes || [])
+ .filter(Boolean)
+ .join(',');
+ if (nodes) {
+ params.nodes = nodes;
+ }
+ let connected = function (connection) {
+ if (wizard.destroyed) {
+ return;
+ }
+ wizard.connection = connection;
+ // the step does not come back, the cluster status of its initiator names is not needed
+ me.down('pveStorageWizardNodeIdentities').rstore.stopUpdate();
+ let tabs = wizard.down('#wizcontent');
+ wizard.down('#luns').enable();
+ tabs.setActiveTab(wizard.down('#luns'));
+ me.disable();
+ };
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ let users = me.storages.filter((entry) => entry.target === values.target);
+ if (users.length) {
+ let base = users[0];
+ let conflict;
+ if (users.length !== 1) {
+ conflict = Ext.String.format(
+ gettext(
+ 'Storages {0} use this target. The setup can only reuse a target that one storage uses.',
+ ),
+ users.map((entry) => entry.storage).join(', '),
+ );
+ } else if (base.type !== 'iscsi') {
+ conflict = Ext.String.format(
+ gettext(
+ 'Storage "{0}" uses this target. The setup can only reuse an iSCSI storage.',
+ ),
+ base.storage,
+ );
+ } else if (`${base.content ?? ''}` !== 'none') {
+ conflict = Ext.String.format(
+ gettext(
+ 'Storage "{0}" uses the LUNs of this target directly. If no guest uses them, clear Use LUNs directly in its edit dialog, otherwise use another target.',
+ ),
+ base.storage,
+ );
+ }
+ if (conflict) {
+ wizard.showError(Ext.htmlEncode(conflict));
+ return;
+ }
+ if (base.disable) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ let baseNodes = base.nodes ? base.nodes.split(',') : [];
+ if (baseNodes.length && !baseNodes.includes(Proxmox.NodeName)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Connection storage "{0}" is not available on node "{1}". Open the web UI on one of its nodes.',
+ ),
+ base.storage,
+ Proxmox.NodeName,
+ ),
+ ),
+ );
+ return;
+ }
+ let selectedNodes = nodes ? nodes.split(',') : baseNodes;
+ if (
+ baseNodes.length &&
+ selectedNodes.some((node) => !baseNodes.includes(node))
+ ) {
+ wizard.showError(
+ gettext(
+ 'The connection storage is not available on all selected nodes.',
+ ),
+ );
+ return;
+ }
+ let connection = {
+ storage: base.storage,
+ target: base.target,
+ nodes: selectedNodes.join(','),
+ };
+ if (!base['managed-multipath']) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Enable Multipath in the edit dialog of storage "{0}" before using it here.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ connected(connection);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () =>
+ connected({ storage: params.storage, target: params.target, nodes }),
+ });
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ let common = PVE.panel.StorageBase.commonFields(true);
+ // wide enough for the longest label of the step
+ let labelWidth = 150;
+ me.items = [
+ {
+ xtype: 'textfield',
+ name: 'portal',
+ fieldLabel: gettext('Portal'),
+ labelWidth,
+ allowBlank: false,
+ listeners: {
+ change: {
+ buffer: 500,
+ fn: function (field, value) {
+ let target = me.down('field[name=target]');
+ target.setDisabled(!value);
+ target.setValue('');
+ target.setPortal(value);
+ },
+ },
+ },
+ },
+ {
+ xtype: 'pveIScsiScan',
+ name: 'target',
+ fieldLabel: gettext('Target'),
+ labelWidth,
+ disabled: true,
+ showNodeSelector: false,
+ nodename: Proxmox.NodeName,
+ listeners: { change: () => me.updateConnectionField() },
+ listConfig: {
+ width: 650,
+ emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')),
+ columns: [
+ {
+ text: gettext('Target'),
+ dataIndex: 'target',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Portals'),
+ dataIndex: 'portal',
+ width: 220,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ },
+ {
+ ...common.id,
+ name: 'connection',
+ fieldLabel: gettext('Connection Storage'),
+ labelWidth,
+ },
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${Ext.htmlEncode(
+ gettext(
+ 'Next creates or reuses the connection storage before you select a LUN.',
+ ),
+ )}`,
+ },
+ { xtype: 'pveStorageWizardNodeIdentities' },
+ ];
+ me.advancedItems = [
+ {
+ ...common.nodes,
+ labelWidth,
+ validator: PVE.storage.wizard.validateNodes,
+ listeners: {
+ change: (field, value) =>
+ me.down('pveStorageWizardNodeIdentities').setNodes(value),
+ },
+ },
+ ];
+ me.callParent();
+ me.on('afterrender', () =>
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: me,
+ failure: function (response) {
+ if (!me.destroyed) {
+ me.up('window').showError(response.htmlStatus);
+ }
+ },
+ success: function (response) {
+ if (!me.destroyed) {
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ }
+ },
+ }),
+ );
+ },
+});
+
+PVE.storage.wizard.createIScsiLVM = function (wizard, values, lun) {
+ let connection = wizard.connection;
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`,
+ method: 'GET',
+ params: { content: 'images' },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let volume = response.result.data.find((entry) =>
+ entry.volid.endsWith(`.dm-uuid-mpath-${lun.wwid}`),
+ );
+ if (!volume) {
+ wizard.showError(
+ gettext(
+ 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.',
+ ),
+ );
+ return;
+ }
+ wizard.addLVMStorage({ ...values, base: volume.volid }, fail);
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
new file mode 100644
index 000000000..e42779927
--- /dev/null
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -0,0 +1,204 @@
+Ext.define('PVE.storage.wizard.LunSelect', {
+ extend: 'Ext.panel.Panel',
+ xtype: 'pveStorageWizardLunSelect',
+ layout: { type: 'vbox', align: 'stretch' },
+
+ // as an input panel does, so that the wizard shows its help button for this step
+ listeners: {
+ activate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxShowHelp', this.onlineHelp);
+ },
+ deactivate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxHideHelp', this.onlineHelp);
+ },
+ },
+
+ getSelection: function () {
+ return this.down('grid').getSelection()[0]?.data;
+ },
+
+ reload: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let grid = me.down('grid');
+ me.rstore.stopUpdate();
+ let connection = wizard.connection;
+ // The scan names one target per LUN, also for a LUN reached through several. The content
+ // listing has the LUNs of the connection, and a LUN that shows up later is listed once the
+ // scan names the target of the connection for it.
+ let filter = {
+ id: 'connection',
+ filterFn: (rec) =>
+ rec.get('iscsi-target') === connection.target ||
+ (me.connectionWwids ?? []).includes(rec.get('wwid')),
+ };
+ me.store.addFilter(filter);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`,
+ method: 'GET',
+ waitMsgTarget: grid,
+ failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
+ success: function (response) {
+ if (!me.destroyed) {
+ me.connectionWwids = response.result.data
+ .map((entry) => entry.volid.match(/\.dm-uuid-mpath-(.+)$/)?.[1])
+ .filter(Boolean);
+ me.store.addFilter(filter);
+ }
+ },
+ callback: function () {
+ if (!me.destroyed && wizard.down('#wizcontent').getActiveTab() === me) {
+ me.rstore.startUpdate();
+ }
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-luns',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sortAfterUpdate: true,
+ });
+ let inUse = (row) => row['used-by-storage'];
+ let noLunsText = gettext('No LUNs found. Check connections and array access.');
+ let updateSelection = function () {
+ let row = me.getSelection();
+ me.down('#selection').setValue(row && !inUse(row) ? row.wwid : '');
+ };
+ me.items = [
+ {
+ xtype: 'textfield',
+ itemId: 'selection',
+ hidden: true,
+ allowBlank: false,
+ submitValue: false,
+ },
+ {
+ xtype: 'component',
+ cls: 'pmx-hint',
+ margin: '0 0 10 0',
+ html: gettext(
+ 'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store: me.store,
+ emptyText: noLunsText,
+ viewConfig: {
+ enableTextSelection: true,
+ getRowClass: (rec) => (inUse(rec.data) ? 'x-item-disabled' : ''),
+ },
+ listeners: {
+ beforeselect: (sm, rec) => !inUse(rec.data),
+ selectionchange: updateSelection,
+ },
+ columns: [
+ {
+ text: gettext('Name'),
+ dataIndex: 'display-name',
+ flex: 1,
+ minWidth: 260,
+ renderer: Ext.htmlEncode,
+ },
+ { text: 'LUN', dataIndex: 'iscsi-lun', width: 60 },
+ {
+ text: gettext('Model'),
+ dataIndex: 'model',
+ width: 160,
+ renderer: (value, md, rec) =>
+ Ext.htmlEncode([rec.get('vendor'), value].filter(Boolean).join(' ')),
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 140,
+ renderer: PVE.SANUtils.renderLunState,
+ },
+ {
+ text: gettext('Multipath'),
+ dataIndex: 'multipath',
+ width: 170,
+ renderer: PVE.SANUtils.renderSanLunMultipath,
+ },
+ {
+ text: gettext('Used By'),
+ dataIndex: 'used-by',
+ width: 130,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Size'),
+ dataIndex: 'size',
+ width: 100,
+ renderer: Proxmox.Utils.render_size,
+ },
+ {
+ text: gettext('Device'),
+ dataIndex: 'devpath',
+ width: 180,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ tbar: [
+ {
+ text: gettext('Reload'),
+ iconCls: 'fa fa-refresh',
+ handler: () => me.reload(),
+ },
+ '->',
+ {
+ xtype: 'tbtext',
+ html: Ext.htmlEncode(`${gettext('Scan node')}: ${Proxmox.NodeName}`),
+ },
+ ' ',
+ gettext('Search') + ':',
+ ' ',
+ {
+ xtype: 'pveRecordSearchField',
+ emptyText: gettext('Name, WWID, Path'),
+ searchFields: ['name', 'wwid', 'devpath', 'path-search'],
+ listeners: {
+ // no hit for a search is no sign of a connection problem
+ searchchange: function (field, query) {
+ let grid = me.down('grid');
+ if (grid?.rendered) {
+ grid.setEmptyText(
+ query ? gettext('No LUNs match the search.') : noLunsText,
+ );
+ }
+ },
+ },
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
+ me.mon(me.rstore, 'load', updateSelection);
+ me.mon(me.store, 'refresh', () => PVE.SANUtils.deselectHidden(me.down('grid')));
+ let search = me.down('pveRecordSearchField');
+ me.on('activate', function () {
+ search.setTargetStore(me.store);
+ me.reload();
+ });
+ // The setup can update the selected row after this step, which the search must not hide.
+ me.on('deactivate', function () {
+ me.rstore.stopUpdate();
+ search.setTargetStore(null);
+ });
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js
new file mode 100644
index 000000000..a0ef62fee
--- /dev/null
+++ b/www/manager6/storage/wizard/NodeIdentities.js
@@ -0,0 +1,94 @@
+Ext.define('pve-san-node-identity', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'iscsi-initiator-name'],
+});
+
+Ext.define('PVE.storage.wizard.NodeIdentities', {
+ extend: 'Ext.grid.Panel',
+ xtype: 'pveStorageWizardNodeIdentities',
+ height: 220,
+ disableSelection: true,
+ viewConfig: { enableTextSelection: true },
+ columns: [
+ { text: gettext('Node'), dataIndex: 'node', width: 100, renderer: Ext.htmlEncode },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 175,
+ renderer: PVE.SANUtils.renderState,
+ },
+ {
+ text: gettext('Initiator Name'),
+ dataIndex: 'iscsi-initiator-name',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+
+ // Lists only the given nodes, or all nodes for none, which Copy then follows.
+ setNodes: function (nodes) {
+ let me = this;
+ nodes = [].concat(nodes || []).filter(Boolean);
+ if (nodes.length) {
+ me.store.addFilter({ id: 'nodes', filterFn: (rec) => nodes.includes(rec.get('node')) });
+ } else {
+ me.store.removeFilter('nodes');
+ }
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-identities',
+ model: 'pve-san-node-identity',
+ interval: 5000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: (raw) => ({
+ ...raw,
+ data: Object.entries(raw.data.nodes).map(([node, report]) => ({
+ ...report,
+ node,
+ })),
+ }),
+ },
+ },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.tbar = [
+ {
+ xtype: 'tbtext',
+ text: gettext('Allow the initiator names of the nodes that will use the target.'),
+ },
+ '->',
+ {
+ text: gettext('Copy Initiator Names'),
+ iconCls: 'fa fa-clipboard',
+ handler: () =>
+ PVE.Utils.copyToClipboard(
+ me.store
+ .getRange()
+ .map((rec) => rec.get('iscsi-initiator-name'))
+ .filter(Boolean)
+ .join('\n'),
+ ),
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me, me.rstore);
+ me.on('afterrender', () => me.rstore.startUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
new file mode 100644
index 000000000..3b4d4b8eb
--- /dev/null
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -0,0 +1,183 @@
+Ext.ns('PVE.storage.wizard');
+
+PVE.storage.wizard.subject = (type) =>
+ Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+
+PVE.storage.wizard.validateNodes = function () {
+ let nodes = [].concat(this.getValue() || []).filter(Boolean);
+ return (
+ !nodes.length ||
+ nodes.includes(Proxmox.NodeName) ||
+ Ext.String.format(
+ gettext('Must include node "{0}", which sets up the volume group.'),
+ Proxmox.NodeName,
+ )
+ );
+};
+
+Ext.define('PVE.storage.wizard.SAN', {
+ extend: 'PVE.window.Wizard',
+ width: 1050,
+ height: 620,
+
+ showError: function (message) {
+ if (this.destroyed) {
+ return;
+ }
+ this.down('#submit').enable();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
+ volumeSettings: function () {
+ let me = this;
+ let value = (name) => me.down(`field[name=${name}]`).getValue();
+ return {
+ storage: value('storage'),
+ vgname: value('vgname'),
+ 'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
+ nodes: me.connection.nodes,
+ };
+ },
+
+ // Adds the LVM storage with the volume settings as the last request of a setup. Only the node
+ // serving the web UI looked at the LUN, so show its state on the other nodes afterwards.
+ addLVMStorage: function (values, failure) {
+ let me = this;
+ let params = { type: 'lvm', shared: 1, content: 'images,rootdir', ...values };
+ if (!params.nodes) {
+ delete params.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: me,
+ failure,
+ success: function () {
+ // the storage is added, also if the setup got closed in the meantime
+ if (me.destroyed) {
+ return;
+ }
+ let wwid = me.down('#luns').getSelection().wwid;
+ me.close();
+ Ext.create('PVE.window.SANLunState', {
+ wwid,
+ storage: values.storage,
+ nodes: params.nodes,
+ autoShow: true,
+ });
+ },
+ });
+ },
+
+ multipathSummary: function (lun) {
+ // an explicit entry takes precedence, also for a LUN of the connection storage
+ if (lun.multipath === 'manual') {
+ return PVE.SANUtils.multipathText('manual');
+ }
+ return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ },
+
+ updateSummary: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ let rows = [
+ [gettext('Connection Storage'), me.connection.storage],
+ [gettext('Storage ID'), values.storage],
+ [gettext('Volume Group'), values.vgname],
+ ['WWID', lun.wwid],
+ [gettext('Multipath'), me.multipathSummary(lun)],
+ [gettext('Size'), Proxmox.Utils.format_size(lun.size)],
+ [gettext('Nodes'), values.nodes || gettext('All (No restrictions)')],
+ [
+ gettext('Allow Snapshots as Volume-Chain'),
+ Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
+ ],
+ ];
+ me.down('#summary')
+ .getStore()
+ .setData(rows.map(([key, value]) => ({ key, value })));
+ },
+
+ finish: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ me.down('#submit').disable();
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.subject = PVE.storage.wizard.subject(me.wizardType);
+ me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
+ let common = PVE.panel.StorageBase.commonFields(true);
+ let settings = {
+ xtype: 'inputpanel',
+ title: gettext('Volume Group'),
+ onlineHelp: 'storage_multipath',
+ items: [
+ { ...common.id, fieldLabel: gettext('Storage ID') },
+ {
+ xtype: 'textfield',
+ name: 'vgname',
+ fieldLabel: gettext('Volume Group'),
+ allowBlank: false,
+ vtype: 'StorageId',
+ },
+ PVE.panel.StorageBase.volumeChainField(true, 'lvm'),
+ ],
+ };
+ me.items = [
+ { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ {
+ xtype: 'pveStorageWizardLunSelect',
+ title: 'LUN',
+ itemId: 'luns',
+ onlineHelp: 'storage_multipath',
+ },
+ settings,
+ {
+ title: gettext('Confirm'),
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'grid',
+ itemId: 'summary',
+ store: { fields: ['key', 'value'] },
+ columns: [
+ {
+ text: gettext('Setting'),
+ dataIndex: 'key',
+ width: 280,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Value'),
+ dataIndex: 'value',
+ flex: 1,
+ cellWrap: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ ],
+ listeners: { activate: () => me.updateSummary() },
+ onSubmit: () => me.finish(),
+ },
+ ];
+ me.callParent();
+ let tabs = me.down('#wizcontent');
+ tabs.on('tabchange', function (tp, tab) {
+ if (tab === me.down('#luns')) {
+ me.down('#back').disable();
+ }
+ me.down('#submit').setText(
+ tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
+ );
+ });
+ me.down('#submit').setText(gettext('Next'));
+ me.on('destroy', () => me.reloadCallback?.());
+ },
+});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
new file mode 100644
index 000000000..6d5221329
--- /dev/null
+++ b/www/manager6/window/SANLunState.js
@@ -0,0 +1,115 @@
+Ext.define('pve-san-lun-node', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'paths-active', 'paths-total', 'paths-expected'],
+});
+
+// Shows the state of the LUN of a new storage on each of its nodes, from the cluster-wide status.
+Ext.define('PVE.window.SANLunState', {
+ extend: 'Ext.window.Window',
+
+ modal: true,
+ width: 550,
+ height: 400,
+ layout: { type: 'vbox', align: 'stretch' },
+ bodyPadding: 10,
+
+ initComponent: function () {
+ let me = this;
+ if (!me.wwid || !me.storage) {
+ throw 'no LUN or storage specified';
+ }
+ me.title = Ext.String.format(gettext('Storage {0}: LUN State'), me.storage);
+ // The other nodes set up a new LUN with their next status updates.
+ let pendingUntil = Date.now() + 60000;
+ let rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-lun-state',
+ model: 'pve-san-lun-node',
+ interval: 3000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: function (raw) {
+ let lun = raw.data?.luns?.find((entry) => entry.wwid === me.wwid);
+ // other storages or entries of the LUN can expect it on more nodes
+ let wanted = me.nodes?.split(',');
+ let nodes = Object.entries(lun?.nodes ?? {}).filter(
+ ([node]) => !wanted || wanted.includes(node),
+ );
+ return { ...raw, data: nodes.map(([node, state]) => ({ ...state, node })) };
+ },
+ },
+ },
+ });
+ let store = Ext.create('Proxmox.data.DiffStore', {
+ rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.items = [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
+ me.storage,
+ ),
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store,
+ disableSelection: true,
+ emptyText: gettext('No node reported this LUN yet.'),
+ columns: [
+ {
+ text: gettext('Node'),
+ dataIndex: 'node',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ flex: 1,
+ renderer: function (value, metaData, rec) {
+ if (value === 'missing' && Date.now() < pendingUntil) {
+ let tip = gettext(
+ 'Not reported by the node yet; the SAN view shows that as "Missing".',
+ );
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(Ext.htmlEncode(tip))}"`;
+ return `<i class="fa fa-fw fa-spinner fa-pulse"></i> ${Ext.htmlEncode(gettext('Pending'))}`;
+ }
+ return PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ );
+ },
+ },
+ {
+ text: gettext('Active Paths'),
+ dataIndex: 'paths-active',
+ width: 120,
+ renderer: (value, metaData, rec) =>
+ value === undefined
+ ? ''
+ : Ext.htmlEncode(PVE.SANUtils.pathCount(rec.data)),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), rstore);
+ me.on('destroy', function () {
+ store.destroy();
+ rstore.destroy();
+ });
+ rstore.startUpdate();
+ },
+});
^ permalink raw reply related [relevance 15%]
* [PATCH v7 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel
2026-11-18 20:25 13% [PATCH v7 cluster,storage,docs,manager 00/43] " Thomas Lamprecht
2026-11-18 20:26 18% ` [PATCH v7 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-18 20:26 15% ` [PATCH v7 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
@ 2026-11-18 20:26 20% ` Thomas Lamprecht
2026-11-19 19:49 9% ` superseded: [PATCH v7 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 20:26 UTC (permalink / raw)
To: pve-devel
Fibre Channel LUNs show up as block devices on the nodes, without a
storage that connects to them, so Datacenter > Storage > Add has no
dialog to start from. Add a Fibre Channel entry to the guided setup of
the SAN view. The entry offers SCSI LUNs only. An NVMe/FC namespace uses
the native multipath of the kernel and has no storage that connects it,
so the cluster-wide status could not show its state on the nodes.
The setup enables multipath for the LUN if needed, so its menu entry
needs Sys.Modify as well. Then the setup creates the volume group on the
name of the map under /dev/disk/by-id, through the node serving the web
UI, and adds the shared LVM storage itself. The node disk API would add
the storage for all nodes and without the snapshot setting. Before it
changes anything, the setup checks that the storage ID is free, as it
cannot create the volume group a second time.
As the setup adds the storage, it waits for the volume group task on its
own, not in a task window. Closing a task window would end the setup
with a volume group and no storage. For the same reason, the setup
cannot be closed until the wait is over. If the task state cannot be
read for a while, the setup ends and says how to add the storage by
hand, as the task may still succeed and must not be started again.
No storage knows how many paths a node should have to a Fibre Channel
LUN. So a multipath entry that the setup adds expects as many paths as
the map has on the node serving the web UI. A node zoned to fewer
fabrics, or one that lost a path, then shows the LUN as degraded.
Nodes do not scan for a LUN that gets mapped to them after their login
to the array, so the setup points to the rescan of the Fibre Channel
hosts.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/dc/SAN.js | 5 +-
www/manager6/storage/wizard/FibreChannel.js | 187 ++++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 20 +++
www/manager6/storage/wizard/Wizard.js | 131 +++++++++++++-
www/manager6/window/SANLunState.js | 10 +-
6 files changed, 341 insertions(+), 13 deletions(-)
create mode 100644 www/manager6/storage/wizard/FibreChannel.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 09a02a9c4..1644e1d41 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -390,6 +390,7 @@ JSSRC= \
storage/wizard/LunSelect.js \
storage/wizard/NodeIdentities.js \
storage/wizard/IScsi.js \
+ storage/wizard/FibreChannel.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 72cb96291..e9a5e5ccc 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -111,9 +111,10 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
- let setupItem = (wizardType) => ({
+ let setupItem = (wizardType, disabled) => ({
text: PVE.storage.wizard.subject(wizardType),
iconCls: 'fa fa-fw fa-building',
+ disabled,
handler: () =>
Ext.create('PVE.storage.wizard.SAN', {
wizardType,
@@ -125,7 +126,7 @@ Ext.define('PVE.dc.SANView', {
{
text: gettext('Guided Setup'),
disabled: !canSetup,
- menu: [setupItem('iscsi')],
+ menu: [setupItem('iscsi'), setupItem('fc', !canModify)],
},
];
me.items = [
diff --git a/www/manager6/storage/wizard/FibreChannel.js b/www/manager6/storage/wizard/FibreChannel.js
new file mode 100644
index 000000000..c3b688337
--- /dev/null
+++ b/www/manager6/storage/wizard/FibreChannel.js
@@ -0,0 +1,187 @@
+PVE.storage.wizard.createFC = function (wizard, values, lun) {
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ let create = function (row) {
+ if (wizard.destroyed) {
+ return;
+ }
+ // the request starts the task that waitForTask() then waits for, so keep the setup open
+ let keepOpen = () => false;
+ wizard.on('beforeclose', keepOpen);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/disks/lvm`,
+ method: 'POST',
+ params: { name: values.vgname, device: row['by-id'] },
+ waitMsgTarget: wizard,
+ callback: () => wizard.un('beforeclose', keepOpen),
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let recovery = (text) =>
+ Ext.htmlEncode(Ext.String.format(text, values.vgname, values.storage));
+ let addStorage = () =>
+ wizard.addLVMStorage(values, (res) =>
+ wizard.stopWithError(
+ res.htmlStatus +
+ '<br>' +
+ recovery(
+ gettext(
+ 'Volume group "{0}" was created, but adding storage "{1}" failed. Add it under Datacenter > Storage > Add > LVM with Shared enabled and the same nodes and snapshot setting as in the setup.',
+ ),
+ ),
+ ),
+ );
+ let lost = (status) =>
+ wizard.stopWithError(
+ status +
+ '<br>' +
+ recovery(
+ gettext(
+ 'Could not read the task status. The volume group creation task may still be running. Check its log under Node > Task History. If it succeeds, add volume group "{0}" as storage "{1}" under Datacenter > Storage > Add > LVM with Shared enabled and the same nodes and snapshot setting as in the setup.',
+ ),
+ ),
+ );
+ let message = gettext('Creating the volume group...');
+ wizard.waitForTask(response.result.data, message, addStorage, lost);
+ },
+ });
+ };
+ let hasMultipath = (row) => ['manual', 'storage', 'unmanaged'].includes(row.multipath);
+ // the volume group is created on the by-id path of the map, which names the WWID
+ let ready = (row) => hasMultipath(row) && !!row['by-id'];
+ // Fibre Channel has no storage that knows how many paths a node should have, so an entry the
+ // setup adds expects the paths of this node. A node with fewer paths then shows as degraded.
+ // The wizard remembers the entry it added, so that a retry still sets the expected paths before
+ // it creates the volume group.
+ let expectPaths = function (row) {
+ if (!(row['paths-total'] >= 2)) {
+ delete wizard.addedEntry;
+ create(row);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/cluster/multipath/wwid/${encodeURIComponent(lun.wwid)}`,
+ method: 'PUT',
+ params: { 'paths-expected': row['paths-total'] },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () => {
+ delete wizard.addedEntry;
+ create(row);
+ },
+ });
+ };
+ let waitForMap = function () {
+ if (wizard.destroyed) {
+ return;
+ }
+ let store = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-map',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ let timer = Ext.defer(function () {
+ store.destroy();
+ if (!wizard.destroyed) {
+ wizard.setLoading(false);
+ wizard.showError(
+ gettext(
+ 'The multipath map or its name under /dev/disk/by-id did not appear within 90 seconds. Check Node > SAN, then reload the LUN list.',
+ ),
+ );
+ }
+ }, 90000);
+ wizard.on(
+ 'destroy',
+ () => {
+ clearTimeout(timer);
+ if (!store.destroyed) {
+ store.destroy();
+ }
+ },
+ null,
+ { single: true },
+ );
+ wizard.setLoading(gettext('Waiting for the multipath map...'));
+ store.on('load', function (s, records, success, operation) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let row = records?.find((rec) => rec.get('wwid') === lun.wwid)?.data;
+ if (!success || (row && ready(row))) {
+ clearTimeout(timer);
+ store.destroy();
+ wizard.setLoading(false);
+ if (success) {
+ wizard.down('#luns').down('grid').getSelection()[0].set(row);
+ if (wizard.addedEntry === lun.wwid) {
+ expectPaths(row);
+ } else {
+ create(row);
+ }
+ } else {
+ wizard.showError(Proxmox.Utils.getResponseErrorMessage(operation.getError()));
+ }
+ }
+ });
+ store.startUpdate();
+ };
+ let setup = function () {
+ if (ready(lun)) {
+ if (wizard.addedEntry === lun.wwid) {
+ expectPaths(lun);
+ } else {
+ create(lun);
+ }
+ } else if (
+ hasMultipath(lun) ||
+ lun.multipath === 'pending' ||
+ wizard.addedEntry === lun.wwid
+ ) {
+ waitForMap();
+ } else {
+ let params = { wwid: lun.wwid };
+ if (values.nodes) {
+ params.nodes = values.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/cluster/multipath/wwid',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () => {
+ wizard.addedEntry = lun.wwid;
+ waitForMap();
+ },
+ });
+ }
+ };
+ // The storage is added last. Its ID has to be free before anything is created: once the volume
+ // group exists, the setup cannot create it again.
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ if (response.result.data.some((entry) => entry.storage === values.storage)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext('Storage ID "{0}" is already in use. Choose another ID.'),
+ values.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ setup();
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
index e42779927..985131c00 100644
--- a/www/manager6/storage/wizard/LunSelect.js
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -23,6 +23,10 @@ Ext.define('PVE.storage.wizard.LunSelect', {
let grid = me.down('grid');
me.rstore.stopUpdate();
let connection = wizard.connection;
+ if (!connection) {
+ me.rstore.startUpdate();
+ return;
+ }
// The scan names one target per LUN, also for a LUN reached through several. The content
// listing has the LUNs of the connection, and a LUN that shows up later is listed once the
// scan names the target of the connection for it.
@@ -88,6 +92,15 @@ Ext.define('PVE.storage.wizard.LunSelect', {
'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
),
},
+ ...(me.rescanNote
+ ? [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${me.rescanNote}`,
+ },
+ ]
+ : []),
{
xtype: 'grid',
flex: 1,
@@ -189,6 +202,13 @@ Ext.define('PVE.storage.wizard.LunSelect', {
let search = me.down('pveRecordSearchField');
me.on('activate', function () {
search.setTargetStore(me.store);
+ if (me.up('window').wizardType === 'fc') {
+ me.down('gridcolumn[dataIndex=iscsi-lun]').hide();
+ me.store.addFilter({
+ id: 'transport',
+ filterFn: (rec) => ['fc', 'fcoe'].includes(rec.get('transport')),
+ });
+ }
me.reload();
});
// The setup can update the selected row after this step, which the search must not hide.
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
index 3b4d4b8eb..bfcc5a6cb 100644
--- a/www/manager6/storage/wizard/Wizard.js
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -1,7 +1,10 @@
Ext.ns('PVE.storage.wizard');
PVE.storage.wizard.subject = (type) =>
- Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+ Ext.String.format(
+ gettext('LVM on {0}'),
+ type === 'fc' ? gettext('Fibre Channel') : PVE.Utils.format_storage_type(type),
+ );
PVE.storage.wizard.validateNodes = function () {
let nodes = [].concat(this.getValue() || []).filter(Boolean);
@@ -20,6 +23,11 @@ Ext.define('PVE.storage.wizard.SAN', {
width: 1050,
height: 620,
+ stopWithError: function (message) {
+ this.close();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
showError: function (message) {
if (this.destroyed) {
return;
@@ -28,6 +36,65 @@ Ext.define('PVE.storage.wizard.SAN', {
Ext.Msg.alert(gettext('Error'), message);
},
+ // Waits for a task with the setup masked and continues with next() once it succeeded. A task
+ // window of its own could be closed while the task runs, which would end the setup there. The
+ // setup cannot be closed during the wait either, for example with the Escape key.
+ // If the state of the task cannot be read for some time, lost() gets the error: the task may
+ // still be running then, so the setup must not start it again.
+ waitForTask: function (upid, message, next, lost) {
+ let me = this;
+ let task = Proxmox.Utils.parse_task_upid(upid);
+ let failures = 0;
+ let keepOpen = () => false;
+ let done = function (error) {
+ if (me.destroyed) {
+ return;
+ }
+ me.un('beforeclose', keepOpen);
+ me.setLoading(false);
+ if (error === undefined) {
+ next();
+ } else {
+ me.showError(error);
+ }
+ };
+ let poll = function () {
+ if (me.destroyed) {
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${task.node}/tasks/${encodeURIComponent(upid)}/status`,
+ method: 'GET',
+ failure: function (response) {
+ if (me.destroyed) {
+ return;
+ }
+ if (++failures < 5) {
+ Ext.defer(poll, 2000);
+ return;
+ }
+ me.un('beforeclose', keepOpen);
+ me.setLoading(false);
+ lost(response.htmlStatus);
+ },
+ success: function (response) {
+ failures = 0;
+ let { status, exitstatus } = response.result.data;
+ if (status !== 'stopped') {
+ Ext.defer(poll, 1000);
+ return;
+ }
+ let result = Proxmox.Utils.parse_task_status(exitstatus);
+ let failed = result === 'error' || result === 'unknown';
+ done(failed ? Ext.htmlEncode(exitstatus) : undefined);
+ },
+ });
+ };
+ me.on('beforeclose', keepOpen);
+ me.setLoading(message);
+ poll();
+ },
+
volumeSettings: function () {
let me = this;
let value = (name) => me.down(`field[name=${name}]`).getValue();
@@ -35,7 +102,13 @@ Ext.define('PVE.storage.wizard.SAN', {
storage: value('storage'),
vgname: value('vgname'),
'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
- nodes: me.connection.nodes,
+ nodes:
+ me.wizardType === 'fc'
+ ? []
+ .concat(value('nodes') || [])
+ .filter(Boolean)
+ .join(',')
+ : me.connection.nodes,
};
},
@@ -64,6 +137,7 @@ Ext.define('PVE.storage.wizard.SAN', {
wwid,
storage: values.storage,
nodes: params.nodes,
+ fc: me.wizardType === 'fc',
autoShow: true,
});
},
@@ -71,11 +145,18 @@ Ext.define('PVE.storage.wizard.SAN', {
},
multipathSummary: function (lun) {
+ let me = this;
// an explicit entry takes precedence, also for a LUN of the connection storage
if (lun.multipath === 'manual') {
return PVE.SANUtils.multipathText('manual');
}
- return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ if (me.connection) {
+ return PVE.SANUtils.multipathText('storage', me.connection.storage);
+ }
+ // the Fibre Channel setup adds an entry for a LUN without multipath
+ return lun.multipath === 'none'
+ ? gettext('Explicit entry, added by this setup')
+ : PVE.SANUtils.multipathText(lun.multipath, lun['multipath-storage']);
},
updateSummary: function () {
@@ -83,7 +164,6 @@ Ext.define('PVE.storage.wizard.SAN', {
let values = me.volumeSettings();
let lun = me.down('#luns').getSelection();
let rows = [
- [gettext('Connection Storage'), me.connection.storage],
[gettext('Storage ID'), values.storage],
[gettext('Volume Group'), values.vgname],
['WWID', lun.wwid],
@@ -95,6 +175,9 @@ Ext.define('PVE.storage.wizard.SAN', {
Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
],
];
+ if (me.connection) {
+ rows.unshift([gettext('Connection Storage'), me.connection.storage]);
+ }
me.down('#summary')
.getStore()
.setData(rows.map(([key, value]) => ({ key, value })));
@@ -105,11 +188,19 @@ Ext.define('PVE.storage.wizard.SAN', {
let values = me.volumeSettings();
let lun = me.down('#luns').getSelection();
me.down('#submit').disable();
- PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ if (me.wizardType === 'fc') {
+ PVE.storage.wizard.createFC(me, values, lun);
+ } else {
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ }
},
initComponent: function () {
let me = this;
+ if (!['iscsi', 'fc'].includes(me.wizardType)) {
+ throw 'no SAN storage type specified';
+ }
+ let iscsi = me.wizardType === 'iscsi';
me.subject = PVE.storage.wizard.subject(me.wizardType);
me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
let common = PVE.panel.StorageBase.commonFields(true);
@@ -129,13 +220,35 @@ Ext.define('PVE.storage.wizard.SAN', {
PVE.panel.StorageBase.volumeChainField(true, 'lvm'),
],
};
+ if (!iscsi) {
+ settings.advancedItems = [
+ { ...common.nodes, validator: PVE.storage.wizard.validateNodes },
+ ];
+ }
me.items = [
- { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ ...(iscsi
+ ? [
+ {
+ xtype: 'pveStorageWizardIScsiTarget',
+ title: gettext('Target'),
+ itemId: 'target',
+ },
+ ]
+ : []),
{
xtype: 'pveStorageWizardLunSelect',
title: 'LUN',
itemId: 'luns',
onlineHelp: 'storage_multipath',
+ // the nodes only see a newly mapped Fibre Channel LUN after a rescan
+ rescanNote: iscsi
+ ? undefined
+ : Ext.String.format(
+ gettext(
+ 'After mapping a new LUN on the array, rescan the Fibre Channel hosts of each node (<a href="{0}" target="_blank" rel="noopener noreferrer">documentation</a>).',
+ ),
+ Ext.htmlEncode(Proxmox.Utils.get_help_link('storage_multipath')),
+ ),
},
settings,
{
@@ -170,14 +283,16 @@ Ext.define('PVE.storage.wizard.SAN', {
me.callParent();
let tabs = me.down('#wizcontent');
tabs.on('tabchange', function (tp, tab) {
- if (tab === me.down('#luns')) {
+ if (iscsi && tab === me.down('#luns')) {
me.down('#back').disable();
}
me.down('#submit').setText(
tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
);
});
- me.down('#submit').setText(gettext('Next'));
+ if (iscsi) {
+ me.down('#submit').setText(gettext('Next'));
+ }
me.on('destroy', () => me.reloadCallback?.());
},
});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
index 6d5221329..6215f8e57 100644
--- a/www/manager6/window/SANLunState.js
+++ b/www/manager6/window/SANLunState.js
@@ -55,9 +55,13 @@ Ext.define('PVE.window.SANLunState', {
margin: '0 0 10 0',
html: Ext.htmlEncode(
Ext.String.format(
- gettext(
- 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
- ),
+ me.fc
+ ? gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array and rescan its Fibre Channel hosts.',
+ )
+ : gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
me.storage,
),
),
^ permalink raw reply related [relevance 20%]
* [PATCH v7 docs 27/43] storage: document the cluster-wide multipath management
2026-11-18 20:25 13% [PATCH v7 cluster,storage,docs,manager 00/43] " Thomas Lamprecht
@ 2026-11-18 20:26 18% ` Thomas Lamprecht
2026-11-18 20:26 15% ` [PATCH v7 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
` (2 subsequent siblings)
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 20:26 UTC (permalink / raw)
To: pve-devel
Add a chapter for multipath on iSCSI and Fibre Channel SANs, written
around the tasks an admin has: prerequisites, setting up shared LVM
with the guided setup or by hand, adding, growing and removing a LUN,
reading the states during a path failure, array-specific settings and
moving over from a hand-made multipath.conf.
Removing a LUN stays a manual procedure, as Proxmox VE never removes a
WWID or a map by itself, so the chapter spells it out including how to
get out of queued I/O.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 305 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 ++-
6 files changed, 335 insertions(+), 6 deletions(-)
create mode 100644 pve-storage-multipath.adoc
diff --git a/pmxcfs.adoc b/pmxcfs.adoc
index 1128425..2ab3fb3 100644
--- a/pmxcfs.adoc
+++ b/pmxcfs.adoc
@@ -105,6 +105,8 @@ Files
|`ha/manager_status` | JSON-formatted information regarding HA services on the cluster
|`ha/resources.cfg` | Resources managed by high availability, and their current state
|`ha/rules.cfg` | Rules putting constraints on the HA manager's scheduling of HA resources
+|`multipath-overrides.conf` | Hardware-specific multipath settings, in `multipath.conf` format, applied on all nodes
+|`multipath.cfg` | {pve} cluster-wide multipath configuration (LUN entries)
|`nodes/<NAME>/config` | Node-specific configuration
|`nodes/<NAME>/lxc/<VMID>.conf` | VM configuration data for LXC containers
|`nodes/<NAME>/openvz/` | Prior to {pve} 4.0, used for container configuration data (deprecated, removed soon)
diff --git a/pve-storage-iscsi.adoc b/pve-storage-iscsi.adoc
index a02ed46..2dcc196 100644
--- a/pve-storage-iscsi.adoc
+++ b/pve-storage-iscsi.adoc
@@ -23,6 +23,10 @@ resources.
Low-level iscsi management task can be done using the `iscsiadm` tool.
+TIP: To set up shared LVM on a LUN of an iSCSI target, use the guided setup
+under *Datacenter -> Storage -> SAN* in the web UI, see
+xref:storage_multipath_setup[Multipath].
+
Configuration
~~~~~~~~~~~~~
@@ -38,6 +42,13 @@ target::
iSCSI target.
+managed-multipath::
+
+Combine the paths to each LUN of the target into one `dm-multipath` map on every
+node the storage is enabled on, and monitor the maps cluster-wide. A shared LVM
+storage on a target with several portals needs multipath, through this option
+or set up by hand. See xref:storage_multipath[Multipath].
+
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-iscsidirect.adoc b/pve-storage-iscsidirect.adoc
index ae722e8..97b0979 100644
--- a/pve-storage-iscsidirect.adoc
+++ b/pve-storage-iscsidirect.adoc
@@ -21,7 +21,7 @@ Configuration
~~~~~~~~~~~~~
The user mode iSCSI backend uses the same configuration options as the
-Open-iSCSI backend.
+Open-iSCSI backend, except for `managed-multipath`.
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index d85c6f4..d09206b 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -143,6 +143,9 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
+TIP: The guided setup under *Datacenter -> Storage -> SAN* in the web UI creates
+a shared LVM storage on a SAN LUN, see xref:storage_multipath_setup[Multipath].
+
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
devices again, for example with `pvscan --cache`. This command also resets the
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
new file mode 100644
index 0000000..35fb868
--- /dev/null
+++ b/pve-storage-multipath.adoc
@@ -0,0 +1,305 @@
+[[storage_multipath]]
+Multipath
+---------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: Multipath
+endif::wiki[]
+
+Use multipath for shared LVM on an iSCSI or Fibre Channel SAN with redundant
+connections. Device-mapper multipath combines the paths to a LUN into one block
+device, called a map, so I/O can continue when a path fails. Its World Wide
+Identifier (WWID) identifies the same LUN on every node.
+
+{pve} configures maps cluster-wide and shows their state under *Datacenter ->
+Storage -> SAN*. An iSCSI storage with *Multipath* enabled requests maps for its
+LUNs; Fibre Channel LUNs need entries in `/etc/pve/multipath.cfg`. NVMe
+namespaces use kernel-native multipath instead; the procedures below cover SCSI
+LUNs.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before enabling cluster-wide multipath management.
+. Install `multipath-tools` on every participating node. The
+ `libpve-storage-perl` package recommends it, but installations without
+ recommended packages need it added separately. A node without it shows
+ *Multipath unavailable* with the reason under *Datacenter -> Storage -> SAN*.
+ Plain iSCSI and LVM without the multipath option still work without it.
+. Allow each node's iSCSI initiator name on the array; the names are shown under
+ *Datacenter -> Storage -> SAN* and in the guided setup. Install `open-iscsi`
+ if needed.
+ For Fibre Channel, configure zoning and LUN masking for the WWPNs of each
+ node's HBA ports, which `cat /sys/class/fc_host/host*/port_name` lists.
+. Present the same empty LUN to all intended nodes over redundant paths. A node
+ does not scan for a Fibre Channel LUN that is mapped to it later, so rescan
+ the Fibre Channel hosts on each node:
++
+----
+# for host in /sys/class/fc_host/host*; do echo '- - -' > /sys/class/scsi_host/${host##*/}/scan; done
+----
++
+If the LUN still does not show up, check the target ports of the array on the
+node. This lists the WWPN, state and roles of each remote port; those of the
+array need the state `Online` and the role `FCP Target`. A `Blocked` port needs
+its connection restored before a rescan can reach it:
++
+----
+# for port in /sys/class/fc_remote_ports/rport-*; do echo $(cat $port/{port_name,port_state,roles}); done
+----
+
+[[storage_multipath_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~
+
+. Open *Datacenter -> Storage -> SAN* in the web UI on a node that can access
+ the LUN and select *Guided Setup -> LVM on iSCSI* or *LVM on Fibre Channel*.
+. For iSCSI, enter a portal, select the target and name the connection storage.
+ This storage connects to the target with `content none` and *Multipath*
+ enabled, while the LVM storage manages guest disks. Continuing creates or
+ reuses the connection storage before you select a LUN.
+. Select the LUN, choose the storage ID and volume group, then confirm. For
+ Fibre Channel, the setup adds the multipath entry of the LUN if it has none.
+ It then waits for the map on the node serving the web UI and sets *Expected
+ Paths* of that entry to the number of paths of the map, if that is at least
+ two. Existing entries and maps stay as they are; a map that was set up by
+ hand gets no entry, so check that the other nodes have it as well. Set
+ *Expected Paths* in the entry if it is missing or does not match the intended
+ topology, for example because a fabric was down at that time or nodes have
+ different path counts. Leave *Nodes* empty for all nodes, or for all nodes of
+ a reused connection storage. Virtual machines on the storage can only
+ have snapshots with *Allow Snapshots as Volume-Chain*, which applies to
+ disks created after it is set; see xref:pvesm_lvm_config[LVM configuration].
+. Check the state of the LUN on each node of the storage, which the setup
+ shows once the storage is added. Before that, only the node serving the web
+ UI looked at the LUN; the LUN list names it as *Scan node*. The other nodes
+ set the LUN up with their next status updates and show *Pending* during the
+ first minute. For a node that stays *Missing*, check its access to the LUN
+ on the array before placing guests on the storage. *OK (1 path)* means that
+ the node reaches the LUN over a single path. The *State* column of the view
+ shows the same later.
+
+A LUN that a storage uses cannot be selected, and the setup refuses a LUN with
+data it recognizes, such as a partition table, a file system or a volume group.
+To reuse such a LUN, first stop all its users on all hosts and remove its
+storage references, then use *Wipe* under *Node -> SAN* as `root@pam`. This
+destroys its data. Before the setup or the wipe writes to a LUN, the node checks
+for processes that have it open, also through another of its paths, for example
+a guest that uses it as a disk. This does not find every user: not one that
+opened the LUN through another device node, and none on other hosts. A partition
+of a LUN or of its map, selected on its own, only gets the checks of a local
+disk. To keep a volume group that a LUN already holds, do not wipe the LUN: add
+the volume group under *Datacenter -> Storage -> Add -> LVM* with *Shared*
+enabled. The usage shown for a LUN is cached per node, so other nodes can still
+show the old content after a wipe. If setup fails, check the error, the node's
+task log and *Datacenter -> Storage* before retrying; closing the dialog does
+not undo changes.
+
+The dialogs under *Datacenter -> Storage -> Add* can do the same for iSCSI in
+two steps: add an *iSCSI* storage with *Multipath* enabled and *Use LUNs
+directly* cleared, then an *LVM* storage with it as *Base storage* and the LUN
+as *Base volume*. Selecting a base storage enables *Shared*; keep it enabled.
+
+To set up iSCSI by hand, run these commands on a node with access to the target:
+
+----
+# pvesm add iscsi <connection> --portal <portal> --target <iqn> \
+ --content none --managed-multipath 1
+# pvesm list <connection> --content images
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, including the connection storage
+prefix and the `dm-uuid-mpath-<wwid>` suffix. Adding the LVM storage creates the
+volume group. Keep its base volume: it connects the target before LVM
+activation.
+
+For Fibre Channel, add an entry with the number of paths each node should
+have, wait for the scan to show a by-id path with `dm-uuid-mpath-<wwid>`, then
+create the volume group and shared storage:
+
+----
+# pvesh create /cluster/multipath/wwid --wwid <wwid> --paths-expected <paths>
+# pvesm scan san-luns --output-format json
+# pvesh create /nodes/<node>/disks/lvm --name <storage> \
+ --device /dev/disk/by-id/dm-uuid-mpath-<wwid> --add_storage 1
+----
+
+These examples allow all nodes. For a subset, set `--nodes <nodes>`, a
+comma-separated list, on the entry or iSCSI storage and on the LVM storage. For
+Fibre Channel, leave out `--add_storage 1` and then add the storage with `pvesm
+add lvm <storage> --vgname <storage> --shared 1 --nodes <nodes>`. `pvesh` waits
+for the creation task; check its output for errors before using the storage.
+
+Adding Another LUN
+~~~~~~~~~~~~~~~~~~
+
+. Present the new LUN to the same nodes on the array. Enabled iSCSI storages
+ rescan their sessions automatically; for Fibre Channel, rescan the hosts as
+ shown in the prerequisites.
+. Run the guided setup again. For iSCSI, select the same target to reuse its
+ connection storage. If it lacks *Multipath*, enable that option in its edit
+ dialog first, observing the migration advice below.
+. Select the new LUN and create a separate LVM storage. By hand, repeat the
+ iSCSI listing and LVM command above, or the Fibre Channel procedure.
+
+[[storage_multipath_grow]]
+Growing a LUN
+~~~~~~~~~~~~~
+
+. Grow the LUN on the array. Never shrink a LUN in use.
+. Wait for the iSCSI session rescan, or rescan each SCSI path on every Fibre
+ Channel node with `echo 1 > /sys/block/<path>/device/rescan`, where `<path>`
+ is a member device such as `sdc`, not the map.
+. Check the map size on every node with `multipath -ll <wwid>` or under
+ *Node -> SAN*. The generated configuration sets `auto_resize grow_only`:
+ the map grows once all its paths report the new size. If necessary, run
+ `multipathd resize map <map>` after all paths have grown.
+. Run `pvresize /dev/disk/by-id/dm-uuid-mpath-<wwid>` on one node only, after
+ every node's map has grown. A smaller map cannot access the added space.
+
+[[storage_multipath_remove]]
+Removing a LUN
+~~~~~~~~~~~~~~
+
+{pve} never flushes maps or removes WWIDs from `/etc/multipath/wwids`.
+Removing a configuration entry is not enough. A map that queues I/O without
+paths can block guests and LVM commands, so disable queueing before unmapping:
+
+. Stop all users of the LUN on all hosts, or move their data elsewhere. Remove
+ the LVM storage with `pvesm remove <storage>` and deactivate its volume group
+ on every node with `vgchange -an <vg>`. Neither command erases the data.
+. Set an existing entry to fail I/O with
+ `pvesh set /cluster/multipath/wwid/<wwid> --no-path-retry fail`.
+ If none exists, create one with
+ `pvesh create /cluster/multipath/wwid --wwid <wwid> --no-path-retry fail`.
+ Add `--nodes <nodes>` if only a subset of nodes sees the LUN.
+. Wait until `multipath -ll <wwid>` on every participating node no longer lists
+ `queue_if_no_path` in the map's features. Wait for offline nodes to return.
+ Record the map name and member devices, and each member's identifier from
+ `/sys/block/<path>/device/wwid`.
+. Unmap the LUN on the array.
+. On every node, flush the map with `multipath -f <map>`. If it is busy, retry
+ after a few seconds; if it stays busy, find and stop its remaining users. Do
+ not force removal. For each recorded path,
+ check that its identifier is unchanged, then delete it with
+ `echo 1 > /sys/block/<path>/device/delete`. Skip paths already gone; stop if
+ an identifier changed.
+. Remove the explicit entry with `pvesh delete /cluster/multipath/wwid/<wwid>`.
+ Removing it earlier makes the nodes apply the default retry policy of the
+ array again, which can queue I/O on a map that is not flushed yet and block
+ whatever opens it.
+. On every node, wait until its next status update has removed the WWID from
+ `/etc/multipath/conf.d/pve-aliases.conf`, which takes about ten seconds, then
+ run `multipath -w <wwid>` to remove it from the allow-list. Running it before
+ that update can let the update add the WWID again. Check that
+ `grep -c '^/<wwid>/$' /etc/multipath/wwids` prints 0, and again after the
+ next status update.
+
+If the LUN was already unmapped and I/O is stuck, run
+`multipathd disablequeueing map <map>` on each affected node, then continue
+with the removal procedure.
+
+[[storage_multipath_disconnect]]
+Removing an iSCSI connection storage does not log out its sessions. Keep it
+while other LUNs of the target are in use; session maintenance is done with
+`iscsiadm`, not the read-only *Node -> SAN -> iSCSI* view.
+
+Checking Path Failures
+~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> Storage -> SAN* shows node availability, configuration errors
+and LUN states. It lists the LUNs that {pve} manages or uses: those with an
+explicit entry, those of an iSCSI storage with *Multipath* enabled, and those
+that are the base volume of a storage or hold its volume group. Other maps of a
+node, for example the ones of a third-party storage plugin, are only counted
+under *Other Maps*; *Node -> SAN* lists them as well. The volume groups come
+from the hint file of LVM. While LVM has none, for example because it sees
+duplicate PVs, a node cannot tell which of its other maps hold the volume group
+of a storage and leaves them all out. A LUN that is only listed for its volume
+group then shows *Unknown* for that node, or is not listed if no node reports
+it.
+
+The *State* of a LUN is the worst known state among its nodes. For a state other
+than *Optimal*, it names the nodes in that state, unless all nodes are in it.
+Nodes in *Unknown* do not count for it and are listed after it. Hover over it
+for the states and path counts of all nodes. *Multipath* describes how the map
+is managed, not its health: by an explicit entry, by the storage that requests
+it, or *Unmanaged* for a map that {pve} did not set up. Under *Node -> SAN*, a
+degraded or failed LUN shows its usable and expected paths; expand it to inspect
+individual paths. An iSCSI or Fibre Channel LUN without a map has its devices
+as paths, in the state that the kernel reports for each, and nothing fails over
+between them. With a single device and no map requested for it, *Multipath*
+shows *Single path*. *Node -> SAN -> iSCSI* shows targets and sessions.
+
+*Optimal*:: All known paths are usable and no expected path is missing.
+*OK (1 path)*:: The only path is usable, and there is no other path to fail
+over to. The API reports this as `optimal` with one path.
+*Degraded*:: Some paths are unusable or fewer paths exist than expected.
+*Failed*:: No usable path remains; I/O queues or fails according to the retry
+policy.
+*Missing*:: A node with a current report is expected to have the LUN but does
+not.
+*Unknown*:: No usable current observation is available for that node.
+
+During a path failure, inspect the degraded LUN's paths and restore the failed
+connection. The state returns to *Optimal* when the paths recover. Check node
+availability too: unknown observations do not worsen a known LUN state.
+
+The status report of a node is limited to 32 KiB, which is enough for about 180
+listed LUNs with typical names. A node with more reports `too many LUNs to
+report` and no LUNs: those that the configuration expects on it show *Unknown*
+for that node, and LUNs that only this node reports are missing from the list.
+
+An iSCSI storage expects one path per portal. For a Fibre Channel LUN, set
+*Expected Paths* in its multipath entry, as the guided setup does. Without it,
+a node only shows as *Degraded* while its lost paths are still listed.
+Depending on the settings for the array, the kernel removes a path that stays
+down longer than `dev_loss_tmo`, and the map then shows *Optimal* with fewer
+paths, or *OK (1 path)* for the last one.
+
+[[storage_multipath_config]]
+Array Settings and Existing Configurations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Use the built-in device profiles unless the array vendor requires changes.
+*Edit Overrides* under *Datacenter -> Storage -> SAN* edits
+`/etc/pve/multipath-overrides.conf` for all nodes. For example, to set a retry
+count for one array model (replace the vendor and product expressions):
+
+----
+devices {
+ device {
+ vendor "<vendor>"
+ product "<product>"
+ no_path_retry 12
+ }
+}
+----
+
+The generated configuration sets `auto_resize grow_only` for the growing of
+LUNs. `multipath` only has this setting for all maps of a node, so it also
+applies to maps that {pve} does not manage, for example the ones of a
+third-party storage plugin: they grow once all their paths have grown. To keep
+the resize manual on all nodes, add this to the overrides:
+
+----
+defaults {
+ auto_resize never
+}
+----
+
+To move from a hand-made `/etc/multipath.conf`:
+
+. Back up the local configuration on every node. Move shared array settings to
+ the overrides file; add WWID entries under *Datacenter -> Storage -> SAN* for
+ Fibre Channel LUNs or per-LUN aliases and `no-path-retry` settings.
+. Enable *Multipath* on existing iSCSI storages. Keep existing LVM base volumes.
+ Check `multipathd show config` on every node before removing duplicate local
+ settings. Do not edit the generated `/etc/multipath/conf.d/pve-*.conf` files.
+. Wait until *Datacenter -> Storage -> SAN* shows the LUNs of these storages on
+ every node. Then check active volume dependencies with `lsblk` on each node.
+ Enabling multipath does not move active volumes off individual paths. Stop and
+ restart affected guests, or migrate them away and back, before relying on path
+ redundancy. Keep LVM component detection enabled and follow the
+ xref:storage_lvm[shared LVM autoactivation guidance].
diff --git a/pvesm.adoc b/pvesm.adoc
index 07a7917..f7de231 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -96,11 +96,10 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, FibreChannel (FC), or SAS block storage as shared storage in a
-cluster, LVM is used to split the LUN into virtual disks. The
-https://pve.proxmox.com/wiki/Multipath[Multipath Guide] explains how to
-configure it in a cluster, including multipathing which is usually a
-requirement in these scenarios.
+^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
+a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
+reachable over several paths; xref:storage_multipath[Multipath] describes how
+{pve} manages them in a cluster.
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -153,6 +152,11 @@ also useful for local storage types. In this case such local storage
is available on all nodes, but it is physically different and can have
totally different content.
+Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
+on a xref:storage_multipath_setup[SAN LUN], use *Guided Setup* under
+*Datacenter -> Storage -> SAN* instead. It creates the storages that are needed
+and enables multipath for the LUN.
+
Storage Pools
~~~~~~~~~~~~~
@@ -500,6 +504,8 @@ See Also
* link:/wiki/Storage:_iSCSI[Storage: iSCSI]
+* link:/wiki/Storage:_Multipath[Storage: Multipath]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -542,6 +548,8 @@ include::pve-storage-iscsi.adoc[]
include::pve-storage-iscsidirect.adoc[]
+include::pve-storage-multipath.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 18%]
* [PATCH v7 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
@ 2026-11-18 20:25 13% Thomas Lamprecht
2026-11-18 20:26 18% ` [PATCH v7 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
` (3 more replies)
0 siblings, 4 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 20:25 UTC (permalink / raw)
To: pve-devel
This is v7 of the combined and reduced series of the cluster-wide
multipath work [0][1] and Dietmar's RFC for guided remote storage setup
and SAN visibility [2].
v7 is v6 [8] plus what some independent reviews and further lab testing
of v6 turned up, i.e.:
- The checks before a wipe or volume group creation take the members
of a map from the kernel too, not only those whose WWID multipathd
or udev reports, so a guest on such a path or its target is found.
The LUN list names a guest that writes to a partition of a LUN, which
the wipe refused but the list showed as unused.
- The web UI no longer falls back to a device name like /dev/sdX for a
wipe or for the Fibre Channel volume group: a name that passed to
another LUN in between would lead there. A LUN without a name under
/dev/disk/by-id cannot be wiped from the list, which the node refused
anyway, and the Fibre Channel setup waits for that name of the map.
- A drop-in is only replaced if its first line is the generated one,
v6 also took "# Not managed by Proxmox VE", and a node checks all
drop-ins before it changes one. The overrides refuse text after a
'{' and a '}' that is not alone on its line: multipath ignores the
rest of such a line, and with it the sections after it.
- A LUN that a storage requests, but that no node has assembled, shows
as Missing in the SAN view instead of not at all. An LVM base named
after the scsi- link of a LUN is attributed to its storage.
- pvestatd applies the multipath configuration right before the
storage status, so the node and guest status do not wait for it.
- The iSCSI setup offers the LUNs that the connection storage lists,
also one that the scan attributes to another target of the array,
finds a LUN by name, WWID or path, and says which storage blocks the
reuse of a target and why. The initiator names and the window at the
end follow the nodes of the new storage. The Fibre Channel recovery
texts name the volume group and storage ID.
- Enable Multipath under Node > SAN is offered for Fibre Channel LUNs
only, not for an NVMe namespace without native multipath.
- The LUN list names a guest only to users who may see it.
- Smaller ones: the status summary is described as the worst known
state, Expected Paths as the highest of the entry and the portal
counts, the Node > Disks > LVM dialog says that Add Storage on a SAN
LUN creates a shared storage for all nodes, error messages name what
to use instead, and the chapter says what a reader of a LUN and a
kernel partition of it mean for the checks.
What I left as is: findings that repeat points decided for v5 [3],
except the first-target filter of the iSCSI setup, which the content
listing now makes cheap to fix, and master's behavior, such as a kernel
partition of a LUN that is selected on its own, which the chapter now
mentions. wipefs on the claimed device does not re-read the partition
table, but udev does once the wipe closes the device, as the lab showed.
Overview of what an admin gets with this:
- Datacenter > Storage > SAN, a new entry below Storage, shows the
multipath state of every node and of the LUNs that Proxmox VE
manages or has a storage on, and edits the multipath entries and
array-specific overrides. I explicitly chose this over the
client/plugin side of Storage, as we do not have e.g. Ceph or
ZFS/LVM/... creation in there either. We might want to rethink and
consolidate our storage interface vs. management story in the
future, but IMO a partial switch now is not worth it, that would add
even more potential for confusion than the new SAN view.
- Its Guided Setup menu leads through shared LVM on a LUN: for iSCSI it
connects or reuses a target, with the initiator names of its nodes at
hand, for Fibre Channel it takes a LUN the nodes already see. Both
set up multipath and end with the state of the LUN on every node.
- Datacenter > Storage > Add keeps its dialogs. The iSCSI one gets a
Multipath option and the LVM one enables Shared for a base storage,
and both point to the SAN view.
- Node > SAN lists the LUNs of a node with their paths and usage, can
wipe a LUN that no storage uses, and shows the iSCSI sessions.
The rules the series follows since v4: nodes add WWIDs and maps but
never remove them, a write is checked where it happens, lists do not
probe devices, there are no new iSCSI operations, the guided setup makes
the API calls an admin would make by hand, and multipath management is
turned on by the admin. The v4 cover [7] has the reasons.
Two things an admin will likely miss: there is no notification when a
LUN loses path redundancy, the state only shows on the SAN pages and in
the API. And Fibre Channel starts at a LUN the nodes already see; the
chapter gives the commands to list WWPNs and rescan the HBAs.
How it works:
- /etc/pve/multipath.cfg holds explicit entries per WWID,
/etc/pve/multipath-overrides.conf array settings; patch 01
registers both. An iSCSI storage with the 'managed-multipath' option
supplies its LUNs without entries. The option is not named
'multipath', as third-party plugins use that name, and the storage
layer leaves out a third-party plugin that declares a property of
another plugin.
- pvestatd calls one function of pve-storage per pass. It adds the
WWIDs the node needs to /etc/multipath/wwids, writes the drop-ins
/etc/multipath/conf.d/pve-*.conf, reloads multipathd after a change,
and publishes the state of the maps that Proxmox VE manages or that a
storage builds on through the node key-value store.
- /cluster/multipath/status aggregates these reports;
/cluster/multipath/{wwid,overrides} edit the two files;
/nodes/{node}/scan/san-luns lists the LUNs of a node and
/nodes/{node}/iscsi its sessions.
- The volumes of an iSCSI storage with the option are named after the
multipath map, so an LVM storage uses them through 'base' as before.
- Volume group creation and wipe run under a cluster lock per LUN. They
refuse a LUN that a storage uses or a process of the node has open,
also through another path. Opens through another device node, such as
one of a container, and users on other hosts are not seen.
Patches:
- cluster 01: register the two configuration files
- storage 02-26: helpers for the disk and iSCSI session inventory
(mostly Dietmar's), the multipath library and configuration, the
iSCSI option, the per-node apply and status with their API, the disk
list of many disks, the LUN inventory, the read-only iSCSI status and
the portal of an iSCSI path, volume groups on LUNs, the wipe and the
process that has a LUN open
- docs 27-28: the multipath chapter, rewritten around tasks, and the
paragraph for a LUN that a process has open
- manager 29-43: the pvestatd call, report and API mounts, then the
views, the two dialog changes, the two guided setups, the note in the
add dialogs, and the guest or process and the target of a LUN
Other changes since v6 [8]:
- rebased onto current master; for pve-manager and pve-docs that has a
commit each that ends the technology preview status of snapshots as
volume chains, as they are ready for production use. The guided
setup and the chapter no longer call them a technology preview
either
- the node list of Datacenter > Storage > SAN links each node to its
Node > SAN view, like the content of a storage links a volume to its
guest
- Blockbridge tested v6 with their storage plugin, which runs its own
sessions, thanks! From that: Node > SAN shows a LUN without a
multipath map with its devices as paths, in the state that the kernel
reports for each, so a LUN with a single path also shows whether it
is up. Its Multipath column says Single path for one device, and an
iSCSI path names the portal of its session. The target column also
shows the subsystem of an NVMe namespace, and the LUN lists sort by
the names and uses they show
- the Wipe button under Node > SAN sits apart from the other buttons,
and its dialog also asks to confirm that no other host uses the LUN,
as the checks before the wipe only see such a use through a storage
- the subject of patch 3 spells NVMe over Fabrics like the rest
When applying, versioned dependencies have to be set: pve-manager on
libpve-storage-perl, and libpve-storage-perl (also as build dependency)
on the libpve-cluster-perl with patch 01, as PVE::Storage
registers the two files when it is loaded. pve-cluster with the same
patch keeps the version counters of the two files; with an older pmxcfs
they are read and parsed again on every request. pve-manager also needs
the pve-doc-generator (build) and pve-docs with the multipath chapter,
for its help links. If the bound for LVM status commands [4] gets
applied too, whichever is applied second has to pass the status cache to
the two lvm_vgs() calls of the base volume activation, as they can block
a status pass otherwise. Both mark the cache of the status update with
'status_only', in the same line.
The per-node target and portal series [5][6] are independent of this
one. It takes the LUNs of an iSCSI storage from the sessions of its one
target, so if a storage can have several targets per node, whichever is
applied second has to cover that.
I tested v7 on the lab of v4 [7] to v6, upgraded from the v6 build,
with the NVMe over Fabrics series and [4] on top. The checks of the
fixes ran there: a drop-in with a near-match first line stayed and the
node reported the conflict without touching another file, overrides
on one line were refused, a guest with a partition of an NVMe/TCP
namespace as disk showed in the LUN list and kept the wipe from running,
a storage administrator without VM.Audit got the process but not the
guest, and the button states under Node > SAN were as described. The
iSCSI setup ran on the NetApp with a search, two of six nodes and the
reuse of the connection storage, the target conflict with two storages,
and the Fibre Channel setup with a new entry, once to the end and once
with the task status lost. The link of a node in the SAN view and the
storage dialogs and setup without the technology preview hint I checked
on the final build. A node logged in to an iSCSI target without a map,
as a plugin with its own sessions does, showed OK (1 path) and Single
path, then Failed with the path blocked when its portal was cut, and
with a second portal Optimal and Degraded; the LUN list took 0.6 s
during the cut. The partition lookup of the LUN list costs about 34 us
per device, so 0.1 s for 1000 LUNs with two paths. I looked at each
changed view and dialog. For the rest, the tests of v6 [8] still apply;
I did not repeat the guest, path cut of maps and scale tests.
[0]: https://lore.proxmox.com/pve-devel/20260626121000.2095591-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20260703124707.1172980-2-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20260731102156.3947857-1-dietmar@proxmox.com/
[3]: https://lore.proxmox.com/pve-devel/20261116012355.3187417-1-t.lamprecht@proxmox.com/
[4]: https://lore.proxmox.com/pve-devel/20261111015217.941220-1-t.lamprecht@proxmox.com/
[5]: https://lore.proxmox.com/pve-devel/20260430173220.441001-1-m.limbeck@proxmox.com/
[6]: https://lore.proxmox.com/pve-devel/20260804090819.2136483-1-dietmar@proxmox.com/
[7]: https://lore.proxmox.com/pve-devel/20261113030146.1559030-1-t.lamprecht@proxmox.com/
[8]: https://lore.proxmox.com/pve-devel/20261118065302.3033937-1-t.lamprecht@proxmox.com/
pve-cluster:
Thomas Lamprecht (1):
cfs: observe the multipath configuration files
src/PVE/Cluster.pm | 2 ++
src/pmxcfs/status.c | 2 ++
2 files changed, 4 insertions(+)
pve-storage:
Dietmar Maurer (8):
diskmanage: collect disk transport type from lsblk
diskmanage: qualify NVMe over Fabrics transport
diskmanage: optionally include iSCSI session devices in disk enumeration
diskmanage: collect native NVMe multipath path state
iscsi: factor out session device map from device list
diskmanage: add helper to list multipath devices
pvesm: expose the SAN LUN inventory
api: add node-level iSCSI status
Thomas Lamprecht (17):
multipath: add a library around multipathd
multipath: add a cluster-wide configuration
iscsi: add an option to manage storage LUNs with multipath
lvm: activate a missing base volume before using the volume group
multipath: apply the configuration on every node
multipath: publish per-node status
api: add endpoints for the cluster-wide multipath configuration
api: multipath: add the cluster-wide health status
diskmanage: look up the requested disks by name
diskmanage: read the udev data of all disks with one call
api: scan: add a SAN LUN inventory
api: scan: name the portal of an iSCSI path
disks: lvm: drop unused imports
disks: lvm: allow volume groups on SAN LUNs and multipath maps
disks: lvm: refuse to destroy the volume group of a shared storage
disks: allow wiping a SAN LUN that no storage uses
api: scan: report the process that has a SAN LUN open
debian/control | 3 +-
src/PVE/API2/Disks.pm | 46 +-
src/PVE/API2/Disks/LVM.pm | 80 ++-
src/PVE/API2/ISCSI.pm | 166 +++++
src/PVE/API2/Makefile | 2 +
src/PVE/API2/Multipath.pm | 451 ++++++++++++++
src/PVE/API2/Storage/Scan.pm | 244 ++++++++
src/PVE/CLI/pvesm.pm | 15 +
src/PVE/Diskmanage.pm | 383 ++++++++++--
src/PVE/ISCSI/Topology.pm | 89 +++
src/PVE/Makefile | 6 +
src/PVE/Multipath.pm | 213 +++++++
src/PVE/Multipath/Config.pm | 209 +++++++
src/PVE/Multipath/Generator.pm | 128 ++++
src/PVE/Multipath/Identity.pm | 44 ++
src/PVE/Multipath/Status.pm | 228 +++++++
src/PVE/Storage.pm | 2 +-
src/PVE/Storage/ISCSIPlugin.pm | 219 ++++---
src/PVE/Storage/LVMPlugin.pm | 156 ++++-
src/PVE/Storage/Makefile | 3 +-
src/PVE/Storage/SAN.pm | 457 ++++++++++++++
src/test/Makefile | 37 +-
src/test/disk_api_test.pm | 314 ++++++++++
src/test/disk_tests/iscsi/disklist | 1 +
.../disk_tests/iscsi/disklist_expected.json | 19 +
src/test/disk_tests/iscsi/lsblk | 5 +
src/test/disk_tests/iscsi/sda/device/model | 1 +
src/test/disk_tests/iscsi/sda/device/vendor | 1 +
.../disk_tests/iscsi/sda/queue/rotational | 1 +
src/test/disk_tests/iscsi/sda/size | 1 +
src/test/disk_tests/iscsi/sda_udevadm | 21 +
src/test/disk_tests/multipath/disklist | 11 +
.../multipath/disklist_expected.json | 107 ++++
src/test/disk_tests/multipath/dm-0/dm/name | 1 +
src/test/disk_tests/multipath/dm-0/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-0/size | 1 +
src/test/disk_tests/multipath/dm-0_slaves | 4 +
src/test/disk_tests/multipath/dm-1/dm/name | 1 +
src/test/disk_tests/multipath/dm-1/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-1/size | 1 +
src/test/disk_tests/multipath/dm-1_slaves | 4 +
src/test/disk_tests/multipath/dm-2/dm/name | 1 +
src/test/disk_tests/multipath/dm-2/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-2/size | 1 +
src/test/disk_tests/multipath/dm-2_slaves | 0
src/test/disk_tests/multipath/dm-3/dm/name | 1 +
src/test/disk_tests/multipath/dm-3/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-3/size | 1 +
src/test/disk_tests/multipath/dm-3_slaves | 0
src/test/disk_tests/multipath/dm-4/dm/name | 1 +
src/test/disk_tests/multipath/dm-4/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-4/size | 1 +
src/test/disk_tests/multipath/dm-4_slaves | 0
src/test/disk_tests/multipath/lsblk | 77 +++
src/test/disk_tests/multipath/lvs | 0
src/test/disk_tests/multipath/mounts | 1 +
.../multipath/multipath_expected.json | 59 ++
src/test/disk_tests/multipath/multipathd | 124 ++++
.../multipath/multipathd_status_expected.json | 40 ++
.../nvme-subsystem/nvme-subsys0/nvme3/address | 1 +
.../nvme-subsys0/nvme3/nvme2c3n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme3/state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/address | 1 +
.../nvme-subsys0/nvme4/nvme2c4n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/state | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/address | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/state | 1 +
.../disk_tests/multipath/nvme8n1/device/model | 1 +
.../multipath/nvme8n1/device/transport | 1 +
.../multipath/nvme8n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme8n1/size | 1 +
src/test/disk_tests/multipath/nvme8n1_udevadm | 14 +
.../disk_tests/multipath/nvme9n1/device/model | 1 +
.../multipath/nvme9n1/device/nvme5/transport | 1 +
.../multipath/nvme9n1/device/vendor | 1 +
.../multipath/nvme9n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme9n1/size | 1 +
src/test/disk_tests/multipath/nvme9n1_udevadm | 12 +
.../multipath/nvme_path_status_expected.json | 19 +
src/test/disk_tests/multipath/partlist | 0
src/test/disk_tests/multipath/pvs | 1 +
.../disk_tests/multipath/sda/device/model | 1 +
.../disk_tests/multipath/sda/device/vendor | 1 +
.../disk_tests/multipath/sda/holders/holder | 1 +
.../disk_tests/multipath/sda/queue/rotational | 1 +
src/test/disk_tests/multipath/sda/size | 1 +
src/test/disk_tests/multipath/sda_udevadm | 18 +
.../disk_tests/multipath/sdb/device/model | 1 +
.../disk_tests/multipath/sdb/device/vendor | 1 +
.../disk_tests/multipath/sdb/holders/holder | 1 +
.../disk_tests/multipath/sdb/queue/rotational | 1 +
src/test/disk_tests/multipath/sdb/size | 1 +
src/test/disk_tests/multipath/sdb_udevadm | 18 +
.../disk_tests/multipath/sdc/device/model | 1 +
.../disk_tests/multipath/sdc/device/vendor | 1 +
.../disk_tests/multipath/sdc/holders/holder | 1 +
.../disk_tests/multipath/sdc/queue/rotational | 1 +
src/test/disk_tests/multipath/sdc/size | 1 +
src/test/disk_tests/multipath/sdc_udevadm | 18 +
.../disk_tests/multipath/sdd/device/model | 1 +
.../disk_tests/multipath/sdd/device/vendor | 1 +
.../disk_tests/multipath/sdd/holders/holder | 1 +
.../disk_tests/multipath/sdd/queue/rotational | 1 +
src/test/disk_tests/multipath/sdd/size | 1 +
src/test/disk_tests/multipath/sdd_udevadm | 18 +
src/test/disk_tests/multipath/zpool | 1 +
.../disk_tests/sas/disklist_expected.json | 1 +
src/test/disk_tests/sas/lsblk | 5 +
src/test/disklist_test.pm | 179 +++++-
src/test/multipath-three-states.json | 52 ++
src/test/plugin_properties_test.pm | 1 +
src/test/run_disk_api_tests.pl | 11 +
src/test/run_iscsi_activation_tests.pl | 109 ++++
src/test/run_lun_identity_tests.pl | 57 ++
src/test/run_multipath_api_tests.pl | 584 ++++++++++++++++++
src/test/run_multipath_tests.pl | 175 ++++++
src/test/run_san_api_tests.pl | 124 ++++
src/test/run_san_library_tests.pl | 135 ++++
src/test/run_san_lun_scan_tests.pl | 334 ++++++++++
src/test/run_san_nvme_tests.pl | 120 ++++
src/test/run_san_taint_tests.pl | 60 ++
src/test/run_san_wipe_tests.pl | 271 ++++++++
src/test/run_san_write_check_tests.pl | 219 +++++++
src/test/run_test_lvm_base_activation.pl | 121 ++++
src/test/run_test_lvm_base_volume.pl | 16 +-
src/test/run_test_lvm_create.pl | 46 ++
126 files changed, 6566 insertions(+), 197 deletions(-)
pve-docs:
Thomas Lamprecht (2):
storage: document the cluster-wide multipath management
storage: multipath: describe the use shown for an open LUN
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 313 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 +-
6 files changed, 343 insertions(+), 6 deletions(-)
pve-manager:
Dietmar Maurer (2):
api: nodes: expose the iSCSI status
ui: node: san: show iSCSI targets and sessions
Thomas Lamprecht (13):
pvestatd: apply the multipath configuration and report the node status
report: add the managed multipath configuration
api: cluster: add the multipath endpoints
ui: dc: add a SAN view
ui: storage: iscsi: add the multipath option
ui: lvm: enable shared when a base storage is selected
ui: node: add SAN LUNs panel
ui: node: san: wipe a LUN that no storage uses
ui: dc: san: add a guided setup for shared LVM on iSCSI
ui: dc: san: add a guided setup for shared LVM on Fibre Channel
ui: storage: point the iSCSI and LVM add dialogs to the SAN view
ui: san: show the guest or process that has a LUN open
ui: node: san: add a column for the target or subsystem of a LUN
PVE/API2/Cluster.pm | 7 +
PVE/API2/Nodes.pm | 7 +
PVE/Report.pm | 3 +
PVE/Service/pvestatd.pm | 7 +
www/manager6/Makefile | 12 +
www/manager6/SANUtils.js | 232 ++++++++++
www/manager6/Utils.js | 19 +
www/manager6/dc/Config.js | 23 +-
www/manager6/dc/MultipathWwidEdit.js | 81 ++++
www/manager6/dc/SAN.js | 400 ++++++++++++++++++
www/manager6/node/Config.js | 24 ++
www/manager6/node/ISCSITargets.js | 150 +++++++
www/manager6/node/LVM.js | 5 +
www/manager6/node/SANLuns.js | 233 ++++++++++
www/manager6/storage/Base.js | 5 +
www/manager6/storage/IScsiEdit.js | 46 ++
www/manager6/storage/LVMEdit.js | 6 +
www/manager6/storage/wizard/FibreChannel.js | 187 ++++++++
www/manager6/storage/wizard/IScsi.js | 297 +++++++++++++
www/manager6/storage/wizard/LunSelect.js | 224 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 94 ++++
www/manager6/storage/wizard/Wizard.js | 298 +++++++++++++
www/manager6/window/SANLunState.js | 119 ++++++
www/manager6/window/SANLunWipe.js | 64 +++
24 files changed, 2537 insertions(+), 6 deletions(-)
^ permalink raw reply [relevance 13%]
* superseded: [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
2026-11-16 1:23 13% [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
` (2 preceding siblings ...)
2026-11-16 1:23 18% ` [PATCH v5 manager 35/36] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
@ 2026-11-18 8:11 9% ` Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 8:11 UTC (permalink / raw)
To: pve-devel
Superseded-by: https://lore.proxmox.com/pve-devel/20261118065302.3033937-1-t.lamprecht@proxmox.com/
^ permalink raw reply [relevance 9%]
* [PATCH v6 manager 38/42] ui: dc: san: add a guided setup for shared LVM on iSCSI
2026-11-18 6:52 13% [PATCH v6 cluster,storage,docs,manager 00/42] " Thomas Lamprecht
2026-11-18 6:52 18% ` [PATCH v6 docs 26/42] storage: document the cluster-wide multipath management Thomas Lamprecht
@ 2026-11-18 6:52 15% ` Thomas Lamprecht
2026-11-18 6:52 20% ` [PATCH v6 manager 39/42] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-18 20:28 9% ` superseded: [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 6:52 UTC (permalink / raw)
To: pve-devel
Shared LVM on an iSCSI LUN needs an iSCSI storage with multipath, the
right LUN as base volume and an LVM storage on top, in that order. Add a
guided setup for it to the SAN view: connect to the target, with the
initiator names of all nodes at hand for the access rules of the array,
select a LUN, name the volume group and storage, and confirm.
The setup starts from the SAN view and not from Datacenter > Storage >
Add, as it creates a volume group and up to two storages, while an entry
of the Add menu attaches one storage. Its menu is named Guided Setup, as
in the documentation, so that it is not taken for an Add menu or button.
Continuing from the target step creates or reuses the connection storage
before the confirm step, so the target step says so.
The menu needs Datastore.Allocate. It also needs Datastore.Audit or
Datastore.AllocateSpace, as the setup reads the storage list and the
LUNs of the connection storage.
The LUN list comes from the node serving the web UI, and a LUN that a
storage uses cannot be selected. For a shared storage it matters whether
the other nodes see the LUN as well. So the setup ends with the state of
the LUN on each node of the storage, from the cluster-wide status. Nodes
set up a new LUN with their next status updates, so for the first minute
a node without the LUN shows as pending and not as missing.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 5 +
www/manager6/dc/SAN.js | 25 +-
www/manager6/storage/wizard/IScsi.js | 274 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 156 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 ++++++
www/manager6/storage/wizard/Wizard.js | 184 ++++++++++++
www/manager6/window/SANLunState.js | 111 +++++++
7 files changed, 837 insertions(+), 1 deletion(-)
create mode 100644 www/manager6/storage/wizard/IScsi.js
create mode 100644 www/manager6/storage/wizard/LunSelect.js
create mode 100644 www/manager6/storage/wizard/NodeIdentities.js
create mode 100644 www/manager6/storage/wizard/Wizard.js
create mode 100644 www/manager6/window/SANLunState.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 4a6c8af72..09a02a9c4 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -137,6 +137,7 @@ JSSRC= \
window/Restore.js \
window/SafeDestroyGuest.js \
window/SafeDestroyStorage.js \
+ window/SANLunState.js \
window/SANLunWipe.js \
window/Settings.js \
window/Snapshot.js \
@@ -385,6 +386,10 @@ JSSRC= \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
storage/ESXIEdit.js \
+ storage/wizard/Wizard.js \
+ storage/wizard/LunSelect.js \
+ storage/wizard/NodeIdentities.js \
+ storage/wizard/IScsi.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index e8d3614f2..9255d2f6a 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -50,9 +50,15 @@ Ext.define('PVE.dc.SANView', {
initComponent: function () {
let me = this;
- let caps = Ext.state.Manager.get('GuiCap').dc;
+ let allCaps = Ext.state.Manager.get('GuiCap');
+ let caps = allCaps.dc;
let canModify = !!caps['Sys.Modify'];
let canEdit = canModify && !!caps['Sys.Audit'];
+ // the setups also read the storage list and the LUNs of the connection storage
+ let storageCaps = allCaps.storage;
+ let canSetup =
+ !!storageCaps['Datastore.Allocate'] &&
+ !!(storageCaps['Datastore.Audit'] || storageCaps['Datastore.AllocateSpace']);
me.rstore = Ext.create('Proxmox.data.UpdateStore', {
storeid: 'dc-san-status',
model: 'pve-san-status',
@@ -105,6 +111,23 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
+ let setupItem = (wizardType) => ({
+ text: PVE.storage.wizard.subject(wizardType),
+ iconCls: 'fa fa-fw fa-building',
+ handler: () =>
+ Ext.create('PVE.storage.wizard.SAN', {
+ wizardType,
+ autoShow: true,
+ reloadCallback: reload,
+ }),
+ });
+ me.tbar = [
+ {
+ text: gettext('Guided Setup'),
+ disabled: !canSetup,
+ menu: [setupItem('iscsi')],
+ },
+ ];
me.items = [
{
xtype: 'grid',
diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/IScsi.js
new file mode 100644
index 000000000..94d914092
--- /dev/null
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -0,0 +1,274 @@
+Ext.define('PVE.storage.wizard.IScsiTarget', {
+ extend: 'Proxmox.panel.InputPanel',
+ xtype: 'pveStorageWizardIScsiTarget',
+ onlineHelp: 'storage_open_iscsi',
+
+ updateConnectionField: function () {
+ let me = this;
+ let target = me.down('field[name=target]').getValue();
+ let storage = me.storages?.find(
+ (entry) => entry.type === 'iscsi' && entry.target === target,
+ );
+ let field = me.down('field[name=connection]');
+ if (storage) {
+ field.setValue(storage.storage);
+ } else if (field.readOnly) {
+ field.setValue('');
+ }
+ field.setReadOnly(!!storage);
+ },
+
+ onSubmit: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let values = me.getValues();
+ let params = {
+ type: 'iscsi',
+ storage: values.connection,
+ portal: values.portal,
+ target: values.target,
+ content: 'none',
+ 'managed-multipath': 1,
+ };
+ let nodes = []
+ .concat(values.nodes || [])
+ .filter(Boolean)
+ .join(',');
+ if (nodes) {
+ params.nodes = nodes;
+ }
+ let connected = function (connection) {
+ if (wizard.destroyed) {
+ return;
+ }
+ wizard.connection = connection;
+ // the step does not come back, the cluster status of its initiator names is not needed
+ me.down('pveStorageWizardNodeIdentities').rstore.stopUpdate();
+ let tabs = wizard.down('#wizcontent');
+ wizard.down('#luns').enable();
+ tabs.setActiveTab(wizard.down('#luns'));
+ me.disable();
+ };
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ let users = me.storages.filter((entry) => entry.target === values.target);
+ if (users.length) {
+ let base = users[0];
+ if (
+ users.length !== 1 ||
+ base.type !== 'iscsi' ||
+ `${base.content ?? ''}` !== 'none'
+ ) {
+ wizard.showError(
+ gettext(
+ 'This target is already used by another storage. Check Datacenter > Storage.',
+ ),
+ );
+ return;
+ }
+ if (base.disable) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ let baseNodes = base.nodes ? base.nodes.split(',') : [];
+ if (baseNodes.length && !baseNodes.includes(Proxmox.NodeName)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Connection storage "{0}" is not available on node "{1}". Open the web UI on one of its nodes.',
+ ),
+ base.storage,
+ Proxmox.NodeName,
+ ),
+ ),
+ );
+ return;
+ }
+ let selectedNodes = nodes ? nodes.split(',') : baseNodes;
+ if (
+ baseNodes.length &&
+ selectedNodes.some((node) => !baseNodes.includes(node))
+ ) {
+ wizard.showError(
+ gettext(
+ 'The connection storage is not available on all selected nodes.',
+ ),
+ );
+ return;
+ }
+ let connection = {
+ storage: base.storage,
+ target: base.target,
+ nodes: selectedNodes.join(','),
+ };
+ if (!base['managed-multipath']) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Enable Multipath in the edit dialog of storage "{0}" before using it here.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ connected(connection);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () =>
+ connected({ storage: params.storage, target: params.target, nodes }),
+ });
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ let common = PVE.panel.StorageBase.commonFields(true);
+ // wide enough for the longest label of the step
+ let labelWidth = 150;
+ me.items = [
+ {
+ xtype: 'textfield',
+ name: 'portal',
+ fieldLabel: gettext('Portal'),
+ labelWidth,
+ allowBlank: false,
+ listeners: {
+ change: {
+ buffer: 500,
+ fn: function (field, value) {
+ let target = me.down('field[name=target]');
+ target.setDisabled(!value);
+ target.setValue('');
+ target.setPortal(value);
+ },
+ },
+ },
+ },
+ {
+ xtype: 'pveIScsiScan',
+ name: 'target',
+ fieldLabel: gettext('Target'),
+ labelWidth,
+ disabled: true,
+ showNodeSelector: false,
+ nodename: Proxmox.NodeName,
+ listeners: { change: () => me.updateConnectionField() },
+ listConfig: {
+ width: 650,
+ emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')),
+ columns: [
+ {
+ text: gettext('Target'),
+ dataIndex: 'target',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Portals'),
+ dataIndex: 'portal',
+ width: 220,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ },
+ {
+ ...common.id,
+ name: 'connection',
+ fieldLabel: gettext('Connection Storage'),
+ labelWidth,
+ },
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${Ext.htmlEncode(
+ gettext(
+ 'Next creates or reuses the connection storage before you select a LUN.',
+ ),
+ )}`,
+ },
+ { xtype: 'pveStorageWizardNodeIdentities' },
+ ];
+ me.advancedItems = [
+ { ...common.nodes, labelWidth, validator: PVE.storage.wizard.validateNodes },
+ ];
+ me.callParent();
+ me.on('afterrender', () =>
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: me,
+ failure: function (response) {
+ if (!me.destroyed) {
+ me.up('window').showError(response.htmlStatus);
+ }
+ },
+ success: function (response) {
+ if (!me.destroyed) {
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ }
+ },
+ }),
+ );
+ },
+});
+
+PVE.storage.wizard.createIScsiLVM = function (wizard, values, lun) {
+ let connection = wizard.connection;
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`,
+ method: 'GET',
+ params: { content: 'images' },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let volume = response.result.data.find((entry) =>
+ entry.volid.endsWith(`.dm-uuid-mpath-${lun.wwid}`),
+ );
+ if (!volume) {
+ wizard.showError(
+ gettext(
+ 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.',
+ ),
+ );
+ return;
+ }
+ wizard.addLVMStorage({ ...values, base: volume.volid }, fail);
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
new file mode 100644
index 000000000..dbf789f4e
--- /dev/null
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -0,0 +1,156 @@
+Ext.define('PVE.storage.wizard.LunSelect', {
+ extend: 'Ext.panel.Panel',
+ xtype: 'pveStorageWizardLunSelect',
+ layout: { type: 'vbox', align: 'stretch' },
+
+ // as an input panel does, so that the wizard shows its help button for this step
+ listeners: {
+ activate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxShowHelp', this.onlineHelp);
+ },
+ deactivate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxHideHelp', this.onlineHelp);
+ },
+ },
+
+ getSelection: function () {
+ return this.down('grid').getSelection()[0]?.data;
+ },
+
+ reload: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let grid = me.down('grid');
+ me.rstore.stopUpdate();
+ me.store.setFilters([
+ { property: 'iscsi-target', value: wizard.connection.target, exactMatch: true },
+ ]);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(wizard.connection.storage)}/content`,
+ method: 'GET',
+ waitMsgTarget: grid,
+ failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
+ callback: function () {
+ if (!me.destroyed && wizard.down('#wizcontent').getActiveTab() === me) {
+ me.rstore.startUpdate();
+ }
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-luns',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', { rstore: me.rstore });
+ let inUse = (row) => row['used-by-storage'];
+ let updateSelection = function () {
+ let row = me.getSelection();
+ me.down('#selection').setValue(row && !inUse(row) ? row.wwid : '');
+ };
+ me.items = [
+ {
+ xtype: 'textfield',
+ itemId: 'selection',
+ hidden: true,
+ allowBlank: false,
+ submitValue: false,
+ },
+ {
+ xtype: 'component',
+ cls: 'pmx-hint',
+ margin: '0 0 10 0',
+ html: gettext(
+ 'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store: me.store,
+ emptyText: gettext('No LUNs found. Check connections and array access.'),
+ viewConfig: {
+ enableTextSelection: true,
+ getRowClass: (rec) => (inUse(rec.data) ? 'x-item-disabled' : ''),
+ },
+ listeners: {
+ beforeselect: (sm, rec) => !inUse(rec.data),
+ selectionchange: updateSelection,
+ },
+ columns: [
+ {
+ text: gettext('Name'),
+ dataIndex: 'name',
+ flex: 1,
+ minWidth: 260,
+ renderer: (value, md, rec) => Ext.htmlEncode(value || rec.get('wwid')),
+ },
+ { text: 'LUN', dataIndex: 'iscsi-lun', width: 60 },
+ {
+ text: gettext('Model'),
+ dataIndex: 'model',
+ width: 160,
+ renderer: (value, md, rec) =>
+ Ext.htmlEncode([rec.get('vendor'), value].filter(Boolean).join(' ')),
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 140,
+ renderer: PVE.SANUtils.renderLunState,
+ },
+ {
+ text: gettext('Multipath'),
+ dataIndex: 'multipath',
+ width: 170,
+ renderer: PVE.SANUtils.renderSanLunMultipath,
+ },
+ {
+ text: gettext('Used By'),
+ dataIndex: 'usage',
+ width: 130,
+ renderer: PVE.SANUtils.renderSanLunUsage,
+ },
+ {
+ text: gettext('Size'),
+ dataIndex: 'size',
+ width: 100,
+ renderer: Proxmox.Utils.render_size,
+ },
+ {
+ text: gettext('Device'),
+ dataIndex: 'devpath',
+ width: 180,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ tbar: [
+ {
+ text: gettext('Reload'),
+ iconCls: 'fa fa-refresh',
+ handler: () => me.reload(),
+ },
+ '->',
+ {
+ xtype: 'tbtext',
+ html: Ext.htmlEncode(`${gettext('Scan node')}: ${Proxmox.NodeName}`),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
+ me.mon(me.rstore, 'load', updateSelection);
+ me.on('activate', () => me.reload());
+ me.on('deactivate', () => me.rstore.stopUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js
new file mode 100644
index 000000000..9c7ab8cce
--- /dev/null
+++ b/www/manager6/storage/wizard/NodeIdentities.js
@@ -0,0 +1,83 @@
+Ext.define('pve-san-node-identity', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'iscsi-initiator-name'],
+});
+
+Ext.define('PVE.storage.wizard.NodeIdentities', {
+ extend: 'Ext.grid.Panel',
+ xtype: 'pveStorageWizardNodeIdentities',
+ height: 220,
+ disableSelection: true,
+ viewConfig: { enableTextSelection: true },
+ columns: [
+ { text: gettext('Node'), dataIndex: 'node', width: 100, renderer: Ext.htmlEncode },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 175,
+ renderer: PVE.SANUtils.renderState,
+ },
+ {
+ text: gettext('Initiator Name'),
+ dataIndex: 'iscsi-initiator-name',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-identities',
+ model: 'pve-san-node-identity',
+ interval: 5000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: (raw) => ({
+ ...raw,
+ data: Object.entries(raw.data.nodes).map(([node, report]) => ({
+ ...report,
+ node,
+ })),
+ }),
+ },
+ },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.tbar = [
+ {
+ xtype: 'tbtext',
+ text: gettext('Allow these initiator names on the target.'),
+ },
+ '->',
+ {
+ text: gettext('Copy Initiator Names'),
+ iconCls: 'fa fa-clipboard',
+ handler: () =>
+ PVE.Utils.copyToClipboard(
+ me.store
+ .getRange()
+ .map((rec) => rec.get('iscsi-initiator-name'))
+ .filter(Boolean)
+ .join('\n'),
+ ),
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me, me.rstore);
+ me.on('afterrender', () => me.rstore.startUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
new file mode 100644
index 000000000..1f3975b75
--- /dev/null
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -0,0 +1,184 @@
+Ext.ns('PVE.storage.wizard');
+
+PVE.storage.wizard.subject = (type) =>
+ Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+
+PVE.storage.wizard.validateNodes = function () {
+ let nodes = [].concat(this.getValue() || []).filter(Boolean);
+ return (
+ !nodes.length ||
+ nodes.includes(Proxmox.NodeName) ||
+ Ext.String.format(
+ gettext('Must include node "{0}", which sets up the volume group.'),
+ Proxmox.NodeName,
+ )
+ );
+};
+
+Ext.define('PVE.storage.wizard.SAN', {
+ extend: 'PVE.window.Wizard',
+ width: 1050,
+ height: 620,
+
+ showError: function (message) {
+ if (this.destroyed) {
+ return;
+ }
+ this.down('#submit').enable();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
+ volumeSettings: function () {
+ let me = this;
+ let value = (name) => me.down(`field[name=${name}]`).getValue();
+ return {
+ storage: value('storage'),
+ vgname: value('vgname'),
+ 'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
+ nodes: me.connection.nodes,
+ };
+ },
+
+ // Adds the LVM storage with the volume settings as the last request of a setup. Only the node
+ // serving the web UI looked at the LUN, so show its state on the other nodes afterwards.
+ addLVMStorage: function (values, failure) {
+ let me = this;
+ let params = { type: 'lvm', shared: 1, content: 'images,rootdir', ...values };
+ if (!params.nodes) {
+ delete params.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: me,
+ failure,
+ success: function () {
+ // the storage is added, also if the setup got closed in the meantime
+ if (me.destroyed) {
+ return;
+ }
+ let wwid = me.down('#luns').getSelection().wwid;
+ me.close();
+ Ext.create('PVE.window.SANLunState', {
+ wwid,
+ storage: values.storage,
+ autoShow: true,
+ });
+ },
+ });
+ },
+
+ multipathSummary: function (lun) {
+ // an explicit entry takes precedence, also for a LUN of the connection storage
+ if (lun.multipath === 'manual') {
+ return PVE.SANUtils.multipathText('manual');
+ }
+ return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ },
+
+ updateSummary: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ let rows = [
+ [gettext('Connection Storage'), me.connection.storage],
+ [gettext('Storage ID'), values.storage],
+ [gettext('Volume Group'), values.vgname],
+ ['WWID', lun.wwid],
+ [gettext('Multipath'), me.multipathSummary(lun)],
+ [gettext('Size'), Proxmox.Utils.format_size(lun.size)],
+ [gettext('Nodes'), values.nodes || gettext('All (No restrictions)')],
+ [
+ gettext('Allow Snapshots as Volume-Chain'),
+ Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
+ ],
+ ];
+ me.down('#summary')
+ .getStore()
+ .setData(rows.map(([key, value]) => ({ key, value })));
+ },
+
+ finish: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ me.down('#submit').disable();
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.subject = PVE.storage.wizard.subject(me.wizardType);
+ me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
+ let common = PVE.panel.StorageBase.commonFields(true);
+ let snapshots = PVE.panel.StorageBase.volumeChainFields(true, 'lvm');
+ let settings = {
+ xtype: 'inputpanel',
+ title: gettext('Volume Group'),
+ onlineHelp: 'storage_multipath',
+ items: [
+ { ...common.id, fieldLabel: gettext('Storage ID') },
+ {
+ xtype: 'textfield',
+ name: 'vgname',
+ fieldLabel: gettext('Volume Group'),
+ allowBlank: false,
+ vtype: 'StorageId',
+ },
+ snapshots.checkbox,
+ snapshots.hint,
+ ],
+ };
+ me.items = [
+ { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ {
+ xtype: 'pveStorageWizardLunSelect',
+ title: 'LUN',
+ itemId: 'luns',
+ onlineHelp: 'storage_multipath',
+ },
+ settings,
+ {
+ title: gettext('Confirm'),
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'grid',
+ itemId: 'summary',
+ store: { fields: ['key', 'value'] },
+ columns: [
+ {
+ text: gettext('Setting'),
+ dataIndex: 'key',
+ width: 280,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Value'),
+ dataIndex: 'value',
+ flex: 1,
+ cellWrap: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ ],
+ listeners: { activate: () => me.updateSummary() },
+ onSubmit: () => me.finish(),
+ },
+ ];
+ me.callParent();
+ let tabs = me.down('#wizcontent');
+ tabs.on('tabchange', function (tp, tab) {
+ if (tab === me.down('#luns')) {
+ me.down('#back').disable();
+ }
+ me.down('#submit').setText(
+ tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
+ );
+ });
+ me.down('#submit').setText(gettext('Next'));
+ me.on('destroy', () => me.reloadCallback?.());
+ },
+});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
new file mode 100644
index 000000000..154836f3b
--- /dev/null
+++ b/www/manager6/window/SANLunState.js
@@ -0,0 +1,111 @@
+Ext.define('pve-san-lun-node', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'paths-active', 'paths-total', 'paths-expected'],
+});
+
+// Shows the state of the LUN of a new storage on each of its nodes, from the cluster-wide status.
+Ext.define('PVE.window.SANLunState', {
+ extend: 'Ext.window.Window',
+
+ modal: true,
+ width: 550,
+ height: 400,
+ layout: { type: 'vbox', align: 'stretch' },
+ bodyPadding: 10,
+
+ initComponent: function () {
+ let me = this;
+ if (!me.wwid || !me.storage) {
+ throw 'no LUN or storage specified';
+ }
+ me.title = Ext.String.format(gettext('Storage {0}: LUN State'), me.storage);
+ // The other nodes set up a new LUN with their next status updates.
+ let pendingUntil = Date.now() + 60000;
+ let rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-lun-state',
+ model: 'pve-san-lun-node',
+ interval: 3000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: function (raw) {
+ let lun = raw.data?.luns?.find((entry) => entry.wwid === me.wwid);
+ let nodes = Object.entries(lun?.nodes ?? {});
+ return { ...raw, data: nodes.map(([node, state]) => ({ ...state, node })) };
+ },
+ },
+ },
+ });
+ let store = Ext.create('Proxmox.data.DiffStore', {
+ rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.items = [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
+ me.storage,
+ ),
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store,
+ disableSelection: true,
+ emptyText: gettext('No node reported this LUN yet.'),
+ columns: [
+ {
+ text: gettext('Node'),
+ dataIndex: 'node',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ flex: 1,
+ renderer: function (value, metaData, rec) {
+ if (value === 'missing' && Date.now() < pendingUntil) {
+ let tip = gettext(
+ 'Not reported by the node yet; the SAN view shows that as "Missing".',
+ );
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(Ext.htmlEncode(tip))}"`;
+ return `<i class="fa fa-fw fa-spinner fa-pulse"></i> ${Ext.htmlEncode(gettext('Pending'))}`;
+ }
+ return PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ );
+ },
+ },
+ {
+ text: gettext('Active Paths'),
+ dataIndex: 'paths-active',
+ width: 120,
+ renderer: (value, metaData, rec) =>
+ value === undefined
+ ? ''
+ : Ext.htmlEncode(PVE.SANUtils.pathCount(rec.data)),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), rstore);
+ me.on('destroy', function () {
+ store.destroy();
+ rstore.destroy();
+ });
+ rstore.startUpdate();
+ },
+});
^ permalink raw reply related [relevance 15%]
* [PATCH v6 docs 26/42] storage: document the cluster-wide multipath management
2026-11-18 6:52 13% [PATCH v6 cluster,storage,docs,manager 00/42] " Thomas Lamprecht
@ 2026-11-18 6:52 18% ` Thomas Lamprecht
2026-11-18 6:52 15% ` [PATCH v6 manager 38/42] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
` (2 subsequent siblings)
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 6:52 UTC (permalink / raw)
To: pve-devel
Add a chapter for multipath on iSCSI and Fibre Channel SANs, written
around the tasks an admin has: prerequisites, setting up shared LVM
with the guided setup or by hand, adding, growing and removing a LUN,
reading the states during a path failure, array-specific settings and
moving over from a hand-made multipath.conf.
Removing a LUN stays a manual procedure, as Proxmox VE never removes a
WWID or a map by itself, so the chapter spells it out including how to
get out of queued I/O.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 301 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 ++-
6 files changed, 331 insertions(+), 6 deletions(-)
create mode 100644 pve-storage-multipath.adoc
diff --git a/pmxcfs.adoc b/pmxcfs.adoc
index 1128425..2ab3fb3 100644
--- a/pmxcfs.adoc
+++ b/pmxcfs.adoc
@@ -105,6 +105,8 @@ Files
|`ha/manager_status` | JSON-formatted information regarding HA services on the cluster
|`ha/resources.cfg` | Resources managed by high availability, and their current state
|`ha/rules.cfg` | Rules putting constraints on the HA manager's scheduling of HA resources
+|`multipath-overrides.conf` | Hardware-specific multipath settings, in `multipath.conf` format, applied on all nodes
+|`multipath.cfg` | {pve} cluster-wide multipath configuration (LUN entries)
|`nodes/<NAME>/config` | Node-specific configuration
|`nodes/<NAME>/lxc/<VMID>.conf` | VM configuration data for LXC containers
|`nodes/<NAME>/openvz/` | Prior to {pve} 4.0, used for container configuration data (deprecated, removed soon)
diff --git a/pve-storage-iscsi.adoc b/pve-storage-iscsi.adoc
index a02ed46..2dcc196 100644
--- a/pve-storage-iscsi.adoc
+++ b/pve-storage-iscsi.adoc
@@ -23,6 +23,10 @@ resources.
Low-level iscsi management task can be done using the `iscsiadm` tool.
+TIP: To set up shared LVM on a LUN of an iSCSI target, use the guided setup
+under *Datacenter -> Storage -> SAN* in the web UI, see
+xref:storage_multipath_setup[Multipath].
+
Configuration
~~~~~~~~~~~~~
@@ -38,6 +42,13 @@ target::
iSCSI target.
+managed-multipath::
+
+Combine the paths to each LUN of the target into one `dm-multipath` map on every
+node the storage is enabled on, and monitor the maps cluster-wide. A shared LVM
+storage on a target with several portals needs multipath, through this option
+or set up by hand. See xref:storage_multipath[Multipath].
+
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-iscsidirect.adoc b/pve-storage-iscsidirect.adoc
index ae722e8..97b0979 100644
--- a/pve-storage-iscsidirect.adoc
+++ b/pve-storage-iscsidirect.adoc
@@ -21,7 +21,7 @@ Configuration
~~~~~~~~~~~~~
The user mode iSCSI backend uses the same configuration options as the
-Open-iSCSI backend.
+Open-iSCSI backend, except for `managed-multipath`.
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index b148832..66d896e 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -143,6 +143,9 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
+TIP: The guided setup under *Datacenter -> Storage -> SAN* in the web UI creates
+a shared LVM storage on a SAN LUN, see xref:storage_multipath_setup[Multipath].
+
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
devices again, for example with `pvscan --cache`. This command also resets the
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
new file mode 100644
index 0000000..ac8b4cf
--- /dev/null
+++ b/pve-storage-multipath.adoc
@@ -0,0 +1,301 @@
+[[storage_multipath]]
+Multipath
+---------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: Multipath
+endif::wiki[]
+
+Use multipath for shared LVM on an iSCSI or Fibre Channel SAN with redundant
+connections. Device-mapper multipath combines the paths to a LUN into one block
+device, called a map, so I/O can continue when a path fails. Its World Wide
+Identifier (WWID) identifies the same LUN on every node.
+
+{pve} configures maps cluster-wide and shows their state under *Datacenter ->
+Storage -> SAN*. An iSCSI storage with *Multipath* enabled requests maps for its
+LUNs; Fibre Channel LUNs need entries in `/etc/pve/multipath.cfg`. NVMe
+namespaces use kernel-native multipath instead; the procedures below cover SCSI
+LUNs.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before enabling cluster-wide multipath management.
+. Install `multipath-tools` on every participating node. The
+ `libpve-storage-perl` package recommends it, but installations without
+ recommended packages need it added separately. A node without it shows
+ *Multipath unavailable* with the reason under *Datacenter -> Storage -> SAN*.
+ Plain iSCSI and LVM without the multipath option still work without it.
+. Allow each node's iSCSI initiator name on the array; the names are shown under
+ *Datacenter -> Storage -> SAN* and in the guided setup. Install `open-iscsi`
+ if needed.
+ For Fibre Channel, configure zoning and LUN masking for the WWPNs of each
+ node's HBA ports, which `cat /sys/class/fc_host/host*/port_name` lists.
+. Present the same empty LUN to all intended nodes over redundant paths. A node
+ does not scan for a Fibre Channel LUN that is mapped to it later, so rescan
+ the Fibre Channel hosts on each node:
++
+----
+# for host in /sys/class/fc_host/host*; do echo '- - -' > /sys/class/scsi_host/${host##*/}/scan; done
+----
++
+If the LUN still does not show up, check the target ports of the array on the
+node. This lists the WWPN, state and roles of each remote port; those of the
+array need the state `Online` and the role `FCP Target`. A `Blocked` port needs
+its connection restored before a rescan can reach it:
++
+----
+# for port in /sys/class/fc_remote_ports/rport-*; do echo $(cat $port/{port_name,port_state,roles}); done
+----
+
+[[storage_multipath_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~
+
+. Open *Datacenter -> Storage -> SAN* in the web UI on a node that can access
+ the LUN and select *Guided Setup -> LVM on iSCSI* or *LVM on Fibre Channel*.
+. For iSCSI, enter a portal, select the target and name the connection storage.
+ This storage connects to the target with `content none` and *Multipath*
+ enabled, while the LVM storage manages guest disks. Continuing creates or
+ reuses the connection storage before you select a LUN.
+. Select the LUN, choose the storage ID and volume group, then confirm. For
+ Fibre Channel, the setup adds the multipath entry of the LUN if it has none.
+ It then waits for the map on the node serving the web UI and sets *Expected
+ Paths* of that entry to the number of paths of the map, if that is at least
+ two. Existing entries and maps stay as they are; a map that was set up by
+ hand gets no entry, so check that the other nodes have it as well. Set
+ *Expected Paths* in the entry if it is missing or does not match the intended
+ topology, for example because a fabric was down at that time or nodes have
+ different path counts. Leave *Nodes* empty for all nodes, or for all nodes of
+ a reused connection storage. Virtual machines on the storage can only
+ have snapshots with *Allow Snapshots as Volume-Chain*, a technology preview
+ that applies to disks created after it is set; see
+ xref:pvesm_lvm_config[LVM configuration].
+. Check the state of the LUN on each node of the storage, which the setup
+ shows once the storage is added. Before that, only the node serving the web
+ UI looked at the LUN; the LUN list names it as *Scan node*. The other nodes
+ set the LUN up with their next status updates and show *Pending* during the
+ first minute. For a node that stays *Missing*, check its access to the LUN
+ on the array before placing guests on the storage. *OK (1 path)* means that
+ the node reaches the LUN over a single path. The *State* column of the view
+ shows the same later.
+
+A LUN that a storage uses cannot be selected, and the setup refuses a LUN that
+contains data. To reuse such a LUN, first stop all its users on all hosts and
+remove its storage references, then use *Wipe* under *Node -> SAN* as
+`root@pam`. This destroys its data. Before the setup or the wipe writes to a
+LUN, the node checks for processes that have it open, also through another of
+its paths, for example a guest that uses it as a disk. This does not find every
+user: not one that opened the LUN through another device node, and none on other
+hosts. To keep a volume group that a LUN already holds, do not wipe the LUN: add
+the volume group under *Datacenter -> Storage -> Add -> LVM* with *Shared*
+enabled. The usage shown for a LUN is cached per node, so other nodes can still
+show the old content after a wipe. If setup fails, check the error, the node's
+task log and *Datacenter -> Storage* before retrying; closing the dialog does
+not undo changes.
+
+The dialogs under *Datacenter -> Storage -> Add* can do the same for iSCSI in
+two steps: add an *iSCSI* storage with *Multipath* enabled and *Use LUNs
+directly* cleared, then an *LVM* storage with it as *Base storage* and the LUN
+as *Base volume*. Selecting a base storage enables *Shared*; keep it enabled.
+
+To set up iSCSI by hand, run these commands on a node with access to the target:
+
+----
+# pvesm add iscsi <connection> --portal <portal> --target <iqn> \
+ --content none --managed-multipath 1
+# pvesm list <connection> --content images
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, including the connection storage
+prefix and the `dm-uuid-mpath-<wwid>` suffix. Adding the LVM storage creates the
+volume group. Keep its base volume: it connects the target before LVM
+activation.
+
+For Fibre Channel, add an entry with the number of paths each node should
+have, wait for the scan to show a by-id path with `dm-uuid-mpath-<wwid>`, then
+create the volume group and shared storage:
+
+----
+# pvesh create /cluster/multipath/wwid --wwid <wwid> --paths-expected <paths>
+# pvesm scan san-luns --output-format json
+# pvesh create /nodes/<node>/disks/lvm --name <storage> \
+ --device /dev/disk/by-id/dm-uuid-mpath-<wwid> --add_storage 1
+----
+
+These examples allow all nodes. For a subset, set `--nodes <nodes>` on the
+entry or iSCSI storage and on the LVM storage (`pvesm set <storage> --nodes
+<nodes>`), using a comma-separated list. `pvesh` waits for the creation task;
+check its output for errors before using the storage.
+
+Adding Another LUN
+~~~~~~~~~~~~~~~~~~
+
+. Present the new LUN to the same nodes on the array. Enabled iSCSI storages
+ rescan their sessions automatically; for Fibre Channel, rescan the hosts as
+ shown in the prerequisites.
+. Run the guided setup again. For iSCSI, select the same target to reuse its
+ connection storage. If it lacks *Multipath*, enable that option in its edit
+ dialog first, observing the migration advice below.
+. Select the new LUN and create a separate LVM storage. By hand, repeat the
+ iSCSI listing and LVM command above, or the Fibre Channel procedure.
+
+[[storage_multipath_grow]]
+Growing a LUN
+~~~~~~~~~~~~~
+
+. Grow the LUN on the array. Never shrink a LUN in use.
+. Wait for the iSCSI session rescan, or rescan each SCSI path on every Fibre
+ Channel node with `echo 1 > /sys/block/<path>/device/rescan`, where `<path>`
+ is a member device such as `sdc`, not the map.
+. Check the map size on every node with `multipath -ll <wwid>` or under
+ *Node -> SAN*. The generated configuration sets `auto_resize grow_only`:
+ the map grows once all its paths report the new size. If necessary, run
+ `multipathd resize map <map>` after all paths have grown.
+. Run `pvresize /dev/disk/by-id/dm-uuid-mpath-<wwid>` on one node only, after
+ every node's map has grown. A smaller map cannot access the added space.
+
+[[storage_multipath_remove]]
+Removing a LUN
+~~~~~~~~~~~~~~
+
+{pve} never flushes maps or removes WWIDs from `/etc/multipath/wwids`.
+Removing a configuration entry is not enough. A map that queues I/O without
+paths can block guests and LVM commands, so disable queueing before unmapping:
+
+. Stop all users of the LUN on all hosts, or move their data elsewhere. Remove
+ the LVM storage with `pvesm remove <storage>` and deactivate its volume group
+ on every node with `vgchange -an <vg>`. Neither command erases the data.
+. Set an existing entry to fail I/O with
+ `pvesh set /cluster/multipath/wwid/<wwid> --no-path-retry fail`.
+ If none exists, create one with
+ `pvesh create /cluster/multipath/wwid --wwid <wwid> --no-path-retry fail`.
+ Add `--nodes <nodes>` if only a subset of nodes sees the LUN.
+. Wait until `multipath -ll <wwid>` on every participating node no longer lists
+ `queue_if_no_path` in the map's features. Wait for offline nodes to return.
+ Record the map name and member devices, and each member's identifier from
+ `/sys/block/<path>/device/wwid`.
+. Unmap the LUN on the array.
+. On every node, flush the map with `multipath -f <map>`. If it is busy, retry
+ after a few seconds; if it stays busy, find and stop its remaining users. Do
+ not force removal. For each recorded path,
+ check that its identifier is unchanged, then delete it with
+ `echo 1 > /sys/block/<path>/device/delete`. Skip paths already gone; stop if
+ an identifier changed.
+. Remove the explicit entry with `pvesh delete /cluster/multipath/wwid/<wwid>`.
+ Removing it earlier makes the nodes apply the default retry policy of the
+ array again, which can queue I/O on a map that is not flushed yet and block
+ whatever opens it.
+. On every node, wait until its next status update has removed the WWID from
+ `/etc/multipath/conf.d/pve-aliases.conf`, which takes about ten seconds, then
+ run `multipath -w <wwid>` to remove it from the allow-list. Running it before
+ that update can let the update add the WWID again. Check that
+ `grep -c '^/<wwid>/$' /etc/multipath/wwids` prints 0, and again after the
+ next status update.
+
+If the LUN was already unmapped and I/O is stuck, run
+`multipathd disablequeueing map <map>` on each affected node, then continue
+with the removal procedure.
+
+[[storage_multipath_disconnect]]
+Removing an iSCSI connection storage does not log out its sessions. Keep it
+while other LUNs of the target are in use; session maintenance is done with
+`iscsiadm`, not the read-only *Node -> SAN -> iSCSI* view.
+
+Checking Path Failures
+~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> Storage -> SAN* shows node availability, configuration errors
+and LUN states. It lists the LUNs that {pve} manages or uses: those with an
+explicit entry, those of an iSCSI storage with *Multipath* enabled, and those
+that are the base volume of a storage or hold its volume group. Other maps of a
+node, for example the ones of a third-party storage plugin, are only counted
+under *Other Maps*; *Node -> SAN* lists them as well. The volume groups come
+from the hint file of LVM. While LVM has none, for example because it sees
+duplicate PVs, a node cannot tell which of its other maps hold the volume group
+of a storage and leaves them all out. A LUN that is only listed for its volume
+group then shows *Unknown* for that node, or is not listed if no node reports
+it.
+
+The *State* of a LUN is the worst state among its nodes. For a state other than
+*Optimal*, it names the nodes in that state, unless all nodes are in it. Nodes
+in *Unknown* do not count for it and are named after it. Hover over it for the
+states and path counts of all nodes. *Multipath* describes how the map is
+managed, not its health: by an explicit entry, by the storage that requests it,
+or *Unmanaged* for a map that {pve} did not set up. Under *Node -> SAN*, a
+degraded or failed LUN shows its usable and expected paths; expand it to
+inspect individual paths.
+*Node -> SAN -> iSCSI* shows targets and sessions.
+
+*Optimal*:: All known paths are usable and no expected path is missing.
+*OK (1 path)*:: The only path is usable, and there is no other path to fail
+over to. The API reports this as `optimal` with one path.
+*Degraded*:: Some paths are unusable or fewer paths exist than expected.
+*Failed*:: No usable path remains; I/O queues or fails according to the retry
+policy.
+*Missing*:: A node with a current report is expected to have the LUN but does
+not.
+*Unknown*:: No usable current observation is available for that node.
+
+During a path failure, inspect the degraded LUN's paths and restore the failed
+connection. The state returns to *Optimal* when the paths recover. Check node
+availability too: unknown observations do not worsen a known LUN state.
+
+The status report of a node is limited to 32 KiB, which is enough for about 180
+listed LUNs with typical names. A node with more reports `too many LUNs to
+report` and no LUNs: those that the configuration expects on it show *Unknown*
+for that node, and LUNs that only this node reports are missing from the list.
+
+An iSCSI storage expects one path per portal. For a Fibre Channel LUN, set
+*Expected Paths* in its multipath entry, as the guided setup does. Without it,
+a node only shows as *Degraded* while its lost paths are still listed.
+Depending on the settings for the array, the kernel removes a path that stays
+down longer than `dev_loss_tmo`, and the map then shows *Optimal* with fewer
+paths, or *OK (1 path)* for the last one.
+
+[[storage_multipath_config]]
+Array Settings and Existing Configurations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Use the built-in device profiles unless the array vendor requires changes.
+*Edit Overrides* under *Datacenter -> Storage -> SAN* edits
+`/etc/pve/multipath-overrides.conf` for all nodes. For example, to set a retry
+count for one array model (replace the vendor and product expressions):
+
+----
+devices {
+ device {
+ vendor "<vendor>"
+ product "<product>"
+ no_path_retry 12
+ }
+}
+----
+
+The generated configuration sets `auto_resize grow_only` for the growing of
+LUNs. `multipath` only has this setting for all maps of a node, so it also
+applies to maps that {pve} does not manage, for example the ones of a
+third-party storage plugin: they grow once all their paths have grown. To keep
+the resize manual on all nodes, add this to the overrides:
+
+----
+defaults {
+ auto_resize never
+}
+----
+
+To move from a hand-made `/etc/multipath.conf`:
+
+. Back up the local configuration on every node. Move shared array settings to
+ the overrides file; add WWID entries under *Datacenter -> Storage -> SAN* for
+ Fibre Channel LUNs or per-LUN aliases and `no-path-retry` settings.
+. Enable *Multipath* on existing iSCSI storages. Keep existing LVM base volumes.
+ Check `multipathd show config` on every node before removing duplicate local
+ settings. Do not edit the generated `/etc/multipath/conf.d/pve-*.conf` files.
+. Wait until *Datacenter -> Storage -> SAN* shows the LUNs of these storages on
+ every node. Then check active volume dependencies with `lsblk` on each node.
+ Enabling multipath does not move active volumes off individual paths. Stop and
+ restart affected guests, or migrate them away and back, before relying on path
+ redundancy. Keep LVM component detection enabled and follow the
+ xref:storage_lvm[shared LVM autoactivation guidance].
diff --git a/pvesm.adoc b/pvesm.adoc
index 07a7917..f7de231 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -96,11 +96,10 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, FibreChannel (FC), or SAS block storage as shared storage in a
-cluster, LVM is used to split the LUN into virtual disks. The
-https://pve.proxmox.com/wiki/Multipath[Multipath Guide] explains how to
-configure it in a cluster, including multipathing which is usually a
-requirement in these scenarios.
+^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
+a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
+reachable over several paths; xref:storage_multipath[Multipath] describes how
+{pve} manages them in a cluster.
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -153,6 +152,11 @@ also useful for local storage types. In this case such local storage
is available on all nodes, but it is physically different and can have
totally different content.
+Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
+on a xref:storage_multipath_setup[SAN LUN], use *Guided Setup* under
+*Datacenter -> Storage -> SAN* instead. It creates the storages that are needed
+and enables multipath for the LUN.
+
Storage Pools
~~~~~~~~~~~~~
@@ -500,6 +504,8 @@ See Also
* link:/wiki/Storage:_iSCSI[Storage: iSCSI]
+* link:/wiki/Storage:_Multipath[Storage: Multipath]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -542,6 +548,8 @@ include::pve-storage-iscsi.adoc[]
include::pve-storage-iscsidirect.adoc[]
+include::pve-storage-multipath.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 18%]
* [PATCH v6 manager 39/42] ui: dc: san: add a guided setup for shared LVM on Fibre Channel
2026-11-18 6:52 13% [PATCH v6 cluster,storage,docs,manager 00/42] " Thomas Lamprecht
2026-11-18 6:52 18% ` [PATCH v6 docs 26/42] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-18 6:52 15% ` [PATCH v6 manager 38/42] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
@ 2026-11-18 6:52 20% ` Thomas Lamprecht
2026-11-18 20:28 9% ` superseded: [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 6:52 UTC (permalink / raw)
To: pve-devel
Fibre Channel LUNs show up as block devices on the nodes, without a
storage that connects to them, so Datacenter > Storage > Add has no
dialog to start from. Add a Fibre Channel entry to the guided setup of
the SAN view. The entry offers SCSI LUNs only. An NVMe/FC namespace uses
the native multipath of the kernel and has no storage that connects it,
so the cluster-wide status could not show its state on the nodes.
The setup enables multipath for the LUN if needed, so its menu entry
needs Sys.Modify as well. Then the setup creates the volume group
through the node serving the web UI and adds the shared LVM storage
itself. The node disk API would add the storage for all nodes and
without the snapshot setting. Before it changes anything, the setup
checks that the storage ID is free, as it cannot create the volume group
a second time.
As the setup adds the storage, it waits for the volume group task on its
own, not in a task window. Closing a task window would end the setup
with a volume group and no storage. For the same reason, the setup
cannot be closed until the wait is over. If the task state cannot be
read for a while, the setup ends and says how to add the storage by
hand, as the task may still succeed and must not be started again.
No storage knows how many paths a node should have to a Fibre Channel
LUN. So a multipath entry that the setup adds expects as many paths as
the map has on the node serving the web UI. A node zoned to fewer
fabrics, or one that lost a path, then shows the LUN as degraded.
Nodes do not scan for a LUN that gets mapped to them after their login
to the array, so the setup points to the rescan of the Fibre Channel
hosts.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/dc/SAN.js | 5 +-
www/manager6/storage/wizard/FibreChannel.js | 175 ++++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 23 ++-
www/manager6/storage/wizard/Wizard.js | 131 ++++++++++++++-
www/manager6/window/SANLunState.js | 10 +-
6 files changed, 331 insertions(+), 14 deletions(-)
create mode 100644 www/manager6/storage/wizard/FibreChannel.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 09a02a9c4..1644e1d41 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -390,6 +390,7 @@ JSSRC= \
storage/wizard/LunSelect.js \
storage/wizard/NodeIdentities.js \
storage/wizard/IScsi.js \
+ storage/wizard/FibreChannel.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 9255d2f6a..165411314 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -111,9 +111,10 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
- let setupItem = (wizardType) => ({
+ let setupItem = (wizardType, disabled) => ({
text: PVE.storage.wizard.subject(wizardType),
iconCls: 'fa fa-fw fa-building',
+ disabled,
handler: () =>
Ext.create('PVE.storage.wizard.SAN', {
wizardType,
@@ -125,7 +126,7 @@ Ext.define('PVE.dc.SANView', {
{
text: gettext('Guided Setup'),
disabled: !canSetup,
- menu: [setupItem('iscsi')],
+ menu: [setupItem('iscsi'), setupItem('fc', !canModify)],
},
];
me.items = [
diff --git a/www/manager6/storage/wizard/FibreChannel.js b/www/manager6/storage/wizard/FibreChannel.js
new file mode 100644
index 000000000..200e7d83a
--- /dev/null
+++ b/www/manager6/storage/wizard/FibreChannel.js
@@ -0,0 +1,175 @@
+PVE.storage.wizard.createFC = function (wizard, values, lun) {
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ let create = function (row) {
+ if (wizard.destroyed) {
+ return;
+ }
+ // the request starts the task that waitForTask() then waits for, so keep the setup open
+ let keepOpen = () => false;
+ wizard.on('beforeclose', keepOpen);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/disks/lvm`,
+ method: 'POST',
+ params: { name: values.vgname, device: row['by-id'] || row.devpath },
+ waitMsgTarget: wizard,
+ callback: () => wizard.un('beforeclose', keepOpen),
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let addStorage = () =>
+ wizard.addLVMStorage(values, (res) =>
+ wizard.stopWithError(
+ res.htmlStatus +
+ '<br>' +
+ gettext(
+ 'The volume group was created, but adding the storage failed. Add it under Datacenter > Storage > Add > LVM with Shared enabled.',
+ ),
+ ),
+ );
+ let lost = (status) =>
+ wizard.stopWithError(
+ status +
+ '<br>' +
+ gettext(
+ 'Could not read the task status. The volume group creation task may still be running. Check its log under Node > Task History. If it succeeds, add the volume group under Datacenter > Storage > Add > LVM with Shared enabled.',
+ ),
+ );
+ let message = gettext('Creating the volume group...');
+ wizard.waitForTask(response.result.data, message, addStorage, lost);
+ },
+ });
+ };
+ let hasMultipath = (row) => ['manual', 'storage', 'unmanaged'].includes(row.multipath);
+ // Fibre Channel has no storage that knows how many paths a node should have, so an entry the
+ // setup adds expects the paths of this node. A node with fewer paths then shows as degraded.
+ // The wizard remembers the entry it added, so that a retry still sets the expected paths before
+ // it creates the volume group.
+ let expectPaths = function (row) {
+ if (!(row['paths-total'] >= 2)) {
+ delete wizard.addedEntry;
+ create(row);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/cluster/multipath/wwid/${encodeURIComponent(lun.wwid)}`,
+ method: 'PUT',
+ params: { 'paths-expected': row['paths-total'] },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () => {
+ delete wizard.addedEntry;
+ create(row);
+ },
+ });
+ };
+ let waitForMap = function () {
+ if (wizard.destroyed) {
+ return;
+ }
+ let store = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-map',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ let timer = Ext.defer(function () {
+ store.destroy();
+ if (!wizard.destroyed) {
+ wizard.setLoading(false);
+ wizard.showError(
+ gettext(
+ 'The multipath map did not appear within 90 seconds. Check Node > SAN, then reload the LUN list.',
+ ),
+ );
+ }
+ }, 90000);
+ wizard.on(
+ 'destroy',
+ () => {
+ clearTimeout(timer);
+ if (!store.destroyed) {
+ store.destroy();
+ }
+ },
+ null,
+ { single: true },
+ );
+ wizard.setLoading(gettext('Waiting for the multipath map...'));
+ store.on('load', function (s, records, success, operation) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let row = records?.find((rec) => rec.get('wwid') === lun.wwid)?.data;
+ if (!success || (row && hasMultipath(row))) {
+ clearTimeout(timer);
+ store.destroy();
+ wizard.setLoading(false);
+ if (success) {
+ wizard.down('#luns').down('grid').getSelection()[0].set(row);
+ if (wizard.addedEntry === lun.wwid) {
+ expectPaths(row);
+ } else {
+ create(row);
+ }
+ } else {
+ wizard.showError(Proxmox.Utils.getResponseErrorMessage(operation.getError()));
+ }
+ }
+ });
+ store.startUpdate();
+ };
+ let setup = function () {
+ if (hasMultipath(lun)) {
+ if (wizard.addedEntry === lun.wwid) {
+ expectPaths(lun);
+ } else {
+ create(lun);
+ }
+ } else if (lun.multipath === 'pending' || wizard.addedEntry === lun.wwid) {
+ waitForMap();
+ } else {
+ let params = { wwid: lun.wwid };
+ if (values.nodes) {
+ params.nodes = values.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/cluster/multipath/wwid',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () => {
+ wizard.addedEntry = lun.wwid;
+ waitForMap();
+ },
+ });
+ }
+ };
+ // The storage is added last. Its ID has to be free before anything is created: once the volume
+ // group exists, the setup cannot create it again.
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ if (response.result.data.some((entry) => entry.storage === values.storage)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext('Storage ID "{0}" is already in use. Choose another ID.'),
+ values.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ setup();
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
index dbf789f4e..0a6d5c4a4 100644
--- a/www/manager6/storage/wizard/LunSelect.js
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -22,6 +22,10 @@ Ext.define('PVE.storage.wizard.LunSelect', {
let wizard = me.up('window');
let grid = me.down('grid');
me.rstore.stopUpdate();
+ if (!wizard.connection) {
+ me.rstore.startUpdate();
+ return;
+ }
me.store.setFilters([
{ property: 'iscsi-target', value: wizard.connection.target, exactMatch: true },
]);
@@ -68,6 +72,15 @@ Ext.define('PVE.storage.wizard.LunSelect', {
'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
),
},
+ ...(me.rescanNote
+ ? [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${me.rescanNote}`,
+ },
+ ]
+ : []),
{
xtype: 'grid',
flex: 1,
@@ -146,7 +159,15 @@ Ext.define('PVE.storage.wizard.LunSelect', {
me.callParent();
Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
me.mon(me.rstore, 'load', updateSelection);
- me.on('activate', () => me.reload());
+ me.on('activate', function () {
+ if (me.up('window').wizardType === 'fc') {
+ me.down('gridcolumn[dataIndex=iscsi-lun]').hide();
+ me.store.setFilters([
+ { filterFn: (rec) => ['fc', 'fcoe'].includes(rec.get('transport')) },
+ ]);
+ }
+ me.reload();
+ });
me.on('deactivate', () => me.rstore.stopUpdate());
me.on('destroy', () => {
me.store.destroy();
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
index 1f3975b75..2affda528 100644
--- a/www/manager6/storage/wizard/Wizard.js
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -1,7 +1,10 @@
Ext.ns('PVE.storage.wizard');
PVE.storage.wizard.subject = (type) =>
- Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+ Ext.String.format(
+ gettext('LVM on {0}'),
+ type === 'fc' ? gettext('Fibre Channel') : PVE.Utils.format_storage_type(type),
+ );
PVE.storage.wizard.validateNodes = function () {
let nodes = [].concat(this.getValue() || []).filter(Boolean);
@@ -20,6 +23,11 @@ Ext.define('PVE.storage.wizard.SAN', {
width: 1050,
height: 620,
+ stopWithError: function (message) {
+ this.close();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
showError: function (message) {
if (this.destroyed) {
return;
@@ -28,6 +36,65 @@ Ext.define('PVE.storage.wizard.SAN', {
Ext.Msg.alert(gettext('Error'), message);
},
+ // Waits for a task with the setup masked and continues with next() once it succeeded. A task
+ // window of its own could be closed while the task runs, which would end the setup there. The
+ // setup cannot be closed during the wait either, for example with the Escape key.
+ // If the state of the task cannot be read for some time, lost() gets the error: the task may
+ // still be running then, so the setup must not start it again.
+ waitForTask: function (upid, message, next, lost) {
+ let me = this;
+ let task = Proxmox.Utils.parse_task_upid(upid);
+ let failures = 0;
+ let keepOpen = () => false;
+ let done = function (error) {
+ if (me.destroyed) {
+ return;
+ }
+ me.un('beforeclose', keepOpen);
+ me.setLoading(false);
+ if (error === undefined) {
+ next();
+ } else {
+ me.showError(error);
+ }
+ };
+ let poll = function () {
+ if (me.destroyed) {
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${task.node}/tasks/${encodeURIComponent(upid)}/status`,
+ method: 'GET',
+ failure: function (response) {
+ if (me.destroyed) {
+ return;
+ }
+ if (++failures < 5) {
+ Ext.defer(poll, 2000);
+ return;
+ }
+ me.un('beforeclose', keepOpen);
+ me.setLoading(false);
+ lost(response.htmlStatus);
+ },
+ success: function (response) {
+ failures = 0;
+ let { status, exitstatus } = response.result.data;
+ if (status !== 'stopped') {
+ Ext.defer(poll, 1000);
+ return;
+ }
+ let result = Proxmox.Utils.parse_task_status(exitstatus);
+ let failed = result === 'error' || result === 'unknown';
+ done(failed ? Ext.htmlEncode(exitstatus) : undefined);
+ },
+ });
+ };
+ me.on('beforeclose', keepOpen);
+ me.setLoading(message);
+ poll();
+ },
+
volumeSettings: function () {
let me = this;
let value = (name) => me.down(`field[name=${name}]`).getValue();
@@ -35,7 +102,13 @@ Ext.define('PVE.storage.wizard.SAN', {
storage: value('storage'),
vgname: value('vgname'),
'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
- nodes: me.connection.nodes,
+ nodes:
+ me.wizardType === 'fc'
+ ? []
+ .concat(value('nodes') || [])
+ .filter(Boolean)
+ .join(',')
+ : me.connection.nodes,
};
},
@@ -63,6 +136,7 @@ Ext.define('PVE.storage.wizard.SAN', {
Ext.create('PVE.window.SANLunState', {
wwid,
storage: values.storage,
+ fc: me.wizardType === 'fc',
autoShow: true,
});
},
@@ -70,11 +144,18 @@ Ext.define('PVE.storage.wizard.SAN', {
},
multipathSummary: function (lun) {
+ let me = this;
// an explicit entry takes precedence, also for a LUN of the connection storage
if (lun.multipath === 'manual') {
return PVE.SANUtils.multipathText('manual');
}
- return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ if (me.connection) {
+ return PVE.SANUtils.multipathText('storage', me.connection.storage);
+ }
+ // the Fibre Channel setup adds an entry for a LUN without multipath
+ return lun.multipath === 'none'
+ ? gettext('Explicit entry, added by this setup')
+ : PVE.SANUtils.multipathText(lun.multipath, lun['multipath-storage']);
},
updateSummary: function () {
@@ -82,7 +163,6 @@ Ext.define('PVE.storage.wizard.SAN', {
let values = me.volumeSettings();
let lun = me.down('#luns').getSelection();
let rows = [
- [gettext('Connection Storage'), me.connection.storage],
[gettext('Storage ID'), values.storage],
[gettext('Volume Group'), values.vgname],
['WWID', lun.wwid],
@@ -94,6 +174,9 @@ Ext.define('PVE.storage.wizard.SAN', {
Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
],
];
+ if (me.connection) {
+ rows.unshift([gettext('Connection Storage'), me.connection.storage]);
+ }
me.down('#summary')
.getStore()
.setData(rows.map(([key, value]) => ({ key, value })));
@@ -104,11 +187,19 @@ Ext.define('PVE.storage.wizard.SAN', {
let values = me.volumeSettings();
let lun = me.down('#luns').getSelection();
me.down('#submit').disable();
- PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ if (me.wizardType === 'fc') {
+ PVE.storage.wizard.createFC(me, values, lun);
+ } else {
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ }
},
initComponent: function () {
let me = this;
+ if (!['iscsi', 'fc'].includes(me.wizardType)) {
+ throw 'no SAN storage type specified';
+ }
+ let iscsi = me.wizardType === 'iscsi';
me.subject = PVE.storage.wizard.subject(me.wizardType);
me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
let common = PVE.panel.StorageBase.commonFields(true);
@@ -130,13 +221,35 @@ Ext.define('PVE.storage.wizard.SAN', {
snapshots.hint,
],
};
+ if (!iscsi) {
+ settings.advancedItems = [
+ { ...common.nodes, validator: PVE.storage.wizard.validateNodes },
+ ];
+ }
me.items = [
- { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ ...(iscsi
+ ? [
+ {
+ xtype: 'pveStorageWizardIScsiTarget',
+ title: gettext('Target'),
+ itemId: 'target',
+ },
+ ]
+ : []),
{
xtype: 'pveStorageWizardLunSelect',
title: 'LUN',
itemId: 'luns',
onlineHelp: 'storage_multipath',
+ // the nodes only see a newly mapped Fibre Channel LUN after a rescan
+ rescanNote: iscsi
+ ? undefined
+ : Ext.String.format(
+ gettext(
+ 'After mapping a new LUN on the array, rescan the Fibre Channel hosts of each node (<a href="{0}" target="_blank" rel="noopener noreferrer">documentation</a>).',
+ ),
+ Ext.htmlEncode(Proxmox.Utils.get_help_link('storage_multipath')),
+ ),
},
settings,
{
@@ -171,14 +284,16 @@ Ext.define('PVE.storage.wizard.SAN', {
me.callParent();
let tabs = me.down('#wizcontent');
tabs.on('tabchange', function (tp, tab) {
- if (tab === me.down('#luns')) {
+ if (iscsi && tab === me.down('#luns')) {
me.down('#back').disable();
}
me.down('#submit').setText(
tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
);
});
- me.down('#submit').setText(gettext('Next'));
+ if (iscsi) {
+ me.down('#submit').setText(gettext('Next'));
+ }
me.on('destroy', () => me.reloadCallback?.());
},
});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
index 154836f3b..a0a6d514d 100644
--- a/www/manager6/window/SANLunState.js
+++ b/www/manager6/window/SANLunState.js
@@ -51,9 +51,13 @@ Ext.define('PVE.window.SANLunState', {
margin: '0 0 10 0',
html: Ext.htmlEncode(
Ext.String.format(
- gettext(
- 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
- ),
+ me.fc
+ ? gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array and rescan its Fibre Channel hosts.',
+ )
+ : gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
me.storage,
),
),
^ permalink raw reply related [relevance 20%]
* [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
@ 2026-11-18 6:52 13% Thomas Lamprecht
2026-11-18 6:52 18% ` [PATCH v6 docs 26/42] storage: document the cluster-wide multipath management Thomas Lamprecht
` (3 more replies)
0 siblings, 4 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-18 6:52 UTC (permalink / raw)
To: pve-devel
This is v6 of the combined and reduced series of the cluster-wide
multipath work [0][1] and Dietmar's RFC for guided remote storage setup
and SAN visibility [2].
v6 is v5 [3] rebased onto current master, where plugin API 17 with the
volume types, the plugin metadata for the web UI and the property
isolation for plugins landed underneath, plus what an independent review
of v5 turned up:
- The status update no longer waits for the missing map of an LVM base
volume, nor asks a hanging multipathd for its paths. With three such
storages a pass took 32 seconds instead of 1.2 in my lab. Activating
a volume for a guest still waits.
- An existing volume group on a partition of a multipath map can be
added again, also with the Multipath option of the iSCSI storage.
- The node disk API only creates the storage of a volume group on a
LUN; v5 could join a storage added meanwhile with another volume
group.
- The Fibre Channel setup waits for the volume group task itself and
cannot be closed meanwhile. Closing the task window ended it with a
volume group and no storage.
- The setup menu also needs Datastore.Audit or Datastore.AllocateSpace.
- The first status pass removed a drop-in with one of the generated
names under /etc/multipath/conf.d, also one that Proxmox VE had not
written. Such a file now stays, and the node reports an error while
it needs that name.
- The volume group creation and the wipe also refuse a LUN that is in
use through another of its SCSI paths, for example by a guest started
before the map existed. A name in the request has to lead to the same
device after the LUN lookup still.
- A node only reported the first of the storages that request a map.
- Node > Disks > LVM creates a shared storage on a SAN LUN, on a single
path for a Fibre Channel LUN without a map. Its dialog now points to
the guided setup.
- Enable Multipath under Node > SAN opens the entry dialog, where the
admin sees and chooses the nodes, instead of adding an entry for all.
- Smaller ones: partition bases and LUNs reached through two targets
are attributed to their storage, Node > SAN shows the path counts of
a degraded LUN, and the SAN view names the nodes in Unknown.
- let the disk wipe take by-id, dm-N and mapper names for any device,
so it also wiped a logical volume with a guest disk by such a name.
These names are now accepted for a LUN only.
BlockBridge was very reactive here and tested v5 with 1000 LUNs or
namespaces on a node, one per guest disk. For them LUN inventory took
over ten seconds. New patches 16 and 17 look the disks up by name and
read the udev data with one call, which brought it to under a second for
1000 NVMe/TCP namespaces in my lab. The test also showed the disks of
running guests as unused, as no storage references them. New patches 25,
27, 41 and 42 show the guest or process that has a LUN open for writing,
and a hidden column for the iSCSI target, which names the volume for a
plugin with one target per volume. They come last in their repositories,
so that they can be left out; the NVMe over Fabrics series then applies
up to its last manager patch. A LUN that stays attached with nothing
holding it, for example after a failed detach, still shows as unused:
telling whose it is needs the plugin, and I left that for later.
What I left as is for now: lsblk for the usage of a LUN, as it opens no
device without a udev entry (measured again); 'auto_resize grow_only'
for all maps of a node, as multipath has no other form of it, documented
with how to turn it off; a node that drops the new option when it writes
storage.cfg before it is upgraded, which the chapter covers; and an
empty volume group that another node wipes right after its creation.
Overview of what an admin gets with this:
- Datacenter > Storage > SAN, a new entry below Storage, shows the
multipath state of every node and of the LUNs that Proxmox VE
manages or has a storage on, and edits the multipath entries and
array-specific overrides. I explicitly chose this over the
client/plugin side of Storage, as we do not have e.g. Ceph or
ZFS/LVM/... creation in there either. We might want to rethink and
consolidate our storage interface vs. management story in the
future, but IMO a partial switch now is not worth it, that would add
even more potential for confusion than the new SAN view.
- Its Guided Setup menu leads through shared LVM on a LUN: for iSCSI it
connects or reuses a target, with the initiator names of all nodes at
hand, for Fibre Channel it takes a LUN the nodes already see. Both
set up multipath and end with the state of the LUN on every node.
- Datacenter > Storage > Add keeps its dialogs. The iSCSI one gets a
Multipath option and the LVM one enables Shared for a base storage,
and both point to the SAN view.
- Node > SAN lists the LUNs of a node with their paths and usage, can
wipe a LUN that no storage uses, and shows the iSCSI sessions.
The rules the series follows since v4: nodes add WWIDs and maps but
never remove them, a write is checked where it happens, lists do not
probe devices, there are no new iSCSI operations, the guided setup makes
the API calls an admin would make by hand, and multipath management is
turned on by the admin. The v4 cover [7] has the reasons.
Two things an admin will likely miss: there is no notification when a
LUN loses path redundancy, the state only shows on the SAN pages and in
the API. And Fibre Channel starts at a LUN the nodes already see; the
chapter gives the commands to list WWPNs and rescan the HBAs.
How it works:
- /etc/pve/multipath.cfg holds explicit entries per WWID,
/etc/pve/multipath-overrides.conf array settings; patch 01
registers both. An iSCSI storage with the 'managed-multipath' option
supplies its LUNs without entries. The option is not named
'multipath', as third-party plugins use that name, and the storage
layer leaves out a third-party plugin that declares a property of
another plugin.
- pvestatd calls one function of pve-storage per pass. It adds the
WWIDs the node needs to /etc/multipath/wwids, writes the drop-ins
/etc/multipath/conf.d/pve-*.conf, reloads multipathd after a change,
and publishes the state of the maps that Proxmox VE manages or that a
storage builds on through the node key-value store.
- /cluster/multipath/status aggregates these reports;
/cluster/multipath/{wwid,overrides} edit the two files;
/nodes/{node}/scan/san-luns lists the LUNs of a node and
/nodes/{node}/iscsi its sessions.
- The volumes of an iSCSI storage with the option are named after the
multipath map, so an LVM storage uses them through 'base' as before.
- Volume group creation and wipe run under a cluster lock per LUN. They
refuse a LUN that a storage uses or a process of the node has open,
also through another path. Opens through another device node, such as
one of a container, and users on other hosts are not seen.
Patches:
- cluster 01: register the two configuration files
- storage 02-25: helpers for the disk and iSCSI session inventory
(mostly Dietmar's), the multipath library and configuration, the
iSCSI option, the per-node apply and status with their API, the disk
list of many disks, the LUN inventory, the read-only iSCSI status,
volume groups on LUNs, the wipe and the process that has a LUN open
- docs 26-27: the multipath chapter, rewritten around tasks, and the
paragraph for a LUN that a process has open
- manager 28-42: the pvestatd call, report and API mounts, then the
views, the two dialog changes, the two guided setups, the note in the
add dialogs, and the guest or process and the target of a LUN
Other changes since v5 [3]:
- rebased onto current master in all four repositories, with the plugin
metadata for the iSCSI option and its entry in the pinned property
list
- the setup menu is named Guided Setup instead of Add Storage, as three
different things in two views were called add
- search fields in the LUN lists and the iSCSI tree, which on a node
also match path devices and WWPNs, for example one from the kernel
log
- the process check compares device numbers, and the volume group check
refuses a volume group that any storage names
- style fixes, warnings of three test files, and shorter commit
messages
When applying, versioned dependencies have to be set: pve-manager on
libpve-storage-perl, and libpve-storage-perl (also as build dependency)
on the libpve-cluster-perl with patch 01, as PVE::Storage
registers the two files when it is loaded. pve-manager also needs the
pve-doc-generator (build) and pve-docs with the multipath chapter, for
its help links. If the bound for LVM status commands [4] gets applied
too, whichever is applied second has to pass the status cache to the two
lvm_vgs() calls of the base volume activation, as they can block a
status pass otherwise. Both mark the cache of the status update with
'status_only', in the same line.
The per-node target and portal series [5][6] are independent of this
one. It takes the LUNs of an iSCSI storage from the sessions of its one
target, so if a storage can have several targets per node, whichever is
applied second has to cover that.
I tested on the lab of v4 [7] and v5: a six-node nested cluster with a
NetApp AFF A20 (three iSCSI portals, NVMe/TCP), Linux LIO targets and
software FCoE, upgraded from the v5 build, with the NVMe over Fabrics
series and [4] on top. Most review fixes ran as drills against the fault
they fix, a few have unit tests only. Both guided setups ended optimal
on six nodes, the Fibre Channel one also with a failing task, delayed
and cut-off status requests and Escape pressed during the wait. A guest
on NetApp, Fibre Channel and NVMe/TCP disks went through snapshots, live
migrations, a path cut under I/O, an online resize and a node reboot
with checksums compared. The scale test ran with 1000 NVMe/TCP
namespaces and with 1000 iSCSI LUNs with maps; the disk list and the LUN
inventory gave the same result with the one udev call and with a query
per disk, also on the other five nodes. Guests with a NetApp map, a
Fibre Channel LUN or an NVMe/TCP namespace as disk, also on one path of
a map, showed in the LUN lists, and the wipe and the volume group
creation refused these LUNs. Most of this ran on builds before the last
fixes, which got drills of their own. I looked at each changed view and
dialog in the web UI.
Not repeated for v6: a path cut on Fibre Channel, the CLI procedure, a
LUN that one node is not allowed to see, all paths down with queued I/O,
the SAN views with a stopped multipathd, the multipath status of a node
with 1000 foreign maps and the series installed alone.
[0]: https://lore.proxmox.com/pve-devel/20260626121000.2095591-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20260703124707.1172980-2-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20260731102156.3947857-1-dietmar@proxmox.com/
[3]: https://lore.proxmox.com/pve-devel/20261116012355.3187417-1-t.lamprecht@proxmox.com/
[4]: https://lore.proxmox.com/pve-devel/20261111015217.941220-1-t.lamprecht@proxmox.com/
[5]: https://lore.proxmox.com/pve-devel/20260430173220.441001-1-m.limbeck@proxmox.com/
[6]: https://lore.proxmox.com/pve-devel/20260804090819.2136483-1-dietmar@proxmox.com/
[7]: https://lore.proxmox.com/pve-devel/20261113030146.1559030-1-t.lamprecht@proxmox.com/
pve-cluster:
Thomas Lamprecht (1):
cfs: observe the multipath configuration files
src/PVE/Cluster.pm | 2 ++
src/pmxcfs/status.c | 2 ++
2 files changed, 4 insertions(+)
pve-storage:
Dietmar Maurer (8):
diskmanage: collect disk transport type from lsblk
diskmanage: qualify NVMe over fabrics transport
diskmanage: optionally include iSCSI session devices in disk enumeration
diskmanage: collect native NVMe multipath path state
iscsi: factor out session device map from device list
diskmanage: add helper to list multipath devices
pvesm: expose the SAN LUN inventory
api: add node-level iSCSI status
Thomas Lamprecht (16):
multipath: add a library around multipathd
multipath: add a cluster-wide configuration
iscsi: add an option to manage storage LUNs with multipath
lvm: activate a missing base volume before using the volume group
multipath: apply the configuration on every node
multipath: publish per-node status
api: add endpoints for the cluster-wide multipath configuration
api: multipath: add the cluster-wide health status
diskmanage: look up the requested disks by name
diskmanage: read the udev data of all disks with one call
api: scan: add a SAN LUN inventory
disks: lvm: drop unused imports
disks: lvm: allow volume groups on SAN LUNs and multipath maps
disks: lvm: refuse to destroy the volume group of a shared storage
disks: allow wiping a SAN LUN that no storage uses
api: scan: report the process that has a SAN LUN open
debian/control | 3 +-
src/PVE/API2/Disks.pm | 46 +-
src/PVE/API2/Disks/LVM.pm | 77 ++-
src/PVE/API2/ISCSI.pm | 166 ++++++
src/PVE/API2/Makefile | 2 +
src/PVE/API2/Multipath.pm | 451 +++++++++++++++
src/PVE/API2/Storage/Scan.pm | 216 ++++++++
src/PVE/CLI/pvesm.pm | 14 +
src/PVE/Diskmanage.pm | 375 +++++++++++--
src/PVE/ISCSI/Topology.pm | 88 +++
src/PVE/Makefile | 6 +
src/PVE/Multipath.pm | 213 ++++++++
src/PVE/Multipath/Config.pm | 204 +++++++
src/PVE/Multipath/Generator.pm | 120 ++++
src/PVE/Multipath/Identity.pm | 44 ++
src/PVE/Multipath/Status.pm | 215 ++++++++
src/PVE/Storage.pm | 2 +-
src/PVE/Storage/ISCSIPlugin.pm | 219 +++++---
src/PVE/Storage/LVMPlugin.pm | 151 ++++-
src/PVE/Storage/Makefile | 3 +-
src/PVE/Storage/SAN.pm | 409 ++++++++++++++
src/test/Makefile | 37 +-
src/test/disk_api_test.pm | 314 +++++++++++
src/test/disk_tests/iscsi/disklist | 1 +
.../disk_tests/iscsi/disklist_expected.json | 19 +
src/test/disk_tests/iscsi/lsblk | 5 +
src/test/disk_tests/iscsi/sda/device/model | 1 +
src/test/disk_tests/iscsi/sda/device/vendor | 1 +
.../disk_tests/iscsi/sda/queue/rotational | 1 +
src/test/disk_tests/iscsi/sda/size | 1 +
src/test/disk_tests/iscsi/sda_udevadm | 21 +
src/test/disk_tests/multipath/disklist | 11 +
.../multipath/disklist_expected.json | 107 ++++
src/test/disk_tests/multipath/dm-0/dm/name | 1 +
src/test/disk_tests/multipath/dm-0/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-0/size | 1 +
src/test/disk_tests/multipath/dm-0_slaves | 4 +
src/test/disk_tests/multipath/dm-1/dm/name | 1 +
src/test/disk_tests/multipath/dm-1/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-1/size | 1 +
src/test/disk_tests/multipath/dm-1_slaves | 4 +
src/test/disk_tests/multipath/dm-2/dm/name | 1 +
src/test/disk_tests/multipath/dm-2/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-2/size | 1 +
src/test/disk_tests/multipath/dm-2_slaves | 0
src/test/disk_tests/multipath/dm-3/dm/name | 1 +
src/test/disk_tests/multipath/dm-3/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-3/size | 1 +
src/test/disk_tests/multipath/dm-3_slaves | 0
src/test/disk_tests/multipath/dm-4/dm/name | 1 +
src/test/disk_tests/multipath/dm-4/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-4/size | 1 +
src/test/disk_tests/multipath/dm-4_slaves | 0
src/test/disk_tests/multipath/lsblk | 77 +++
src/test/disk_tests/multipath/lvs | 0
src/test/disk_tests/multipath/mounts | 1 +
.../multipath/multipath_expected.json | 59 ++
src/test/disk_tests/multipath/multipathd | 124 +++++
.../multipath/multipathd_status_expected.json | 40 ++
.../nvme-subsystem/nvme-subsys0/nvme3/address | 1 +
.../nvme-subsys0/nvme3/nvme2c3n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme3/state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/address | 1 +
.../nvme-subsys0/nvme4/nvme2c4n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/state | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/address | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/state | 1 +
.../disk_tests/multipath/nvme8n1/device/model | 1 +
.../multipath/nvme8n1/device/transport | 1 +
.../multipath/nvme8n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme8n1/size | 1 +
src/test/disk_tests/multipath/nvme8n1_udevadm | 14 +
.../disk_tests/multipath/nvme9n1/device/model | 1 +
.../multipath/nvme9n1/device/transport | 1 +
.../multipath/nvme9n1/device/vendor | 1 +
.../multipath/nvme9n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme9n1/size | 1 +
src/test/disk_tests/multipath/nvme9n1_udevadm | 12 +
.../multipath/nvme_path_status_expected.json | 19 +
src/test/disk_tests/multipath/partlist | 0
src/test/disk_tests/multipath/pvs | 1 +
.../disk_tests/multipath/sda/device/model | 1 +
.../disk_tests/multipath/sda/device/vendor | 1 +
.../disk_tests/multipath/sda/holders/holder | 1 +
.../disk_tests/multipath/sda/queue/rotational | 1 +
src/test/disk_tests/multipath/sda/size | 1 +
src/test/disk_tests/multipath/sda_udevadm | 18 +
.../disk_tests/multipath/sdb/device/model | 1 +
.../disk_tests/multipath/sdb/device/vendor | 1 +
.../disk_tests/multipath/sdb/holders/holder | 1 +
.../disk_tests/multipath/sdb/queue/rotational | 1 +
src/test/disk_tests/multipath/sdb/size | 1 +
src/test/disk_tests/multipath/sdb_udevadm | 18 +
.../disk_tests/multipath/sdc/device/model | 1 +
.../disk_tests/multipath/sdc/device/vendor | 1 +
.../disk_tests/multipath/sdc/holders/holder | 1 +
.../disk_tests/multipath/sdc/queue/rotational | 1 +
src/test/disk_tests/multipath/sdc/size | 1 +
src/test/disk_tests/multipath/sdc_udevadm | 18 +
.../disk_tests/multipath/sdd/device/model | 1 +
.../disk_tests/multipath/sdd/device/vendor | 1 +
.../disk_tests/multipath/sdd/holders/holder | 1 +
.../disk_tests/multipath/sdd/queue/rotational | 1 +
src/test/disk_tests/multipath/sdd/size | 1 +
src/test/disk_tests/multipath/sdd_udevadm | 18 +
src/test/disk_tests/multipath/zpool | 1 +
.../disk_tests/sas/disklist_expected.json | 1 +
src/test/disk_tests/sas/lsblk | 5 +
src/test/disklist_test.pm | 175 +++++-
src/test/multipath-three-states.json | 52 ++
src/test/plugin_properties_test.pm | 1 +
src/test/run_disk_api_tests.pl | 11 +
src/test/run_iscsi_activation_tests.pl | 109 ++++
src/test/run_lun_identity_tests.pl | 57 ++
src/test/run_multipath_api_tests.pl | 515 ++++++++++++++++++
src/test/run_multipath_tests.pl | 169 ++++++
src/test/run_san_api_tests.pl | 94 ++++
src/test/run_san_library_tests.pl | 135 +++++
src/test/run_san_lun_scan_tests.pl | 252 +++++++++
src/test/run_san_nvme_tests.pl | 120 ++++
src/test/run_san_taint_tests.pl | 60 ++
src/test/run_san_wipe_tests.pl | 255 +++++++++
src/test/run_san_write_check_tests.pl | 205 +++++++
src/test/run_test_lvm_base_activation.pl | 121 ++++
src/test/run_test_lvm_base_volume.pl | 12 +-
src/test/run_test_lvm_create.pl | 46 ++
126 files changed, 6224 insertions(+), 194 deletions(-)
pve-docs:
Thomas Lamprecht (2):
storage: document the cluster-wide multipath management
storage: multipath: describe the use shown for an open LUN
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 309 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 +-
6 files changed, 339 insertions(+), 6 deletions(-)
pve-manager:
Dietmar Maurer (2):
api: nodes: expose the iSCSI status
ui: node: san: show iSCSI targets and sessions
Thomas Lamprecht (13):
pvestatd: apply the multipath configuration and report the node status
report: add the managed multipath configuration
api: cluster: add the multipath endpoints
ui: dc: add a SAN view
ui: storage: iscsi: add the multipath option
ui: lvm: enable shared when a base storage is selected
ui: node: add SAN LUNs panel
ui: node: san: wipe a LUN that no storage uses
ui: dc: san: add a guided setup for shared LVM on iSCSI
ui: dc: san: add a guided setup for shared LVM on Fibre Channel
ui: storage: point the iSCSI and LVM add dialogs to the SAN view
ui: san: show the guest or process that has a LUN open
ui: node: san: add a column for the iSCSI target of a LUN
PVE/API2/Cluster.pm | 7 +
PVE/API2/Nodes.pm | 7 +
PVE/Report.pm | 3 +
PVE/Service/pvestatd.pm | 7 +
www/manager6/Makefile | 12 +
www/manager6/SANUtils.js | 202 ++++++++++
www/manager6/Utils.js | 19 +
www/manager6/dc/Config.js | 23 +-
www/manager6/dc/MultipathWwidEdit.js | 81 ++++
www/manager6/dc/SAN.js | 374 ++++++++++++++++++
www/manager6/node/Config.js | 24 ++
www/manager6/node/ISCSITargets.js | 150 +++++++
www/manager6/node/LVM.js | 3 +
www/manager6/node/SANLuns.js | 229 +++++++++++
www/manager6/storage/Base.js | 5 +
www/manager6/storage/IScsiEdit.js | 46 +++
www/manager6/storage/LVMEdit.js | 6 +
www/manager6/storage/wizard/FibreChannel.js | 175 ++++++++
www/manager6/storage/wizard/IScsi.js | 274 +++++++++++++
www/manager6/storage/wizard/LunSelect.js | 177 +++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 ++++
www/manager6/storage/wizard/Wizard.js | 299 ++++++++++++++
www/manager6/window/SANLunState.js | 115 ++++++
www/manager6/window/SANLunWipe.js | 52 +++
24 files changed, 2367 insertions(+), 6 deletions(-)
^ permalink raw reply [relevance 13%]
* superseded: [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
2026-11-13 3:00 13% [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-13 3:00 19% ` [PATCH v4 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-13 3:00 12% ` [PATCH v4 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
@ 2026-11-16 1:28 9% ` Thomas Lamprecht
2 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-16 1:28 UTC (permalink / raw)
To: pve-devel
superseded-by: https://lore.proxmox.com/pve-devel/20261116012355.3187417-1-t.lamprecht@proxmox.com/
^ permalink raw reply [relevance 9%]
* [PATCH v5 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI
2026-11-16 1:23 13% [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-16 1:23 18% ` [PATCH v5 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
@ 2026-11-16 1:23 13% ` Thomas Lamprecht
2026-11-16 1:23 18% ` [PATCH v5 manager 35/36] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-18 8:11 9% ` superseded: [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-16 1:23 UTC (permalink / raw)
To: pve-devel
Shared LVM on an iSCSI LUN needs an iSCSI storage with multipath, the
right LUN as base volume and an LVM storage on top, in that order. Add
a guided setup for it to the SAN view: connect to the target, with the
initiator names of all nodes at hand for the access rules of the
array, select a LUN, name the volume group and storage, and confirm.
The LUN list shows the model of each LUN, and the confirm step shows
how its multipath is set up.
It starts from the SAN view and not from Datacenter > Storage > Add,
as it creates a volume group and up to two storages, while an entry of
the Add menu attaches one storage of its type. Those dialogs stay as
they are and can do the same in two steps. Continuing from the target
step creates or reuses the connection storage, before the confirm
step, so the step says so.
A LUN that a storage uses cannot be selected. The list is the one of
the node serving the web UI, which the LUN step names. Whether the
other nodes of the storage see the LUN as well is what matters for a
shared storage, so the setup ends with the state of the LUN on each of
them, taken from the cluster-wide status. Nodes set up a new LUN with
their next status updates, so for the first minute a node without it
shows as pending and not as missing. A tooltip on that state says that
the SAN view lists such a node as missing meanwhile. The note of the
window says that guests on the storage cannot run on a node that
stays missing.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 5 +
www/manager6/dc/SAN.js | 20 +-
www/manager6/storage/wizard/IScsi.js | 272 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 158 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 ++++++
www/manager6/storage/wizard/Wizard.js | 184 ++++++++++++
www/manager6/window/SANLunState.js | 111 +++++++
7 files changed, 832 insertions(+), 1 deletion(-)
create mode 100644 www/manager6/storage/wizard/IScsi.js
create mode 100644 www/manager6/storage/wizard/LunSelect.js
create mode 100644 www/manager6/storage/wizard/NodeIdentities.js
create mode 100644 www/manager6/storage/wizard/Wizard.js
create mode 100644 www/manager6/window/SANLunState.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 7fb4d7944..c7cefeacc 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -137,6 +137,7 @@ JSSRC= \
window/Restore.js \
window/SafeDestroyGuest.js \
window/SafeDestroyStorage.js \
+ window/SANLunState.js \
window/SANLunWipe.js \
window/Settings.js \
window/Snapshot.js \
@@ -384,6 +385,10 @@ JSSRC= \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
storage/ESXIEdit.js \
+ storage/wizard/Wizard.js \
+ storage/wizard/LunSelect.js \
+ storage/wizard/NodeIdentities.js \
+ storage/wizard/IScsi.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index b40ee7064..a8ef4cd5b 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -50,7 +50,8 @@ Ext.define('PVE.dc.SANView', {
initComponent: function () {
let me = this;
- let caps = Ext.state.Manager.get('GuiCap').dc;
+ let allCaps = Ext.state.Manager.get('GuiCap');
+ let caps = allCaps.dc;
let canModify = !!caps['Sys.Modify'];
let canEdit = canModify && !!caps['Sys.Audit'];
me.rstore = Ext.create('Proxmox.data.UpdateStore', {
@@ -105,6 +106,23 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
+ let setupItem = (wizardType) => ({
+ text: PVE.storage.wizard.subject(wizardType),
+ iconCls: 'fa fa-fw fa-building',
+ handler: () =>
+ Ext.create('PVE.storage.wizard.SAN', {
+ wizardType,
+ autoShow: true,
+ reloadCallback: reload,
+ }),
+ });
+ me.tbar = [
+ {
+ text: gettext('Add Storage'),
+ disabled: !allCaps.storage['Datastore.Allocate'],
+ menu: [setupItem('iscsi')],
+ },
+ ];
me.items = [
{
xtype: 'grid',
diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/IScsi.js
new file mode 100644
index 000000000..072f96525
--- /dev/null
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -0,0 +1,272 @@
+Ext.define('PVE.storage.wizard.IScsiTarget', {
+ extend: 'Proxmox.panel.InputPanel',
+ xtype: 'pveStorageWizardIScsiTarget',
+ onlineHelp: 'storage_open_iscsi',
+
+ updateConnectionField: function () {
+ let me = this;
+ let target = me.down('field[name=target]').getValue();
+ let storage = me.storages?.find(
+ (entry) => entry.type === 'iscsi' && entry.target === target,
+ );
+ let field = me.down('field[name=connection]');
+ if (storage) {
+ field.setValue(storage.storage);
+ } else if (field.readOnly) {
+ field.setValue('');
+ }
+ field.setReadOnly(!!storage);
+ },
+
+ onSubmit: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let values = me.getValues();
+ let params = {
+ type: 'iscsi',
+ storage: values.connection,
+ portal: values.portal,
+ target: values.target,
+ content: 'none',
+ 'managed-multipath': 1,
+ };
+ let nodes = []
+ .concat(values.nodes || [])
+ .filter(Boolean)
+ .join(',');
+ if (nodes) {
+ params.nodes = nodes;
+ }
+ let connected = function (connection) {
+ if (wizard.destroyed) {
+ return;
+ }
+ wizard.connection = connection;
+ let tabs = wizard.down('#wizcontent');
+ wizard.down('#luns').enable();
+ tabs.setActiveTab(wizard.down('#luns'));
+ me.disable();
+ };
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ let users = me.storages.filter((entry) => entry.target === values.target);
+ if (users.length) {
+ let base = users[0];
+ if (
+ users.length !== 1 ||
+ base.type !== 'iscsi' ||
+ `${base.content ?? ''}` !== 'none'
+ ) {
+ wizard.showError(
+ gettext(
+ 'This target is already used by another storage. Check Datacenter > Storage.',
+ ),
+ );
+ return;
+ }
+ if (base.disable) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ let baseNodes = base.nodes ? base.nodes.split(',') : [];
+ if (baseNodes.length && !baseNodes.includes(Proxmox.NodeName)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Connection storage "{0}" is not available on node "{1}". Open the web UI on one of its nodes.',
+ ),
+ base.storage,
+ Proxmox.NodeName,
+ ),
+ ),
+ );
+ return;
+ }
+ let selectedNodes = nodes ? nodes.split(',') : baseNodes;
+ if (
+ baseNodes.length &&
+ selectedNodes.some((node) => !baseNodes.includes(node))
+ ) {
+ wizard.showError(
+ gettext(
+ 'The connection storage is not available on all selected nodes.',
+ ),
+ );
+ return;
+ }
+ let connection = {
+ storage: base.storage,
+ target: base.target,
+ nodes: selectedNodes.join(','),
+ };
+ if (!base['managed-multipath']) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Enable Multipath in the edit dialog of storage "{0}" before using it here.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ connected(connection);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () =>
+ connected({ storage: params.storage, target: params.target, nodes }),
+ });
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ let common = PVE.panel.StorageBase.commonFields(true);
+ // wide enough for the longest label of the step
+ let labelWidth = 150;
+ me.items = [
+ {
+ xtype: 'textfield',
+ name: 'portal',
+ fieldLabel: gettext('Portal'),
+ labelWidth,
+ allowBlank: false,
+ listeners: {
+ change: {
+ buffer: 500,
+ fn: function (field, value) {
+ let target = me.down('field[name=target]');
+ target.setDisabled(!value);
+ target.setValue('');
+ target.setPortal(value);
+ },
+ },
+ },
+ },
+ {
+ xtype: 'pveIScsiScan',
+ name: 'target',
+ fieldLabel: gettext('Target'),
+ labelWidth,
+ disabled: true,
+ showNodeSelector: false,
+ nodename: Proxmox.NodeName,
+ listeners: { change: () => me.updateConnectionField() },
+ listConfig: {
+ width: 650,
+ emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')),
+ columns: [
+ {
+ text: gettext('Target'),
+ dataIndex: 'target',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Portals'),
+ dataIndex: 'portal',
+ width: 220,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ },
+ {
+ ...common.id,
+ name: 'connection',
+ fieldLabel: gettext('Connection Storage'),
+ labelWidth,
+ },
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${Ext.htmlEncode(
+ gettext(
+ 'Next creates or reuses the connection storage before you select a LUN.',
+ ),
+ )}`,
+ },
+ { xtype: 'pveStorageWizardNodeIdentities' },
+ ];
+ me.advancedItems = [
+ { ...common.nodes, labelWidth, validator: PVE.storage.wizard.validateNodes },
+ ];
+ me.callParent();
+ me.on('afterrender', () =>
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: me,
+ failure: function (response) {
+ if (!me.destroyed) {
+ me.up('window').showError(response.htmlStatus);
+ }
+ },
+ success: function (response) {
+ if (!me.destroyed) {
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ }
+ },
+ }),
+ );
+ },
+});
+
+PVE.storage.wizard.createIScsiLVM = function (wizard, values, lun) {
+ let connection = wizard.connection;
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`,
+ method: 'GET',
+ params: { content: 'images' },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let volume = response.result.data.find((entry) =>
+ entry.volid.endsWith(`.dm-uuid-mpath-${lun.wwid}`),
+ );
+ if (!volume) {
+ wizard.showError(
+ gettext(
+ 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.',
+ ),
+ );
+ return;
+ }
+ wizard.addLVMStorage({ ...values, base: volume.volid }, fail);
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
new file mode 100644
index 000000000..d96cde871
--- /dev/null
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -0,0 +1,158 @@
+Ext.define('PVE.storage.wizard.LunSelect', {
+ extend: 'Ext.panel.Panel',
+ xtype: 'pveStorageWizardLunSelect',
+ layout: { type: 'vbox', align: 'stretch' },
+
+ // as an input panel does, so that the wizard shows its help button for this step
+ listeners: {
+ activate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxShowHelp', this.onlineHelp);
+ },
+ deactivate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxHideHelp', this.onlineHelp);
+ },
+ },
+
+ getSelection: function () {
+ return this.down('grid').getSelection()[0]?.data;
+ },
+
+ reload: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let grid = me.down('grid');
+ me.rstore.stopUpdate();
+ me.store.setFilters([
+ { property: 'iscsi-target', value: wizard.connection.target, exactMatch: true },
+ ]);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(wizard.connection.storage)}/content`,
+ method: 'GET',
+ waitMsgTarget: grid,
+ failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
+ callback: function () {
+ if (!me.destroyed && wizard.down('#wizcontent').getActiveTab() === me) {
+ me.rstore.startUpdate();
+ }
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-luns',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', { rstore: me.rstore });
+ let updateSelection = function () {
+ let row = me.getSelection();
+ me.down('#selection').setValue(row && !row['used-by-storage'] ? row.wwid : '');
+ };
+ me.items = [
+ {
+ xtype: 'textfield',
+ itemId: 'selection',
+ hidden: true,
+ allowBlank: false,
+ submitValue: false,
+ },
+ {
+ xtype: 'component',
+ cls: 'pmx-hint',
+ margin: '0 0 10 0',
+ html: gettext(
+ 'A LUN used by a storage cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store: me.store,
+ emptyText: gettext('No LUNs found. Check connections and array access.'),
+ viewConfig: {
+ enableTextSelection: true,
+ getRowClass: (rec) => (rec.get('used-by-storage') ? 'x-item-disabled' : ''),
+ },
+ listeners: {
+ beforeselect: (sm, rec) => !rec.get('used-by-storage'),
+ selectionchange: updateSelection,
+ },
+ columns: [
+ {
+ text: gettext('Name'),
+ dataIndex: 'name',
+ flex: 1,
+ minWidth: 260,
+ renderer: (value, md, rec) => Ext.htmlEncode(value || rec.get('wwid')),
+ },
+ { text: 'LUN', dataIndex: 'iscsi-lun', width: 60 },
+ {
+ text: gettext('Model'),
+ dataIndex: 'model',
+ width: 160,
+ renderer: (value, md, rec) =>
+ Ext.htmlEncode([rec.get('vendor'), value].filter(Boolean).join(' ')),
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 110,
+ renderer: (value, md, rec) =>
+ PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ ),
+ },
+ {
+ text: gettext('Multipath'),
+ dataIndex: 'multipath',
+ width: 170,
+ renderer: PVE.SANUtils.renderSanLunMultipath,
+ },
+ {
+ text: gettext('Used By'),
+ dataIndex: 'usage',
+ width: 130,
+ renderer: PVE.SANUtils.renderSanLunUsage,
+ },
+ {
+ text: gettext('Size'),
+ dataIndex: 'size',
+ width: 100,
+ renderer: Proxmox.Utils.render_size,
+ },
+ {
+ text: gettext('Device'),
+ dataIndex: 'devpath',
+ width: 180,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ tbar: [
+ {
+ text: gettext('Reload'),
+ iconCls: 'fa fa-refresh',
+ handler: () => me.reload(),
+ },
+ '->',
+ {
+ xtype: 'tbtext',
+ html: Ext.htmlEncode(`${gettext('Scan node')}: ${Proxmox.NodeName}`),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
+ me.mon(me.rstore, 'load', updateSelection);
+ me.on('activate', () => me.reload());
+ me.on('deactivate', () => me.rstore.stopUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js
new file mode 100644
index 000000000..9c7ab8cce
--- /dev/null
+++ b/www/manager6/storage/wizard/NodeIdentities.js
@@ -0,0 +1,83 @@
+Ext.define('pve-san-node-identity', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'iscsi-initiator-name'],
+});
+
+Ext.define('PVE.storage.wizard.NodeIdentities', {
+ extend: 'Ext.grid.Panel',
+ xtype: 'pveStorageWizardNodeIdentities',
+ height: 220,
+ disableSelection: true,
+ viewConfig: { enableTextSelection: true },
+ columns: [
+ { text: gettext('Node'), dataIndex: 'node', width: 100, renderer: Ext.htmlEncode },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 175,
+ renderer: PVE.SANUtils.renderState,
+ },
+ {
+ text: gettext('Initiator Name'),
+ dataIndex: 'iscsi-initiator-name',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-identities',
+ model: 'pve-san-node-identity',
+ interval: 5000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: (raw) => ({
+ ...raw,
+ data: Object.entries(raw.data.nodes).map(([node, report]) => ({
+ ...report,
+ node,
+ })),
+ }),
+ },
+ },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.tbar = [
+ {
+ xtype: 'tbtext',
+ text: gettext('Allow these initiator names on the target.'),
+ },
+ '->',
+ {
+ text: gettext('Copy Initiator Names'),
+ iconCls: 'fa fa-clipboard',
+ handler: () =>
+ PVE.Utils.copyToClipboard(
+ me.store
+ .getRange()
+ .map((rec) => rec.get('iscsi-initiator-name'))
+ .filter(Boolean)
+ .join('\n'),
+ ),
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me, me.rstore);
+ me.on('afterrender', () => me.rstore.startUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
new file mode 100644
index 000000000..1f3975b75
--- /dev/null
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -0,0 +1,184 @@
+Ext.ns('PVE.storage.wizard');
+
+PVE.storage.wizard.subject = (type) =>
+ Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+
+PVE.storage.wizard.validateNodes = function () {
+ let nodes = [].concat(this.getValue() || []).filter(Boolean);
+ return (
+ !nodes.length ||
+ nodes.includes(Proxmox.NodeName) ||
+ Ext.String.format(
+ gettext('Must include node "{0}", which sets up the volume group.'),
+ Proxmox.NodeName,
+ )
+ );
+};
+
+Ext.define('PVE.storage.wizard.SAN', {
+ extend: 'PVE.window.Wizard',
+ width: 1050,
+ height: 620,
+
+ showError: function (message) {
+ if (this.destroyed) {
+ return;
+ }
+ this.down('#submit').enable();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
+ volumeSettings: function () {
+ let me = this;
+ let value = (name) => me.down(`field[name=${name}]`).getValue();
+ return {
+ storage: value('storage'),
+ vgname: value('vgname'),
+ 'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
+ nodes: me.connection.nodes,
+ };
+ },
+
+ // Adds the LVM storage with the volume settings as the last request of a setup. Only the node
+ // serving the web UI looked at the LUN, so show its state on the other nodes afterwards.
+ addLVMStorage: function (values, failure) {
+ let me = this;
+ let params = { type: 'lvm', shared: 1, content: 'images,rootdir', ...values };
+ if (!params.nodes) {
+ delete params.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: me,
+ failure,
+ success: function () {
+ // the storage is added, also if the setup got closed in the meantime
+ if (me.destroyed) {
+ return;
+ }
+ let wwid = me.down('#luns').getSelection().wwid;
+ me.close();
+ Ext.create('PVE.window.SANLunState', {
+ wwid,
+ storage: values.storage,
+ autoShow: true,
+ });
+ },
+ });
+ },
+
+ multipathSummary: function (lun) {
+ // an explicit entry takes precedence, also for a LUN of the connection storage
+ if (lun.multipath === 'manual') {
+ return PVE.SANUtils.multipathText('manual');
+ }
+ return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ },
+
+ updateSummary: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ let rows = [
+ [gettext('Connection Storage'), me.connection.storage],
+ [gettext('Storage ID'), values.storage],
+ [gettext('Volume Group'), values.vgname],
+ ['WWID', lun.wwid],
+ [gettext('Multipath'), me.multipathSummary(lun)],
+ [gettext('Size'), Proxmox.Utils.format_size(lun.size)],
+ [gettext('Nodes'), values.nodes || gettext('All (No restrictions)')],
+ [
+ gettext('Allow Snapshots as Volume-Chain'),
+ Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
+ ],
+ ];
+ me.down('#summary')
+ .getStore()
+ .setData(rows.map(([key, value]) => ({ key, value })));
+ },
+
+ finish: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ me.down('#submit').disable();
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.subject = PVE.storage.wizard.subject(me.wizardType);
+ me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
+ let common = PVE.panel.StorageBase.commonFields(true);
+ let snapshots = PVE.panel.StorageBase.volumeChainFields(true, 'lvm');
+ let settings = {
+ xtype: 'inputpanel',
+ title: gettext('Volume Group'),
+ onlineHelp: 'storage_multipath',
+ items: [
+ { ...common.id, fieldLabel: gettext('Storage ID') },
+ {
+ xtype: 'textfield',
+ name: 'vgname',
+ fieldLabel: gettext('Volume Group'),
+ allowBlank: false,
+ vtype: 'StorageId',
+ },
+ snapshots.checkbox,
+ snapshots.hint,
+ ],
+ };
+ me.items = [
+ { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ {
+ xtype: 'pveStorageWizardLunSelect',
+ title: 'LUN',
+ itemId: 'luns',
+ onlineHelp: 'storage_multipath',
+ },
+ settings,
+ {
+ title: gettext('Confirm'),
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'grid',
+ itemId: 'summary',
+ store: { fields: ['key', 'value'] },
+ columns: [
+ {
+ text: gettext('Setting'),
+ dataIndex: 'key',
+ width: 280,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Value'),
+ dataIndex: 'value',
+ flex: 1,
+ cellWrap: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ ],
+ listeners: { activate: () => me.updateSummary() },
+ onSubmit: () => me.finish(),
+ },
+ ];
+ me.callParent();
+ let tabs = me.down('#wizcontent');
+ tabs.on('tabchange', function (tp, tab) {
+ if (tab === me.down('#luns')) {
+ me.down('#back').disable();
+ }
+ me.down('#submit').setText(
+ tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
+ );
+ });
+ me.down('#submit').setText(gettext('Next'));
+ me.on('destroy', () => me.reloadCallback?.());
+ },
+});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
new file mode 100644
index 000000000..154836f3b
--- /dev/null
+++ b/www/manager6/window/SANLunState.js
@@ -0,0 +1,111 @@
+Ext.define('pve-san-lun-node', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'paths-active', 'paths-total', 'paths-expected'],
+});
+
+// Shows the state of the LUN of a new storage on each of its nodes, from the cluster-wide status.
+Ext.define('PVE.window.SANLunState', {
+ extend: 'Ext.window.Window',
+
+ modal: true,
+ width: 550,
+ height: 400,
+ layout: { type: 'vbox', align: 'stretch' },
+ bodyPadding: 10,
+
+ initComponent: function () {
+ let me = this;
+ if (!me.wwid || !me.storage) {
+ throw 'no LUN or storage specified';
+ }
+ me.title = Ext.String.format(gettext('Storage {0}: LUN State'), me.storage);
+ // The other nodes set up a new LUN with their next status updates.
+ let pendingUntil = Date.now() + 60000;
+ let rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-lun-state',
+ model: 'pve-san-lun-node',
+ interval: 3000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: function (raw) {
+ let lun = raw.data?.luns?.find((entry) => entry.wwid === me.wwid);
+ let nodes = Object.entries(lun?.nodes ?? {});
+ return { ...raw, data: nodes.map(([node, state]) => ({ ...state, node })) };
+ },
+ },
+ },
+ });
+ let store = Ext.create('Proxmox.data.DiffStore', {
+ rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.items = [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
+ me.storage,
+ ),
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store,
+ disableSelection: true,
+ emptyText: gettext('No node reported this LUN yet.'),
+ columns: [
+ {
+ text: gettext('Node'),
+ dataIndex: 'node',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ flex: 1,
+ renderer: function (value, metaData, rec) {
+ if (value === 'missing' && Date.now() < pendingUntil) {
+ let tip = gettext(
+ 'Not reported by the node yet; the SAN view shows that as "Missing".',
+ );
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(Ext.htmlEncode(tip))}"`;
+ return `<i class="fa fa-fw fa-spinner fa-pulse"></i> ${Ext.htmlEncode(gettext('Pending'))}`;
+ }
+ return PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ );
+ },
+ },
+ {
+ text: gettext('Active Paths'),
+ dataIndex: 'paths-active',
+ width: 120,
+ renderer: (value, metaData, rec) =>
+ value === undefined
+ ? ''
+ : Ext.htmlEncode(PVE.SANUtils.pathCount(rec.data)),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), rstore);
+ me.on('destroy', function () {
+ store.destroy();
+ rstore.destroy();
+ });
+ rstore.startUpdate();
+ },
+});
^ permalink raw reply related [relevance 13%]
* [PATCH v5 manager 35/36] ui: dc: san: add a guided setup for shared LVM on Fibre Channel
2026-11-16 1:23 13% [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-16 1:23 18% ` [PATCH v5 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-16 1:23 13% ` [PATCH v5 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
@ 2026-11-16 1:23 18% ` Thomas Lamprecht
2026-11-18 8:11 9% ` superseded: [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-16 1:23 UTC (permalink / raw)
To: pve-devel
Fibre Channel LUNs show up as block devices on the nodes, without a
storage that connects to them, so Datacenter > Storage > Add has no
dialog to start from. Add a Fibre Channel entry to the guided setup of
the SAN view: select the LUN, name the volume group and storage,
confirm. It offers SCSI LUNs only. An NVMe/FC namespace uses the
native multipath of the kernel and has no storage that connects it,
so the cluster-wide status could not show its state on the nodes.
The setup enables multipath for the LUN if needed and waits for its map,
then creates the volume group through the node serving the web UI and
adds the shared LVM storage. It adds the storage itself instead of
letting the node disk API do so, as that would add it for all nodes and
without the snapshot setting, to be changed afterwards.
A Fibre Channel LUN has no storage that knows how many paths a node
should have. So an entry the setup adds expects as many paths as the map
has on that node, and a node zoned to fewer fabrics or one that lost a
path shows the LUN as degraded.
A LUN with a volume group cannot be selected again, so the setup
checks that the storage ID is free before it changes anything.
Nodes do not scan for a LUN that is mapped to them after their login
to the array. So the LUN step names the rescan of the Fibre Channel
hosts and links to its documentation, and the closing window names it
for a node that stays missing.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/dc/SAN.js | 5 +-
www/manager6/storage/wizard/FibreChannel.js | 162 ++++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 23 ++-
www/manager6/storage/wizard/Wizard.js | 90 ++++++++++-
www/manager6/window/SANLunState.js | 10 +-
6 files changed, 277 insertions(+), 14 deletions(-)
create mode 100644 www/manager6/storage/wizard/FibreChannel.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index c7cefeacc..ebdc3f802 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -389,6 +389,7 @@ JSSRC= \
storage/wizard/LunSelect.js \
storage/wizard/NodeIdentities.js \
storage/wizard/IScsi.js \
+ storage/wizard/FibreChannel.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index a8ef4cd5b..2adeba227 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -106,9 +106,10 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
- let setupItem = (wizardType) => ({
+ let setupItem = (wizardType, disabled) => ({
text: PVE.storage.wizard.subject(wizardType),
iconCls: 'fa fa-fw fa-building',
+ disabled,
handler: () =>
Ext.create('PVE.storage.wizard.SAN', {
wizardType,
@@ -120,7 +121,7 @@ Ext.define('PVE.dc.SANView', {
{
text: gettext('Add Storage'),
disabled: !allCaps.storage['Datastore.Allocate'],
- menu: [setupItem('iscsi')],
+ menu: [setupItem('iscsi'), setupItem('fc', !canModify)],
},
];
me.items = [
diff --git a/www/manager6/storage/wizard/FibreChannel.js b/www/manager6/storage/wizard/FibreChannel.js
new file mode 100644
index 000000000..99dea67c7
--- /dev/null
+++ b/www/manager6/storage/wizard/FibreChannel.js
@@ -0,0 +1,162 @@
+PVE.storage.wizard.createFC = function (wizard, values, lun) {
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ let create = function (row) {
+ if (wizard.destroyed) {
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/disks/lvm`,
+ method: 'POST',
+ params: { name: values.vgname, device: row['by-id'] || row.devpath },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ wizard.waitForTask(response.result.data, () =>
+ wizard.addLVMStorage(values, (res) =>
+ wizard.stopWithError(
+ res.htmlStatus +
+ '<br>' +
+ gettext(
+ 'The volume group was created, but adding the storage failed. Add it under Datacenter > Storage > Add > LVM with Shared enabled.',
+ ),
+ ),
+ ),
+ );
+ },
+ });
+ };
+ let hasMultipath = (row) => ['manual', 'storage', 'unmanaged'].includes(row.multipath);
+ // Fibre Channel has no storage that knows how many paths a node should have, so an entry the
+ // setup adds expects the paths of this node. A node with fewer paths then shows as degraded.
+ // The wizard remembers the entry it added, so that a retry still sets the expected paths before
+ // it creates the volume group.
+ let expectPaths = function (row) {
+ if (!(row['paths-total'] >= 2)) {
+ delete wizard.addedEntry;
+ create(row);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/cluster/multipath/wwid/${encodeURIComponent(lun.wwid)}`,
+ method: 'PUT',
+ params: { 'paths-expected': row['paths-total'] },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () => {
+ delete wizard.addedEntry;
+ create(row);
+ },
+ });
+ };
+ let waitForMap = function () {
+ if (wizard.destroyed) {
+ return;
+ }
+ let store = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-map',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ let timer = Ext.defer(function () {
+ store.destroy();
+ if (!wizard.destroyed) {
+ wizard.setLoading(false);
+ wizard.showError(
+ gettext(
+ 'The multipath map did not appear within 90 seconds. Check Node > SAN, then reload the LUN list.',
+ ),
+ );
+ }
+ }, 90000);
+ wizard.on(
+ 'destroy',
+ () => {
+ clearTimeout(timer);
+ if (!store.destroyed) {
+ store.destroy();
+ }
+ },
+ null,
+ { single: true },
+ );
+ wizard.setLoading(gettext('Waiting for the multipath map...'));
+ store.on('load', function (s, records, success, operation) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let row = records?.find((rec) => rec.get('wwid') === lun.wwid)?.data;
+ if (!success || (row && hasMultipath(row))) {
+ clearTimeout(timer);
+ store.destroy();
+ wizard.setLoading(false);
+ if (success) {
+ wizard.down('#luns').down('grid').getSelection()[0].set(row);
+ if (wizard.addedEntry === lun.wwid) {
+ expectPaths(row);
+ } else {
+ create(row);
+ }
+ } else {
+ wizard.showError(Proxmox.Utils.getResponseErrorMessage(operation.getError()));
+ }
+ }
+ });
+ store.startUpdate();
+ };
+ let setup = function () {
+ if (hasMultipath(lun)) {
+ if (wizard.addedEntry === lun.wwid) {
+ expectPaths(lun);
+ } else {
+ create(lun);
+ }
+ } else if (lun.multipath === 'pending' || wizard.addedEntry === lun.wwid) {
+ waitForMap();
+ } else {
+ let params = { wwid: lun.wwid };
+ if (values.nodes) {
+ params.nodes = values.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/cluster/multipath/wwid',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () => {
+ wizard.addedEntry = lun.wwid;
+ waitForMap();
+ },
+ });
+ }
+ };
+ // The storage is added last. Its ID has to be free before anything is created, as the LUN
+ // cannot be selected again once it has a volume group.
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ if (response.result.data.some((entry) => entry.storage === values.storage)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext('Storage ID "{0}" is already in use. Choose another ID.'),
+ values.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ setup();
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
index d96cde871..0bb7807fd 100644
--- a/www/manager6/storage/wizard/LunSelect.js
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -22,6 +22,10 @@ Ext.define('PVE.storage.wizard.LunSelect', {
let wizard = me.up('window');
let grid = me.down('grid');
me.rstore.stopUpdate();
+ if (!wizard.connection) {
+ me.rstore.startUpdate();
+ return;
+ }
me.store.setFilters([
{ property: 'iscsi-target', value: wizard.connection.target, exactMatch: true },
]);
@@ -67,6 +71,15 @@ Ext.define('PVE.storage.wizard.LunSelect', {
'A LUN used by a storage cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.',
),
},
+ ...(me.rescanNote
+ ? [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${me.rescanNote}`,
+ },
+ ]
+ : []),
{
xtype: 'grid',
flex: 1,
@@ -148,7 +161,15 @@ Ext.define('PVE.storage.wizard.LunSelect', {
me.callParent();
Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
me.mon(me.rstore, 'load', updateSelection);
- me.on('activate', () => me.reload());
+ me.on('activate', function () {
+ if (me.up('window').wizardType === 'fc') {
+ me.down('gridcolumn[dataIndex=iscsi-lun]').hide();
+ me.store.setFilters([
+ { filterFn: (rec) => ['fc', 'fcoe'].includes(rec.get('transport')) },
+ ]);
+ }
+ me.reload();
+ });
me.on('deactivate', () => me.rstore.stopUpdate());
me.on('destroy', () => {
me.store.destroy();
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
index 1f3975b75..3744f1ca1 100644
--- a/www/manager6/storage/wizard/Wizard.js
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -1,7 +1,10 @@
Ext.ns('PVE.storage.wizard');
PVE.storage.wizard.subject = (type) =>
- Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+ Ext.String.format(
+ gettext('LVM on {0}'),
+ type === 'fc' ? gettext('Fibre Channel') : PVE.Utils.format_storage_type(type),
+ );
PVE.storage.wizard.validateNodes = function () {
let nodes = [].concat(this.getValue() || []).filter(Boolean);
@@ -20,6 +23,11 @@ Ext.define('PVE.storage.wizard.SAN', {
width: 1050,
height: 620,
+ stopWithError: function (message) {
+ this.close();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
showError: function (message) {
if (this.destroyed) {
return;
@@ -28,6 +36,24 @@ Ext.define('PVE.storage.wizard.SAN', {
Ext.Msg.alert(gettext('Error'), message);
},
+ waitForTask: function (upid, next) {
+ let me = this;
+ Ext.create('Proxmox.window.TaskProgress', {
+ upid,
+ autoShow: true,
+ taskDone: function (success) {
+ if (me.destroyed) {
+ return;
+ }
+ if (success) {
+ next();
+ } else {
+ me.down('#submit').enable();
+ }
+ },
+ });
+ },
+
volumeSettings: function () {
let me = this;
let value = (name) => me.down(`field[name=${name}]`).getValue();
@@ -35,7 +61,13 @@ Ext.define('PVE.storage.wizard.SAN', {
storage: value('storage'),
vgname: value('vgname'),
'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
- nodes: me.connection.nodes,
+ nodes:
+ me.wizardType === 'fc'
+ ? []
+ .concat(value('nodes') || [])
+ .filter(Boolean)
+ .join(',')
+ : me.connection.nodes,
};
},
@@ -63,6 +95,7 @@ Ext.define('PVE.storage.wizard.SAN', {
Ext.create('PVE.window.SANLunState', {
wwid,
storage: values.storage,
+ fc: me.wizardType === 'fc',
autoShow: true,
});
},
@@ -70,11 +103,18 @@ Ext.define('PVE.storage.wizard.SAN', {
},
multipathSummary: function (lun) {
+ let me = this;
// an explicit entry takes precedence, also for a LUN of the connection storage
if (lun.multipath === 'manual') {
return PVE.SANUtils.multipathText('manual');
}
- return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ if (me.connection) {
+ return PVE.SANUtils.multipathText('storage', me.connection.storage);
+ }
+ // the Fibre Channel setup adds an entry for a LUN without multipath
+ return lun.multipath === 'none'
+ ? gettext('Explicit entry, added by this setup')
+ : PVE.SANUtils.multipathText(lun.multipath, lun['multipath-storage']);
},
updateSummary: function () {
@@ -82,7 +122,6 @@ Ext.define('PVE.storage.wizard.SAN', {
let values = me.volumeSettings();
let lun = me.down('#luns').getSelection();
let rows = [
- [gettext('Connection Storage'), me.connection.storage],
[gettext('Storage ID'), values.storage],
[gettext('Volume Group'), values.vgname],
['WWID', lun.wwid],
@@ -94,6 +133,9 @@ Ext.define('PVE.storage.wizard.SAN', {
Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
],
];
+ if (me.connection) {
+ rows.unshift([gettext('Connection Storage'), me.connection.storage]);
+ }
me.down('#summary')
.getStore()
.setData(rows.map(([key, value]) => ({ key, value })));
@@ -104,11 +146,19 @@ Ext.define('PVE.storage.wizard.SAN', {
let values = me.volumeSettings();
let lun = me.down('#luns').getSelection();
me.down('#submit').disable();
- PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ if (me.wizardType === 'fc') {
+ PVE.storage.wizard.createFC(me, values, lun);
+ } else {
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ }
},
initComponent: function () {
let me = this;
+ if (!['iscsi', 'fc'].includes(me.wizardType)) {
+ throw 'no SAN storage type specified';
+ }
+ let iscsi = me.wizardType === 'iscsi';
me.subject = PVE.storage.wizard.subject(me.wizardType);
me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
let common = PVE.panel.StorageBase.commonFields(true);
@@ -130,13 +180,35 @@ Ext.define('PVE.storage.wizard.SAN', {
snapshots.hint,
],
};
+ if (!iscsi) {
+ settings.advancedItems = [
+ { ...common.nodes, validator: PVE.storage.wizard.validateNodes },
+ ];
+ }
me.items = [
- { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ ...(iscsi
+ ? [
+ {
+ xtype: 'pveStorageWizardIScsiTarget',
+ title: gettext('Target'),
+ itemId: 'target',
+ },
+ ]
+ : []),
{
xtype: 'pveStorageWizardLunSelect',
title: 'LUN',
itemId: 'luns',
onlineHelp: 'storage_multipath',
+ // the nodes only see a newly mapped Fibre Channel LUN after a rescan
+ rescanNote: iscsi
+ ? undefined
+ : Ext.String.format(
+ gettext(
+ 'After mapping a new LUN on the array, rescan the Fibre Channel hosts of each node (<a href="{0}" target="_blank" rel="noopener noreferrer">documentation</a>).',
+ ),
+ Ext.htmlEncode(Proxmox.Utils.get_help_link('storage_multipath')),
+ ),
},
settings,
{
@@ -171,14 +243,16 @@ Ext.define('PVE.storage.wizard.SAN', {
me.callParent();
let tabs = me.down('#wizcontent');
tabs.on('tabchange', function (tp, tab) {
- if (tab === me.down('#luns')) {
+ if (iscsi && tab === me.down('#luns')) {
me.down('#back').disable();
}
me.down('#submit').setText(
tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
);
});
- me.down('#submit').setText(gettext('Next'));
+ if (iscsi) {
+ me.down('#submit').setText(gettext('Next'));
+ }
me.on('destroy', () => me.reloadCallback?.());
},
});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
index 154836f3b..a0a6d514d 100644
--- a/www/manager6/window/SANLunState.js
+++ b/www/manager6/window/SANLunState.js
@@ -51,9 +51,13 @@ Ext.define('PVE.window.SANLunState', {
margin: '0 0 10 0',
html: Ext.htmlEncode(
Ext.String.format(
- gettext(
- 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
- ),
+ me.fc
+ ? gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array and rescan its Fibre Channel hosts.',
+ )
+ : gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
me.storage,
),
),
^ permalink raw reply related [relevance 18%]
* [PATCH v5 docs 23/36] storage: document the cluster-wide multipath management
2026-11-16 1:23 13% [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
@ 2026-11-16 1:23 18% ` Thomas Lamprecht
2026-11-16 1:23 13% ` [PATCH v5 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
` (2 subsequent siblings)
3 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-16 1:23 UTC (permalink / raw)
To: pve-devel
Add a chapter for multipath on iSCSI and Fibre Channel SANs, written
around the tasks an admin has: prerequisites, setting up shared LVM
with the guided setup or by hand, adding, growing and removing a LUN,
reading the states during a path failure, array-specific settings and
moving over from a hand-made multipath.conf.
Removing a LUN stays a manual procedure, as Proxmox VE never removes a
WWID or a map by itself, so the chapter spells it out including how to
get out of queued I/O.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 282 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 ++-
6 files changed, 312 insertions(+), 6 deletions(-)
create mode 100644 pve-storage-multipath.adoc
diff --git a/pmxcfs.adoc b/pmxcfs.adoc
index 4a334fd..9a1dbd0 100644
--- a/pmxcfs.adoc
+++ b/pmxcfs.adoc
@@ -105,6 +105,8 @@ Files
|`ha/manager_status` | JSON-formatted information regarding HA services on the cluster
|`ha/resources.cfg` | Resources managed by high availability, and their current state
|`ha/rules.cfg` | Rules putting constraints on the HA manager's scheduling of HA resources
+|`multipath-overrides.conf` | Hardware-specific multipath settings, in `multipath.conf` format, applied on all nodes
+|`multipath.cfg` | {pve} cluster-wide multipath configuration (LUN entries)
|`nodes/<NAME>/config` | Node-specific configuration
|`nodes/<NAME>/lxc/<VMID>.conf` | VM configuration data for LXC containers
|`nodes/<NAME>/openvz/` | Prior to {pve} 4.0, used for container configuration data (deprecated, removed soon)
diff --git a/pve-storage-iscsi.adoc b/pve-storage-iscsi.adoc
index a02ed46..2dcc196 100644
--- a/pve-storage-iscsi.adoc
+++ b/pve-storage-iscsi.adoc
@@ -23,6 +23,10 @@ resources.
Low-level iscsi management task can be done using the `iscsiadm` tool.
+TIP: To set up shared LVM on a LUN of an iSCSI target, use the guided setup
+under *Datacenter -> Storage -> SAN* in the web UI, see
+xref:storage_multipath_setup[Multipath].
+
Configuration
~~~~~~~~~~~~~
@@ -38,6 +42,13 @@ target::
iSCSI target.
+managed-multipath::
+
+Combine the paths to each LUN of the target into one `dm-multipath` map on every
+node the storage is enabled on, and monitor the maps cluster-wide. A shared LVM
+storage on a target with several portals needs multipath, through this option
+or set up by hand. See xref:storage_multipath[Multipath].
+
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-iscsidirect.adoc b/pve-storage-iscsidirect.adoc
index ae722e8..97b0979 100644
--- a/pve-storage-iscsidirect.adoc
+++ b/pve-storage-iscsidirect.adoc
@@ -21,7 +21,7 @@ Configuration
~~~~~~~~~~~~~
The user mode iSCSI backend uses the same configuration options as the
-Open-iSCSI backend.
+Open-iSCSI backend, except for `managed-multipath`.
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index 5b88151..3813a06 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -121,6 +121,9 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
+TIP: The guided setup under *Datacenter -> Storage -> SAN* in the web UI creates
+a shared LVM storage on a SAN LUN, see xref:storage_multipath_setup[Multipath].
+
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
devices again, for example with `pvscan --cache`. This command also resets the
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
new file mode 100644
index 0000000..f3eb7b0
--- /dev/null
+++ b/pve-storage-multipath.adoc
@@ -0,0 +1,282 @@
+[[storage_multipath]]
+Multipath
+---------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: Multipath
+endif::wiki[]
+
+Use multipath for shared LVM on an iSCSI or Fibre Channel SAN with redundant
+connections. Device-mapper multipath combines the paths to a LUN into one block
+device, called a map, so I/O can continue when a path fails. Its World Wide
+Identifier (WWID) identifies the same LUN on every node.
+
+{pve} configures maps cluster-wide and shows their state under *Datacenter ->
+Storage -> SAN*. An iSCSI storage with *Multipath* enabled requests maps for its
+LUNs; Fibre Channel LUNs need entries in `/etc/pve/multipath.cfg`. NVMe
+namespaces use kernel-native multipath instead; the procedures below cover SCSI
+LUNs.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before enabling cluster-wide multipath management.
+. Install `multipath-tools` on every participating node. The
+ `libpve-storage-perl` package recommends it, but installations without
+ recommended packages need it added separately. A node without it shows
+ *Multipath unavailable* with the reason under *Datacenter -> Storage -> SAN*.
+ Plain iSCSI and LVM without the multipath option still work without it.
+. Allow each node's iSCSI initiator name on the array; the names are shown under
+ *Datacenter -> Storage -> SAN* and in the guided setup. Install `open-iscsi`
+ if needed.
+ For Fibre Channel, configure zoning and LUN masking for the WWPNs of each
+ node's HBA ports, which `cat /sys/class/fc_host/host*/port_name` lists.
+. Present the same empty LUN to all intended nodes over redundant paths. A node
+ does not scan for a Fibre Channel LUN that is mapped to it later, so rescan
+ the Fibre Channel hosts on each node:
++
+----
+# for host in /sys/class/fc_host/host*; do echo '- - -' > /sys/class/scsi_host/${host##*/}/scan; done
+----
++
+If the LUN still does not show up, check the target ports of the array on the
+node. This lists the WWPN, state and roles of each remote port; those of the
+array need the state `Online` and the role `FCP Target`. A `Blocked` port needs
+its connection restored before a rescan can reach it:
++
+----
+# for port in /sys/class/fc_remote_ports/rport-*; do echo $(cat $port/{port_name,port_state,roles}); done
+----
+
+[[storage_multipath_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~
+
+. Open *Datacenter -> Storage -> SAN* in the web UI on a node that can access
+ the LUN and select *Add Storage -> LVM on iSCSI* or *LVM on Fibre Channel*.
+. For iSCSI, enter a portal, select the target and name the connection storage.
+ This storage connects to the target with `content none` and *Multipath*
+ enabled, while the LVM storage manages guest disks. Continuing creates or
+ reuses the connection storage before you select a LUN.
+. Select the LUN, choose the storage ID and volume group, then confirm. For
+ Fibre Channel, the setup adds the multipath entry of the LUN if it has none.
+ It then waits for the map on the node serving the web UI and sets *Expected
+ Paths* of that entry to the number of paths of the map, if that is at least
+ two. Existing entries and maps stay as they are. Set *Expected Paths* in the
+ entry if it is missing or does not match the intended topology, for example
+ because a fabric was down at that time or nodes have different path counts.
+ Leave *Nodes* empty for all nodes. Virtual machines on the storage can only
+ have snapshots with *Allow Snapshots as Volume-Chain*, a technology preview
+ that applies to disks created after it is set; see
+ xref:pvesm_lvm_config[LVM configuration].
+. Check the state of the LUN on each node of the storage, which the setup
+ shows once the storage is added. Before that, only the node serving the web
+ UI looked at the LUN; the LUN list names it as *Scan node*. The other nodes
+ set the LUN up with their next status updates and show *Pending* during the
+ first minute. For a node that stays *Missing*, check its access to the LUN
+ on the array before placing guests on the storage. *OK (1 path)* means that
+ the node reaches the LUN over a single path. The *State* column of the view
+ shows the same later.
+
+A LUN that a storage uses cannot be selected, and the setup refuses a LUN that
+contains data. To reuse such a LUN, first stop all its users on all hosts and
+remove its storage references, then use *Wipe* under *Node -> SAN* as
+`root@pam`. This destroys its data. Before the setup or the wipe writes to a
+LUN, the node checks for processes that have it open, for example a guest that
+uses it as a disk. This does not find every user: not one that opened the LUN
+through another device node or a single path, and none on other hosts. To keep
+a volume group that a LUN already holds, do not wipe the LUN: add the volume
+group under *Datacenter -> Storage -> Add -> LVM* with *Shared* enabled. The
+usage shown for a LUN is cached per node, so other nodes can still show the old
+content after a wipe. If setup fails, check the error, the node's task log and
+*Datacenter -> Storage* before retrying; closing the dialog does not undo
+changes.
+
+The dialogs under *Datacenter -> Storage -> Add* can do the same for iSCSI in
+two steps: add an *iSCSI* storage with *Multipath* enabled and *Use LUNs
+directly* cleared, then an *LVM* storage with it as *Base storage* and the LUN
+as *Base volume*. Selecting a base storage enables *Shared*; keep it enabled.
+
+To set up iSCSI by hand, run these commands on a node with access to the target:
+
+----
+# pvesm add iscsi <connection> --portal <portal> --target <iqn> \
+ --content none --managed-multipath 1
+# pvesm list <connection> --content images
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, including the connection storage
+prefix and the `dm-uuid-mpath-<wwid>` suffix. Adding the LVM storage creates the
+volume group. Keep its base volume: it connects the target before LVM
+activation.
+
+For Fibre Channel, add an entry with the number of paths each node should
+have, wait for the scan to show a by-id path with `dm-uuid-mpath-<wwid>`, then
+create the volume group and shared storage:
+
+----
+# pvesh create /cluster/multipath/wwid --wwid <wwid> --paths-expected <paths>
+# pvesm scan san-luns --output-format json
+# pvesh create /nodes/<node>/disks/lvm --name <storage> \
+ --device /dev/disk/by-id/dm-uuid-mpath-<wwid> --add_storage 1
+----
+
+These examples allow all nodes. For a subset, set `--nodes <nodes>` on the
+entry or iSCSI storage and on the LVM storage (`pvesm set <storage> --nodes
+<nodes>`), using a comma-separated list. `pvesh` waits for the creation task;
+check its output for errors before using the storage.
+
+Adding Another LUN
+~~~~~~~~~~~~~~~~~~
+
+. Present the new LUN to the same nodes on the array. Enabled iSCSI storages
+ rescan their sessions automatically; for Fibre Channel, rescan the hosts as
+ shown in the prerequisites.
+. Run the guided setup again. For iSCSI, select the same target to reuse its
+ connection storage. If it lacks *Multipath*, enable that option in its edit
+ dialog first, observing the migration advice below.
+. Select the new LUN and create a separate LVM storage. By hand, repeat the
+ iSCSI listing and LVM command above, or the Fibre Channel procedure.
+
+[[storage_multipath_grow]]
+Growing a LUN
+~~~~~~~~~~~~~
+
+. Grow the LUN on the array. Never shrink a LUN in use.
+. Wait for the iSCSI session rescan, or rescan each SCSI path on every Fibre
+ Channel node with `echo 1 > /sys/block/<path>/device/rescan`, where `<path>`
+ is a member device such as `sdc`, not the map.
+. Check the map size on every node with `multipath -ll <wwid>` or under
+ *Node -> SAN*. The generated configuration sets `auto_resize grow_only`:
+ the map grows once all its paths report the new size. If necessary, run
+ `multipathd resize map <map>` after all paths have grown.
+. Run `pvresize /dev/disk/by-id/dm-uuid-mpath-<wwid>` on one node only, after
+ every node's map has grown. A smaller map cannot access the added space.
+
+[[storage_multipath_remove]]
+Removing a LUN
+~~~~~~~~~~~~~~
+
+{pve} never flushes maps or removes WWIDs from `/etc/multipath/wwids`.
+Removing a configuration entry is not enough. A map that queues I/O without
+paths can block guests and LVM commands, so disable queueing before unmapping:
+
+. Stop all users of the LUN on all hosts, or move their data elsewhere. Remove
+ the LVM storage with `pvesm remove <storage>` and deactivate its volume group
+ on every node with `vgchange -an <vg>`. Neither command erases the data.
+. Set an existing entry to fail I/O with
+ `pvesh set /cluster/multipath/wwid/<wwid> --no-path-retry fail`.
+ If none exists, create one with
+ `pvesh create /cluster/multipath/wwid --wwid <wwid> --no-path-retry fail`.
+ Add `--nodes <nodes>` if only a subset of nodes sees the LUN.
+. Wait until `multipath -ll <wwid>` on every participating node no longer lists
+ `queue_if_no_path` in the map's features. Wait for offline nodes to return.
+ Record the map name and member devices, and each member's identifier from
+ `/sys/block/<path>/device/wwid`.
+. Unmap the LUN on the array.
+. On every node, flush the map with `multipath -f <map>`. If it is busy, retry
+ after a few seconds; if it stays busy, find and stop its remaining users. Do
+ not force removal. For each recorded path,
+ check that its identifier is unchanged, then delete it with
+ `echo 1 > /sys/block/<path>/device/delete`. Skip paths already gone; stop if
+ an identifier changed.
+. Remove the explicit entry with `pvesh delete /cluster/multipath/wwid/<wwid>`.
+ Removing it earlier makes the nodes apply the default retry policy of the
+ array again, which can queue I/O on a map that is not flushed yet and block
+ whatever opens it.
+. On every node, wait until its next status update has removed the WWID from
+ `/etc/multipath/conf.d/pve-aliases.conf`, which takes about ten seconds, then
+ run `multipath -w <wwid>` to remove it from the allow-list. Running it before
+ that update can let the update add the WWID again. Check that
+ `grep -c '^/<wwid>/$' /etc/multipath/wwids` prints 0, and again after the
+ next status update.
+
+If the LUN was already unmapped and I/O is stuck, run
+`multipathd disablequeueing map <map>` on each affected node, then continue
+with the removal procedure.
+
+[[storage_multipath_disconnect]]
+Removing an iSCSI connection storage does not log out its sessions. Keep it
+while other LUNs of the target are in use; session maintenance is done with
+`iscsiadm`, not the read-only *Node -> SAN -> iSCSI* view.
+
+Checking Path Failures
+~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> Storage -> SAN* shows node availability, configuration errors
+and LUN states. It lists the LUNs that {pve} manages or uses: those with an
+explicit entry, those of an iSCSI storage with *Multipath* enabled, and those
+that hold the volume group of a storage. Other maps of a node, for example the
+ones of a third-party storage plugin, are only counted under *Other Maps*;
+*Node -> SAN* lists them as well. The volume groups come from the hint file of
+LVM. While LVM has none, for example because it sees duplicate PVs, a node does
+not report a LUN that only its volume group relates to a storage. Such a LUN
+shows *Unknown* for that node, or is not listed if no node reports it.
+
+The *State* of a LUN is the worst state among its nodes. Unless
+that is *Optimal*, it names the nodes in that state if they are only some of
+the nodes. Hover over it for the states and path counts of all nodes.
+*Multipath* describes how the map is managed, not its health: by an explicit
+entry, by the storage that requests it, or *Unmanaged* for a map that {pve} did
+not set up. Under *Node -> SAN*, expand the LUN to inspect individual paths.
+*Node -> SAN -> iSCSI* shows targets and sessions.
+
+*Optimal*:: All known paths are usable and no expected path is missing.
+*OK (1 path)*:: The only path is usable, and there is no other path to fail
+over to. The API reports this as `optimal` with one path.
+*Degraded*:: Some paths are unusable or fewer paths exist than expected.
+*Failed*:: No usable path remains; I/O queues or fails according to the retry
+policy.
+*Missing*:: A node with a current report is expected to have the LUN but does
+not.
+*Unknown*:: No usable current observation is available for that node.
+
+During a path failure, inspect the degraded LUN's paths and restore the failed
+connection. The state returns to *Optimal* when the paths recover. Check node
+availability too: unknown observations do not worsen a known LUN state.
+
+The status report of a node is limited to 32 KiB, which is enough for about 180
+listed LUNs with typical names. A node with more reports `too many LUNs to
+report` and no LUNs: those that the configuration expects on it show *Unknown*
+for that node, and LUNs that only this node reports are missing from the list.
+
+An iSCSI storage expects one path per portal. For a Fibre Channel LUN, set
+*Expected Paths* in its multipath entry, as the guided setup does. Without it,
+a node only shows as *Degraded* while its lost paths are still listed.
+Depending on the settings for the array, the kernel removes a path that stays
+down longer than `dev_loss_tmo`, and the map then shows *Optimal* with fewer
+paths, or *OK (1 path)* for the last one.
+
+[[storage_multipath_config]]
+Array Settings and Existing Configurations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Use the built-in device profiles unless the array vendor requires changes.
+*Edit Overrides* under *Datacenter -> Storage -> SAN* edits
+`/etc/pve/multipath-overrides.conf` for all nodes. For example, to set a retry
+count for one array model (replace the vendor and product expressions):
+
+----
+devices {
+ device {
+ vendor "<vendor>"
+ product "<product>"
+ no_path_retry 12
+ }
+}
+----
+
+To move from a hand-made `/etc/multipath.conf`:
+
+. Back up the local configuration on every node. Move shared array settings to
+ the overrides file; add WWID entries under *Datacenter -> Storage -> SAN* for
+ Fibre Channel LUNs or per-LUN aliases and `no-path-retry` settings.
+. Enable *Multipath* on existing iSCSI storages. Keep existing LVM base volumes.
+ Check `multipathd show config` on every node before removing duplicate local
+ settings. Do not edit the generated `/etc/multipath/conf.d/pve-*.conf` files.
+. Check active volume dependencies with `lsblk` on each node. Enabling multipath
+ does not move active volumes off individual paths. Stop and restart affected
+ guests, or migrate them away and back, before relying on path redundancy.
+ Keep LVM component detection enabled and follow the
+ xref:storage_lvm[shared LVM autoactivation guidance].
diff --git a/pvesm.adoc b/pvesm.adoc
index 5bd24b2..5668a41 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -96,11 +96,10 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, FibreChannel (FC), or SAS block storage as shared storage in a
-cluster, LVM is used to split the LUN into virtual disks. The
-https://pve.proxmox.com/wiki/Multipath[Multipath Guide] explains how to
-configure it in a cluster, including multipathing which is usually a
-requirement in these scenarios.
+^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
+a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
+reachable over several paths; xref:storage_multipath[Multipath] describes how
+{pve} manages them in a cluster.
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -153,6 +152,11 @@ also useful for local storage types. In this case such local storage
is available on all nodes, but it is physically different and can have
totally different content.
+Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
+on a xref:storage_multipath_setup[SAN LUN], use the guided setup under
+*Datacenter -> Storage -> SAN -> Add Storage* instead. It creates the storages
+that are needed and enables multipath for the LUN.
+
Storage Pools
~~~~~~~~~~~~~
@@ -421,6 +425,8 @@ See Also
* link:/wiki/Storage:_iSCSI[Storage: iSCSI]
+* link:/wiki/Storage:_Multipath[Storage: Multipath]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -463,6 +469,8 @@ include::pve-storage-iscsi.adoc[]
include::pve-storage-iscsidirect.adoc[]
+include::pve-storage-multipath.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 18%]
* [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
@ 2026-11-16 1:23 13% Thomas Lamprecht
2026-11-16 1:23 18% ` [PATCH v5 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
` (3 more replies)
0 siblings, 4 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-16 1:23 UTC (permalink / raw)
To: pve-devel
This is v5 of the combined and reduced series of the cluster-wide
multipath work [0][1] and Dietmar's RFC for guided remote storage setup
and SAN visibility [2].
Most changes since v4 [3] come from feedback from Blockbridge – a
third-party storage plugin vendor. Their plugin attaches one LUN per
guest disk, so a plain upgrade hits nodes with several hundred multipath
maps that are not ours:
- The iSCSI storage option is named 'managed-multipath' now. Their
plugin defines a 'multipath' property, and a property that two
plugins define stops PVE::Storage from loading. Per-plugin property
isolation would be the real answer, but a single plugin that opts
in switches the storage API to a schema in which updates need the
type, so 'pvesm set' and the edit dialogs fail for all storages of
that node. We (I and/or Max, Wolfgang) will look into completing that
separately.
- A node reports the maps that Proxmox VE manages or has a storage
on, and counts the rest. Before, every map got a row, and beyond
about 185 of them the report no longer fit into the 32 KiB of a
value in the node key-value store, which cost the node the state of
our LUNs as well.
- The LUN scan no longer queries udev for the paths of a map. With
1000 additional maps on a node that was one udevadm call for each of
2000 path devices and 13 seconds per scan, for views that poll it
every few seconds. It is 2 seconds now.
- Writing to a LUN, for a new volume group or a wipe, is refused while
a process of the node has it open. A guest that got the LUN from a
plugin or by its device path is neither a holder nor a storage
reference, and such a node lists hundreds of them. v3 had a broader
census of device users, which I dropped in v4 with the rest of that
machinery; this is the cheap part of it.
The alleged long multipathd query time on every status pass I could not
reproduce as a problem, as it took 30 ms for those 1000 maps on a small
nested node and the status loop stayed in its normal cycle.
Overview of what an admin gets with this:
- Datacenter > Storage > SAN, a new entry below Storage, shows the
multipath state of every node and of the LUNs that Proxmox VE
manages or has a storage on, and edits the multipath entries and
array-specific overrides. I explicitly chose this over the
client/plugin side of Storage, as we do not have e.g. Ceph or
ZFS/LVM/... creation in there either. We might want to rethink and
consolidate our storage interface vs. management story in the
future, but IMO a partial switch now is not worth it, that would add
even more potential for confusion than the new SAN view.
- Its Add Storage menu guides through shared LVM on a LUN: for iSCSI
it connects or reuses a target, with the initiator names of all
nodes at hand, for Fibre Channel it takes a LUN the nodes already
see. Both set up multipath for the LUN and end with its state on
every node of the new storage.
- Datacenter > Storage > Add keeps its dialogs. The iSCSI one gets a
Multipath option and the LVM one enables Shared for a base storage,
so the same works there in two steps. Both name the SAN view in a
note whose link opens it, as admins coming from other platforms look
for their SAN there first.
- Node > SAN lists the LUNs of a node with their paths and usage, can
wipe a LUN that no storage uses, and shows the iSCSI sessions.
The rules the series follows since v4, in short: nodes add WWIDs and
maps but never remove them, a write is checked where it happens, lists
do not probe devices, there are no new iSCSI operations, the guided
setup makes the API calls an admin would make by hand, and multipath
management is turned on by the admin. The v4 cover [3] has the reasons
and what each of them costs.
Two things an admin will likely miss: there is no notification when a
LUN loses path redundancy, the state only shows on the SAN pages and in
the API. A node with fewer paths than its iSCSI portals or the expected
paths of the LUN's entry at least shows as degraded there, and a LUN
that only has one path reads "OK (1 path)" instead of optimal. And Fibre
Channel starts at a LUN the nodes already see, the web UI neither lists
the WWPNs of the nodes nor rescans their HBAs; the chapter gives the
commands for both, and the setup points to the rescan.
How it works:
- /etc/pve/multipath.cfg holds explicit entries per WWID (nodes, alias,
no-path-retry, expected paths), /etc/pve/multipath-overrides.conf
array settings in multipath.conf syntax; patch 01 registers
both. An iSCSI storage with the new 'managed-multipath' option
supplies its LUNs without entries, a Fibre Channel LUN gets an
explicit entry unless it has a map already.
- pvestatd calls one function of pve-storage per pass. It adds the
WWIDs the node needs to /etc/multipath/wwids, writes the drop-ins
/etc/multipath/conf.d/pve-*.conf (entries, overrides and one
generated default, auto_resize grow_only) and reloads multipathd
when something changed. The same call publishes the state of the
maps that the node manages or that hold the volume group of a
storage, and the number of its other maps, through the node
key-value store (key 'multipath').
- /cluster/multipath/status aggregates these reports, derives
'missing' from the configuration and names the storage that requests
each map; /cluster/multipath/{wwid,overrides} edit the two files.
- The volumes of an iSCSI storage with the option end in
dm-uuid-mpath-<wwid> instead of the name of one path, so an LVM
storage uses them through the existing 'base' mechanism.
- /nodes/{node}/scan/san-luns and 'pvesm scan san-luns' return one row
per LUN with a WWID, /nodes/{node}/iscsi/{status,target} the
read-only session view.
- Volume group creation and wipe run under a cluster lock per LUN
(cfs_lock_domain) and do not hold the storage configuration lock
while they write. Adding an LVM storage with a new base volume still
does, as before. Both refuse a LUN that a process of the node has
open.
- multipath-tools becomes a Recommends of libpve-storage-perl. Nodes
without it report that; plain iSCSI and LVM are unaffected.
Patches:
- cluster 01: register the two configuration files
- storage 02-22: helpers for the disk and iSCSI session inventory
(mostly Dietmar's), the multipath library and configuration, the
iSCSI option, the per-node apply and status with their API, the LUN
inventory, the read-only iSCSI status, volume groups on LUNs and the
wipe, in that order
- docs 23: the multipath chapter, rewritten around tasks
- manager 24-36: the pvestatd call, report and API mounts, then
the views, the two dialog changes, the two guided setups and the
note in the add dialogs
Changes since v4 [3]:
- renamed the iSCSI storage option 'multipath' to 'managed-multipath'
in storage.cfg, API and CLI; the web UI keeps the label Multipath
- the node report has rows for maps with an explicit entry for the
node, of an iSCSI storage with the option, that are the base volume
of an LVM storage or that hold the volume group of a storage, and
the new 'other-maps' count for the rest. The SAN panel shows that
count in a column of the node list once a node has such maps. The
volume groups come from LVM's hint file; a node that leaves maps
out without one says so, and counts as unknown instead of missing
for a LUN that only a volume group relates to a storage there. A
report over the size limit keeps the initiator name, and the
chapter names the limit
- the LUN scan leaves the paths of maps out before the disk
enumeration
- volume group creation on a LUN and the wipe check for processes
that have the LUN open. That reads /proc/<pid>/fd, so it does not
see an open through another device node, for example one of a
container
- both also stop if a device name they use no longer means the LUN
they hold open, the wipe also for the partitions it clears and for
its exclusive descriptor. Creating a volume group checked and
initialized the kernel name it was called with, but cleared the
first sector through the by-id name, and a map can get another name
while the lock is awaited
- a volume group on a partition of a multipath map counts for the map
- the Fibre Channel setup offers SCSI LUNs only. It also listed
NVMe/FC namespaces, which the cluster-wide status does not cover, so
its closing window stayed empty for them
- the LUN step only asks to wipe data that is no longer needed, and
the chapter says how to keep a volume group that a LUN already has
- from an automated review of v4: the multipath values of the LUN
scan are described in the API, the portal label is translatable,
imports are grouped, the new iSCSI topology module uses signatures,
WWID and map UUID patterns use ASCII digit classes, three statement
modifiers after multi-line calls became blocks, some comments and
commit messages got reworded
- rebased onto current master in pve-storage, pve-manager and
pve-cluster
When applying, versioned dependencies have to be set: pve-manager on
libpve-storage-perl, and libpve-storage-perl (also as build dependency)
on the libpve-cluster-perl with patch 01, as PVE::Storage
registers the two files when it is loaded. If the bound for LVM status
commands [4] gets applied too, whichever is applied second has to pass
the status cache to the two lvm_vgs() calls of the base volume
activation, they can block a status pass otherwise.
The per-node target and portal series [5][6] are independent of this
one. It takes the LUNs of an iSCSI storage from the sessions of its one
target, so if a storage can have several targets per node, whichever is
applied second has to cover that.
For v4 I tested this on a six-node nested cluster attached to a NetApp
AFF A20 with three iSCSI portals and to Linux LIO targets with two: the
guided iSCSI setup with a new and with a reused connection storage, the
same through the plain dialogs and from the CLI as documented, a LUN
that one node is not allowed to see and gets access later, the Fibre
Channel flow through the web UI, also as an administrator other than
root@pam, a guest on the resulting storages (snapshot, rollback, online
resize, live migration, one path cut under I/O), growing a LUN, wipe and
its refusals, one path and all paths down with queued I/O, a stopped
multipathd, a node reboot and the documented LUN removal. The lab has no
FC hardware, so I emulated it with software FCoE in VN2VN mode and an
LIO tcm_fc target on two fabrics: the nodes get real FC host and remote
port objects, and the documented WWPN listing, rescan and LUN growth
work there as written. The guided Fibre Channel setup ran on such a LUN,
with one node on one fabric only and one node that saw the LUN only
after the rescan. The setup records the paths it sees in the LUN's
entry, so the node on one fabric shows as degraded, and a fabric cut
stays degraded also after the kernel removed the lost paths (66 seconds
dev_loss_tmo of the LIO profile). Real HBA drivers were not tested. Most
of that ran with the NVMe over Fabrics series on top and with the LVM
status patch [4] applied, the series alone ran on one node of that
cluster for the guided setups, the CLI procedure and the views. Without
[4] a stuck LVM command blocks pvestatd as on master.
For v5 I upgraded that cluster from the v4 build, renamed the option in
its storage.cfg and checked that the storages on the NetApp and LIO LUNs
stay active with their guests running. I emulated the plugin vendor's
case with scsi_debug, two hosts with the same LUN identities, so 1000
additional maps with two paths each on one node: report, status loop and
scan before and after the changes, both SAN views after them. The wipe
refusal for an open LUN ran on such a map, with a process holding it
open, the one of volume group creation on a LIO LUN, followed by the
creation without the process. A hand-made map under a shared LVM storage
on two nodes covered the case of a node without LVM hints and the one of
a volume group on a partition of the map. The guided iSCSI setup ran
once more on a NetApp LUN, from wiping its old volume group to the
documented removal. The rest of the list above was not repeated for v5,
although the changes touch what those flows use: the LUN scan, the
status report, the write checks and the LUN selection of the Fibre
Channel setup.
[0]: https://lore.proxmox.com/pve-devel/20260626121000.2095591-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20260703124707.1172980-2-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20260731102156.3947857-1-dietmar@proxmox.com/
[3]: https://lore.proxmox.com/pve-devel/20261113030146.1559030-1-t.lamprecht@proxmox.com/
[4]: https://lore.proxmox.com/pve-devel/20261111015217.941220-1-t.lamprecht@proxmox.com/
[5]: https://lore.proxmox.com/pve-devel/20260430173220.441001-1-m.limbeck@proxmox.com/
[6]: https://lore.proxmox.com/pve-devel/20260804090819.2136483-1-dietmar@proxmox.com/
pve-cluster:
Thomas Lamprecht (1):
cfs: observe the multipath configuration files
src/PVE/Cluster.pm | 2 ++
src/pmxcfs/status.c | 2 ++
2 files changed, 4 insertions(+)
pve-storage:
Dietmar Maurer (8):
diskmanage: collect disk transport type from lsblk
diskmanage: qualify NVMe over fabrics transport
diskmanage: optionally include iSCSI session devices in disk enumeration
diskmanage: collect native NVMe multipath path state
iscsi: factor out session device map from device list
diskmanage: add helper to list multipath devices
pvesm: expose the SAN LUN inventory
api: add node-level iSCSI status
Thomas Lamprecht (13):
multipath: add a library around multipathd
multipath: add a cluster-wide configuration
iscsi: add an option to manage storage LUNs with multipath
lvm: activate a missing base volume before using the volume group
multipath: apply the configuration on every node
multipath: publish per-node status
api: add endpoints for the cluster-wide multipath configuration
api: multipath: add the cluster-wide health status
api: scan: add a SAN LUN inventory
disks: lvm: drop unused imports
disks: lvm: allow volume groups on SAN LUNs and multipath maps
disks: lvm: refuse to destroy the volume group of a shared storage
disks: allow wiping a SAN LUN that no storage uses
debian/control | 3 +-
src/PVE/API2/Disks.pm | 36 +-
src/PVE/API2/Disks/LVM.pm | 64 ++-
src/PVE/API2/ISCSI.pm | 166 +++++++
src/PVE/API2/Makefile | 2 +
src/PVE/API2/Multipath.pm | 454 ++++++++++++++++++
src/PVE/API2/Storage/Scan.pm | 202 ++++++++
src/PVE/CLI/pvesm.pm | 14 +
src/PVE/Diskmanage.pm | 277 +++++++++--
src/PVE/ISCSI/Topology.pm | 86 ++++
src/PVE/Makefile | 6 +
src/PVE/Multipath.pm | 213 ++++++++
src/PVE/Multipath/Config.pm | 205 ++++++++
src/PVE/Multipath/Generator.pm | 114 +++++
src/PVE/Multipath/Identity.pm | 44 ++
src/PVE/Multipath/Status.pm | 220 +++++++++
src/PVE/Storage/ISCSIPlugin.pm | 212 ++++----
src/PVE/Storage/LVMPlugin.pm | 146 +++++-
src/PVE/Storage/Makefile | 3 +-
src/PVE/Storage/SAN.pm | 352 ++++++++++++++
src/test/Makefile | 34 +-
src/test/disk_api_test.pm | 256 ++++++++++
src/test/disk_tests/iscsi/disklist | 1 +
.../disk_tests/iscsi/disklist_expected.json | 19 +
src/test/disk_tests/iscsi/lsblk | 5 +
src/test/disk_tests/iscsi/sda/device/model | 1 +
src/test/disk_tests/iscsi/sda/device/vendor | 1 +
.../disk_tests/iscsi/sda/queue/rotational | 1 +
src/test/disk_tests/iscsi/sda/size | 1 +
src/test/disk_tests/iscsi/sda_udevadm | 21 +
src/test/disk_tests/multipath/disklist | 11 +
.../multipath/disklist_expected.json | 107 +++++
src/test/disk_tests/multipath/dm-0/dm/name | 1 +
src/test/disk_tests/multipath/dm-0/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-0/size | 1 +
src/test/disk_tests/multipath/dm-0_slaves | 4 +
src/test/disk_tests/multipath/dm-1/dm/name | 1 +
src/test/disk_tests/multipath/dm-1/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-1/size | 1 +
src/test/disk_tests/multipath/dm-1_slaves | 4 +
src/test/disk_tests/multipath/dm-2/dm/name | 1 +
src/test/disk_tests/multipath/dm-2/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-2/size | 1 +
src/test/disk_tests/multipath/dm-2_slaves | 0
src/test/disk_tests/multipath/dm-3/dm/name | 1 +
src/test/disk_tests/multipath/dm-3/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-3/size | 1 +
src/test/disk_tests/multipath/dm-3_slaves | 0
src/test/disk_tests/multipath/dm-4/dm/name | 1 +
src/test/disk_tests/multipath/dm-4/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-4/size | 1 +
src/test/disk_tests/multipath/dm-4_slaves | 0
src/test/disk_tests/multipath/lsblk | 77 +++
src/test/disk_tests/multipath/lvs | 0
src/test/disk_tests/multipath/mounts | 1 +
.../multipath/multipath_expected.json | 59 +++
src/test/disk_tests/multipath/multipathd | 124 +++++
.../multipath/multipathd_status_expected.json | 40 ++
.../nvme-subsystem/nvme-subsys0/nvme3/address | 1 +
.../nvme-subsys0/nvme3/nvme2c3n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme3/state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/address | 1 +
.../nvme-subsys0/nvme4/nvme2c4n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/state | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/address | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/state | 1 +
.../disk_tests/multipath/nvme8n1/device/model | 1 +
.../multipath/nvme8n1/device/transport | 1 +
.../multipath/nvme8n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme8n1/size | 1 +
src/test/disk_tests/multipath/nvme8n1_udevadm | 14 +
.../disk_tests/multipath/nvme9n1/device/model | 1 +
.../multipath/nvme9n1/device/transport | 1 +
.../multipath/nvme9n1/device/vendor | 1 +
.../multipath/nvme9n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme9n1/size | 1 +
src/test/disk_tests/multipath/nvme9n1_udevadm | 12 +
.../multipath/nvme_path_status_expected.json | 19 +
src/test/disk_tests/multipath/partlist | 0
src/test/disk_tests/multipath/pvs | 1 +
.../disk_tests/multipath/sda/device/model | 1 +
.../disk_tests/multipath/sda/device/vendor | 1 +
.../disk_tests/multipath/sda/holders/holder | 1 +
.../disk_tests/multipath/sda/queue/rotational | 1 +
src/test/disk_tests/multipath/sda/size | 1 +
src/test/disk_tests/multipath/sda_udevadm | 18 +
.../disk_tests/multipath/sdb/device/model | 1 +
.../disk_tests/multipath/sdb/device/vendor | 1 +
.../disk_tests/multipath/sdb/holders/holder | 1 +
.../disk_tests/multipath/sdb/queue/rotational | 1 +
src/test/disk_tests/multipath/sdb/size | 1 +
src/test/disk_tests/multipath/sdb_udevadm | 18 +
.../disk_tests/multipath/sdc/device/model | 1 +
.../disk_tests/multipath/sdc/device/vendor | 1 +
.../disk_tests/multipath/sdc/holders/holder | 1 +
.../disk_tests/multipath/sdc/queue/rotational | 1 +
src/test/disk_tests/multipath/sdc/size | 1 +
src/test/disk_tests/multipath/sdc_udevadm | 18 +
.../disk_tests/multipath/sdd/device/model | 1 +
.../disk_tests/multipath/sdd/device/vendor | 1 +
.../disk_tests/multipath/sdd/holders/holder | 1 +
.../disk_tests/multipath/sdd/queue/rotational | 1 +
src/test/disk_tests/multipath/sdd/size | 1 +
src/test/disk_tests/multipath/sdd_udevadm | 18 +
src/test/disk_tests/multipath/zpool | 1 +
.../disk_tests/sas/disklist_expected.json | 1 +
src/test/disk_tests/sas/lsblk | 5 +
src/test/disklist_test.pm | 107 ++++-
src/test/multipath-three-states.json | 52 ++
src/test/run_disk_api_tests.pl | 11 +
src/test/run_iscsi_activation_tests.pl | 86 ++++
src/test/run_lun_identity_tests.pl | 48 ++
src/test/run_multipath_api_tests.pl | 444 +++++++++++++++++
src/test/run_multipath_tests.pl | 169 +++++++
src/test/run_san_api_tests.pl | 94 ++++
src/test/run_san_library_tests.pl | 135 ++++++
src/test/run_san_lun_scan_tests.pl | 197 ++++++++
src/test/run_san_nvme_tests.pl | 108 +++++
src/test/run_san_taint_tests.pl | 60 +++
src/test/run_san_wipe_tests.pl | 190 ++++++++
src/test/run_test_lvm_base_activation.pl | 118 +++++
src/test/run_test_lvm_base_conflicts.pl | 233 ++++++---
src/test/run_test_lvm_create.pl | 41 ++
123 files changed, 5622 insertions(+), 234 deletions(-)
pve-docs:
Thomas Lamprecht (1):
storage: document the cluster-wide multipath management
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 282 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 ++-
6 files changed, 312 insertions(+), 6 deletions(-)
pve-manager:
Dietmar Maurer (2):
api: nodes: expose the iSCSI status
ui: node: san: show iSCSI targets and sessions
Thomas Lamprecht (11):
pvestatd: apply the multipath configuration and report the node status
report: add the managed multipath configuration
api: cluster: add the multipath endpoints
ui: dc: add a SAN view
ui: storage: iscsi: add the multipath option
ui: lvm: enable shared when a base storage is selected
ui: node: add SAN LUNs panel
ui: node: san: wipe a LUN that no storage uses
ui: dc: san: add a guided setup for shared LVM on iSCSI
ui: dc: san: add a guided setup for shared LVM on Fibre Channel
ui: storage: point the iSCSI and LVM add dialogs to the SAN view
PVE/API2/Cluster.pm | 7 +
PVE/API2/Nodes.pm | 7 +
PVE/Report.pm | 3 +
PVE/Service/pvestatd.pm | 7 +
www/manager6/Makefile | 12 +
www/manager6/SANUtils.js | 161 ++++++++
www/manager6/Utils.js | 14 +
www/manager6/dc/Config.js | 23 +-
www/manager6/dc/MultipathWwidEdit.js | 81 ++++
www/manager6/dc/SAN.js | 347 ++++++++++++++++++
www/manager6/node/Config.js | 24 ++
www/manager6/node/ISCSITargets.js | 122 ++++++
www/manager6/node/SANLuns.js | 184 ++++++++++
www/manager6/storage/Base.js | 5 +
www/manager6/storage/IScsiEdit.js | 46 +++
www/manager6/storage/LVMEdit.js | 6 +
www/manager6/storage/wizard/FibreChannel.js | 162 ++++++++
www/manager6/storage/wizard/IScsi.js | 272 ++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 179 +++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 +++++
www/manager6/storage/wizard/Wizard.js | 258 +++++++++++++
www/manager6/window/SANLunState.js | 115 ++++++
www/manager6/window/SANLunWipe.js | 53 +++
23 files changed, 2165 insertions(+), 6 deletions(-)
^ permalink raw reply [relevance 13%]
* superseded: [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup
2026-11-05 23:30 13% [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup Thomas Lamprecht
2026-11-05 23:31 12% ` [PATCH v3 docs 44/76] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-05 23:31 4% ` [PATCH v3 manager 53/76] ui: storage wizard: add Fibre Channel shared LVM setup Thomas Lamprecht
@ 2026-11-13 3:07 9% ` Thomas Lamprecht
2 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-13 3:07 UTC (permalink / raw)
To: pve-devel
Superseded-by: https://lore.proxmox.com/pve-devel/20261113030146.1559030-1-t.lamprecht@proxmox.com/
^ permalink raw reply [relevance 9%]
* [PATCH docs 10/17] storage: document NVMe over Fabrics storages
2026-11-13 3:04 9% [PATCH storage,docs,manager 00/17] NVMe over Fabrics storage Thomas Lamprecht
@ 2026-11-13 3:04 20% ` Thomas Lamprecht
0 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-13 3:04 UTC (permalink / raw)
To: pve-devel
Add a chapter for the nvmeof storage type: prerequisites, setting up
shared LVM on a namespace with the guided setup or by hand, the
properties, checking and disconnecting paths, and the limits of this
first version.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pve-storage-multipath.adoc | 4 +-
pve-storage-nvmeof.adoc | 161 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 20 +++--
3 files changed, 177 insertions(+), 8 deletions(-)
create mode 100644 pve-storage-nvmeof.adoc
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
index d4503a7..c7b2143 100644
--- a/pve-storage-multipath.adoc
+++ b/pve-storage-multipath.adoc
@@ -14,8 +14,8 @@ Identifier (WWID) identifies the same LUN on every node.
{pve} configures maps cluster-wide and shows their state under *Datacenter ->
Storage -> SAN*. An iSCSI storage with *Multipath* enabled requests maps for its
LUNs; Fibre Channel LUNs need entries in `/etc/pve/multipath.cfg`. NVMe
-namespaces use kernel-native multipath instead; the procedures below cover SCSI
-LUNs.
+namespaces use kernel-native multipath instead, see
+xref:storage_nvmeof[NVMe over Fabrics]; the procedures below cover SCSI LUNs.
Prerequisites
~~~~~~~~~~~~~
diff --git a/pve-storage-nvmeof.adoc b/pve-storage-nvmeof.adoc
new file mode 100644
index 0000000..d2faf0f
--- /dev/null
+++ b/pve-storage-nvmeof.adoc
@@ -0,0 +1,161 @@
+[[storage_nvmeof]]
+NVMe over Fabrics Backend
+-------------------------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: NVMe over Fabrics
+endif::wiki[]
+
+Storage pool type: `nvmeof`
+
+NVMe over Fabrics (NVMe-oF) gives a node access to the namespaces of an NVMe
+subsystem on a storage array over TCP. Namespaces are the NVMe counterpart of
+LUNs. Use one as the base volume of a shared LVM storage, or use the namespaces
+directly as disk images.
+
+Each node connects one controller per portal of the storage. The kernel
+combines these paths into one device per namespace with its native NVMe
+multipath and reconnects lost paths on its own. `multipath-tools` is not
+involved.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before adding the first NVMe over Fabrics storage.
+. Install `nvme-cli` on every participating node. The `libpve-storage-perl`
+ package recommends it, but installations without recommended packages need it
+ added separately. Its installation creates the node's host NQN in
+ `/etc/nvme/hostnqn` and host ID in `/etc/nvme/hostid`. Nodes cloned from one
+ image share them. Give each a new identity before it connects, with
+ `nvme gen-hostnqn > /etc/nvme/hostnqn` and `uuidgen > /etc/nvme/hostid`.
+. Allow each node's host NQN on the array. The names are shown under
+ *Datacenter -> Storage -> SAN* and in the guided setup.
+. Present the same empty namespace to all intended nodes. Portals are IP
+ addresses that every node can reach; host names are not accepted.
+. Keep native NVMe multipath enabled, which is the kernel default
+ (`nvme_core.multipath=Y`).
+
+[[storage_nvmeof_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~~
+
+. Open *Datacenter -> Storage -> SAN* in the web UI on a node that can reach
+ the array and select *Add Storage -> LVM on NVMe over Fabrics*.
+. Enter a discovery portal, select the subsystem, check the portals and name
+ the connection storage. This storage connects to the subsystem with
+ `content none`, while the LVM storage manages guest disks. Continuing creates
+ or reuses the connection storage before you select a namespace.
+. Select the namespace, choose the storage ID and volume group, then confirm.
+ Leave *Nodes* empty for all nodes.
+. Check the state of the namespace on each node of the storage, which the
+ setup shows once the storage is added, as described for LUNs in
+ xref:storage_multipath_setup[Multipath]. For a node that stays *Missing*,
+ check its access to the namespace on the array before placing guests on the
+ storage.
+
+The discovery fills in *Portals*. Some targets, such as the Linux kernel
+target, report only the portal that was asked: add the others to the list.
+With a single portal, the state of the namespace reads *OK (1 path)*.
+Portals can also be changed later in the edit dialog of the connection storage;
+each node then connects new ones on its own.
+
+*Datacenter -> Storage -> Add -> NVMe over Fabrics* adds only the connection
+storage. Enable *Use namespaces directly* there to use whole namespaces as guest
+disks, or add an *LVM* storage on a namespace later, with the connection storage
+as *Base storage*.
+
+To set it up by hand, run these commands on a node that can reach the array:
+
+----
+# pvesm scan nvmeof <portal>
+# pvesm add nvmeof <connection> --subsysnqn <nqn> --nvme-portals <portals> --content none
+# pvesm list <connection>
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, `<connection>:nvme-<wwid>`. Adding
+the LVM storage creates the volume group if it does not exist yet. Creating it
+is refused if the namespace holds data or another storage references it. To
+reuse a namespace, wipe it as described for LUNs in
+xref:storage_multipath_setup[Multipath].
+
+Configuration
+~~~~~~~~~~~~~
+
+The backend supports the common storage properties `content`, `nodes`,
+`disable`, and the following NVMe over Fabrics specific properties:
+
+subsysnqn::
+
+The NQN of the NVMe subsystem. It cannot be changed later.
+
+nvme-portals::
+
+Comma-separated list of the subsystem's TCP portals, one per path. Each is an
+IPv4 address or an IPv6 address in brackets, with an optional port (default
+4420).
+
+nvme-fast-io-fail-tmo::
+
+Seconds a path may be reconnecting before I/O sent to it fails. The default is
+120: guests get I/O errors once all paths of a namespace were lost for that
+long. With `-1`, I/O waits until a path returns. A change applies to newly
+connected controllers only.
+
+.Configuration Example (`/etc/pve/storage.cfg`)
+----
+nvmeof: fabric
+ subsysnqn nqn.2010-06.com.example:array1
+ nvme-portals 192.0.2.10,192.0.2.11
+ content none
+----
+
+.Storage features for backend `nvmeof`
+[width="100%",cols="m,m,3*d",options="header"]
+|==============================================================================
+|Content types |Image formats |Shared |Snapshots |Clones
+|images none |raw |yes |no |no
+|==============================================================================
+
+{pve} does not create or delete namespaces; manage them on the array. A volume
+is named `nvme-<wwid>` after its namespace, like its link in `/dev/disk/by-id/`.
+
+Checking and Disconnecting Paths
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> Storage -> SAN* lists the namespaces of NVMe over Fabrics
+storages among the LUNs, with their state on each node of the storage and
+*Multipath* shown as *Native*, as does *Node -> SAN* for the namespaces of a
+node. Expand a namespace there to inspect its paths.
+Its *State* is *Degraded* while a path is unusable or fewer paths exist than
+the storage has portals, and *Failed* without a usable path. *Node -> SAN ->
+NVMe over Fabrics* lists the node's controllers, one per connected portal:
+*Connected*, or *Reconnecting* while the kernel retries a lost path.
+
+An enabled storage connects the portals a node has no controller for. A portal
+that failed is retried after a minute. Removing a portal, or disabling or
+removing the storage, does not disconnect anything. To remove such a path,
+select its controller under *Node -> SAN -> NVMe over Fabrics* on each node and
+press *Disconnect*, or run
+`pvesh delete /nodes/<node>/nvmeof/controller/<controller>`. This is refused if
+a namespace that is mounted, in use by another device, or referenced by a
+storage would lose its last usable path. A storage that still lists the portal
+connects to it again.
+
+Limits
+~~~~~~
+
+* Only the TCP transport is supported, without authentication or TLS. Use a
+ storage network that only trusted hosts can reach.
+* NVMe/FC namespaces need no storage of this type. Set them up with
+ *Datacenter -> Storage -> SAN -> Add Storage -> LVM on Fibre Channel*, see
+ xref:storage_multipath_setup[Multipath].
+
+ifdef::wiki[]
+
+See Also
+~~~~~~~~
+
+* link:/wiki/Storage[Storage]
+
+endif::wiki[]
diff --git a/pvesm.adoc b/pvesm.adoc
index 5668a41..442ac2d 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -79,6 +79,7 @@ nodes that can be accessed as RBD (RADOS Block Device).
|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
@@ -96,10 +97,12 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
-a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
-reachable over several paths; xref:storage_multipath[Multipath] describes how
-{pve} manages them in a cluster.
+^3^: With iSCSI, NVMe over Fabrics (NVMe-oF), Fibre Channel (FC), or SAS block
+storage as shared storage in a cluster, LVM is used to split the LUN or
+namespace into virtual disks. A LUN is usually reachable over several paths;
+xref:storage_multipath[Multipath] describes how {pve} manages them in a cluster.
+NVMe-oF namespaces use the kernel's native multipath instead, see
+xref:storage_nvmeof[NVMe over Fabrics].
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -153,9 +156,10 @@ is available on all nodes, but it is physically different and can have
totally different content.
Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
-on a xref:storage_multipath_setup[SAN LUN], use the guided setup under
+on a xref:storage_multipath_setup[SAN LUN] or an
+xref:storage_nvmeof_setup[NVMe namespace], use the guided setup under
*Datacenter -> Storage -> SAN -> Add Storage* instead. It creates the storages
-that are needed and enables multipath for the LUN.
+that are needed and enables multipath for a LUN.
Storage Pools
@@ -427,6 +431,8 @@ See Also
* link:/wiki/Storage:_Multipath[Storage: Multipath]
+* link:/wiki/Storage:_NVMe_over_Fabrics[Storage: NVMe over Fabrics]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -471,6 +477,8 @@ include::pve-storage-iscsidirect.adoc[]
include::pve-storage-multipath.adoc[]
+include::pve-storage-nvmeof.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 20%]
* [PATCH storage,docs,manager 00/17] NVMe over Fabrics storage
@ 2026-11-13 3:04 9% Thomas Lamprecht
2026-11-13 3:04 20% ` [PATCH docs 10/17] storage: document NVMe over Fabrics storages Thomas Lamprecht
0 siblings, 1 reply; 37+ results
From: Thomas Lamprecht @ 2026-11-13 3:04 UTC (permalink / raw)
To: pve-devel
A storage type for NVMe subsystems reached over TCP, on top of v4 of the
SAN series [0]: namespaces as base volumes of shared LVM, or directly
as disk images, with the kernel's native multipath.
This is a deliberately small first version: TCP only, without
authentication or TLS, so access rests on the host NQN list of the
target and a separate storage network. It relies on the kernel to
reconnect lost paths and on the SAN series for the LUN inventory, the
guided setup and the checks before a namespace is written. The plugin
connects what is missing and removes nothing, also not when a portal or
the storage is removed: disconnecting a controller is an explicit
action per node.
Two prerequisites from the chapter: nodes cloned from one image need
distinct host NQNs before they connect. And as with every new storage
type, all nodes need the upgrade before the first such storage is
added, as a node that does not know the type drops its definitions when
it writes storage.cfg. I ran into that in the lab.
What it adds:
- storage type 'nvmeof' with a subsystem NQN and a list of TCP
portals. Each node connects the portals it has no controller for and
leaves existing controllers as they are. New controllers get
ctrl_loss_tmo=-1, so the kernel keeps reconnecting, and fail I/O on
a lost path after 120 seconds unless configured otherwise. Volumes
are named nvme-<wwid>.
- LVM accepts such a volume as base, with the reference check and the
per-LUN lock of the SAN series.
- discovery: /nodes/{node}/scan/nvmeof and 'pvesm scan nvmeof'.
- /nodes/{node}/nvmeof: host identity, controller list, and removal
of one controller. That is refused if a namespace that is mounted,
has a holder or is referenced by a storage would lose its last
usable path. A storage that still lists the portal connects again.
- the node report and with it the cluster-wide status of the SAN
series include the namespaces of nvmeof storages, with their state
on each node of the storage. They do not need multipathd.
- web UI: the Add Storage menu of the SAN panel gets a third entry for
shared LVM on a namespace, which ends with the state of the namespace
on every node like the other two; Datacenter > Storage > Add gets the
dialog of the storage type, with subsystem discovery and the note
pointing to the SAN panel; Node > SAN lists the controllers; the SAN
panel shows the host NQN of each node.
- nvme-cli becomes a Recommends of libpve-storage-perl.
Namespaces already show up in the LUN list of Node > SAN through the
SAN series, with their paths.
Patches:
- storage 01-09: SMART skip for fabrics namespaces, the plugin,
LVM base, discovery, namespace attribution in the LUN inventory, the
node API, the host NQN and the namespaces in the node report
- docs 10: the storage chapter
- manager 11-17: API mount, storage type and its dialog, LVM base
selector, guided setup, controller list, host NQN column, native
multipath in the LUN list of the SAN panel
I tested this on a six-node nested cluster against a Linux nvmet target
and a NetApp AFF A20, each with two portals: the guided setup with a new
and with a reused connection storage and with a node that has no access
at first, one path down on both targets, a NetApp path cut and a stopped
multipathd as the cluster-wide status shows them, the plain dialogs on
the nvmet target, a guest disk on a NetApp namespace through snapshot,
rollback, live migration and a path cut under I/O, wiping a namespace
and its refusals on the NetApp, and connecting after a node reboot on
both.
[0]: https://lore.proxmox.com/pve-devel/20261113030146.1559030-1-t.lamprecht@proxmox.com/
pve-storage:
Thomas Lamprecht (9):
diskmanage: skip SMART queries for NVMe fabric namespaces
nvmeof: add a storage for NVMe over Fabrics subsystems
lvm: allow a volume group on an NVMe over Fabrics namespace
api: scan: add NVMe over Fabrics discovery
pvesm: add a scan command for NVMe over Fabrics
api: scan: san-luns: attribute NVMe namespaces to storage
api: add node-level NVMe over Fabrics status and controller removal
multipath: report the NVMe host NQN of each node
multipath: report NVMe over Fabrics namespaces in the cluster status
debian/control | 1 +
src/PVE/API2/Makefile | 1 +
src/PVE/API2/Multipath.pm | 8 +-
src/PVE/API2/NVMeOF.pm | 182 ++++++++++++++
src/PVE/API2/Storage/Scan.pm | 59 +++++
src/PVE/CLI/pvesm.pm | 13 +
src/PVE/Diskmanage.pm | 30 ++-
src/PVE/Makefile | 1 +
src/PVE/Multipath/Status.pm | 64 ++++-
src/PVE/NVMeOF.pm | 352 ++++++++++++++++++++++++++++
src/PVE/Storage.pm | 2 +
src/PVE/Storage/LVMPlugin.pm | 3 +-
src/PVE/Storage/Makefile | 1 +
src/PVE/Storage/NVMeOFPlugin.pm | 204 ++++++++++++++++
src/PVE/Storage/Plugin.pm | 2 +-
src/PVE/Storage/SAN.pm | 38 ++-
src/test/Makefile | 7 +-
src/test/disklist_test.pm | 14 ++
src/test/run_multipath_api_tests.pl | 103 +++++++-
src/test/run_nvmeof_api_tests.pl | 151 ++++++++++++
src/test/run_nvmeof_taint_tests.pl | 65 +++++
src/test/run_nvmeof_tests.pl | 309 ++++++++++++++++++++++++
src/test/run_san_lun_scan_tests.pl | 33 ++-
src/test/run_san_nvme_tests.pl | 30 +++
24 files changed, 1642 insertions(+), 31 deletions(-)
pve-docs:
Thomas Lamprecht (1):
storage: document NVMe over Fabrics storages
pve-storage-multipath.adoc | 4 +-
pve-storage-nvmeof.adoc | 161 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 20 +++--
3 files changed, 177 insertions(+), 8 deletions(-)
pve-manager:
Thomas Lamprecht (7):
api: nodes: mount the NVMe over Fabrics endpoints
ui: storage: add NVMe over Fabrics storage
ui: lvm: offer NVMe over Fabrics storages as base storage
ui: dc: san: add a guided setup for shared LVM on NVMe over Fabrics
ui: node: san: list NVMe over Fabrics controllers
ui: dc: san: show the NVMe host NQN of each node
ui: dc: san: show that a namespace uses native multipath
PVE/API2/Nodes.pm | 7 +
www/manager6/Makefile | 4 +-
www/manager6/SANUtils.js | 7 +
www/manager6/Utils.js | 7 +
www/manager6/dc/SAN.js | 41 ++++--
www/manager6/dc/StorageView.js | 5 +-
www/manager6/node/Config.js | 9 +-
www/manager6/node/NVMeOFControllers.js | 115 ++++++++++++++++
www/manager6/storage/IScsiEdit.js | 5 +-
www/manager6/storage/LVMEdit.js | 12 +-
www/manager6/storage/NVMeOFEdit.js | 130 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 29 +++-
www/manager6/storage/wizard/NodeIdentities.js | 45 +++---
.../storage/wizard/{IScsi.js => Target.js} | 129 +++++++++++------
www/manager6/storage/wizard/Wizard.js | 43 +++---
www/manager6/window/SANLunState.js | 23 +++-
16 files changed, 499 insertions(+), 112 deletions(-)
^ permalink raw reply [relevance 9%]
* [PATCH v4 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI
2026-11-13 3:00 13% [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-13 3:00 19% ` [PATCH v4 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
@ 2026-11-13 3:00 12% ` Thomas Lamprecht
2026-11-16 1:28 9% ` superseded: [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-13 3:00 UTC (permalink / raw)
To: pve-devel
Shared LVM on an iSCSI LUN needs an iSCSI storage with multipath, the
right LUN as base volume and an LVM storage on top, in that order. Add
a guided setup for it to the SAN view: connect to the target, with the
initiator names of all nodes at hand for the access rules of the
array, select a LUN, name the volume group and storage, and confirm.
The LUN list shows the model of each LUN, the confirm step how its
multipath is set up.
It starts from the SAN view and not from Datacenter > Storage > Add,
as it creates a volume group and up to two storages, while an entry of
the Add menu attaches one storage of its type. Those dialogs stay as
they are and can do the same in two steps. Continuing from the target
step creates or reuses the connection storage, before the confirm
step, so the step says so.
A LUN that a storage uses cannot be selected. The list is the one of
the node serving the web UI, which the LUN step names. Whether the
other nodes of the storage see the LUN as well is what matters for a
shared storage, so the setup ends with the state of the LUN on each of
them, taken from the cluster-wide status. Nodes set up a new LUN with
their next status updates, so for the first minute a node without it
shows as pending and not as missing. A tooltip on that state says that
the SAN view lists such a node as missing meanwhile, and the note of
the window that guests on the storage cannot run on a node that stays
missing.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 5 +
www/manager6/dc/SAN.js | 20 +-
www/manager6/storage/wizard/IScsi.js | 272 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 158 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 ++++++
www/manager6/storage/wizard/Wizard.js | 180 ++++++++++++
www/manager6/window/SANLunState.js | 111 +++++++
7 files changed, 828 insertions(+), 1 deletion(-)
create mode 100644 www/manager6/storage/wizard/IScsi.js
create mode 100644 www/manager6/storage/wizard/LunSelect.js
create mode 100644 www/manager6/storage/wizard/NodeIdentities.js
create mode 100644 www/manager6/storage/wizard/Wizard.js
create mode 100644 www/manager6/window/SANLunState.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 7fb4d7944..c7cefeacc 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -137,6 +137,7 @@ JSSRC= \
window/Restore.js \
window/SafeDestroyGuest.js \
window/SafeDestroyStorage.js \
+ window/SANLunState.js \
window/SANLunWipe.js \
window/Settings.js \
window/Snapshot.js \
@@ -384,6 +385,10 @@ JSSRC= \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
storage/ESXIEdit.js \
+ storage/wizard/Wizard.js \
+ storage/wizard/LunSelect.js \
+ storage/wizard/NodeIdentities.js \
+ storage/wizard/IScsi.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 2ef60900a..fa60a1e6f 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -49,7 +49,8 @@ Ext.define('PVE.dc.SANView', {
initComponent: function () {
let me = this;
- let caps = Ext.state.Manager.get('GuiCap').dc;
+ let allCaps = Ext.state.Manager.get('GuiCap');
+ let caps = allCaps.dc;
let canModify = !!caps['Sys.Modify'];
let canEdit = canModify && !!caps['Sys.Audit'];
me.rstore = Ext.create('Proxmox.data.UpdateStore', {
@@ -104,6 +105,23 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
+ let setupItem = (wizardType) => ({
+ text: PVE.storage.wizard.subject(wizardType),
+ iconCls: 'fa fa-fw fa-building',
+ handler: () =>
+ Ext.create('PVE.storage.wizard.SAN', {
+ wizardType,
+ autoShow: true,
+ reloadCallback: reload,
+ }),
+ });
+ me.tbar = [
+ {
+ text: gettext('Add Storage'),
+ disabled: !allCaps.storage['Datastore.Allocate'],
+ menu: [setupItem('iscsi')],
+ },
+ ];
me.items = [
{
xtype: 'grid',
diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/IScsi.js
new file mode 100644
index 000000000..515d1206f
--- /dev/null
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -0,0 +1,272 @@
+Ext.define('PVE.storage.wizard.IScsiTarget', {
+ extend: 'Proxmox.panel.InputPanel',
+ xtype: 'pveStorageWizardIScsiTarget',
+ onlineHelp: 'storage_open_iscsi',
+
+ updateConnectionField: function () {
+ let me = this;
+ let target = me.down('field[name=target]').getValue();
+ let storage = me.storages?.find(
+ (entry) => entry.type === 'iscsi' && entry.target === target,
+ );
+ let field = me.down('field[name=connection]');
+ if (storage) {
+ field.setValue(storage.storage);
+ } else if (field.readOnly) {
+ field.setValue('');
+ }
+ field.setReadOnly(!!storage);
+ },
+
+ onSubmit: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let values = me.getValues();
+ let params = {
+ type: 'iscsi',
+ storage: values.connection,
+ portal: values.portal,
+ target: values.target,
+ content: 'none',
+ multipath: 1,
+ };
+ let nodes = []
+ .concat(values.nodes || [])
+ .filter(Boolean)
+ .join(',');
+ if (nodes) {
+ params.nodes = nodes;
+ }
+ let connected = function (connection) {
+ if (wizard.destroyed) {
+ return;
+ }
+ wizard.connection = connection;
+ let tabs = wizard.down('#wizcontent');
+ wizard.down('#luns').enable();
+ tabs.setActiveTab(wizard.down('#luns'));
+ me.disable();
+ };
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ let users = me.storages.filter((entry) => entry.target === values.target);
+ if (users.length) {
+ let base = users[0];
+ if (
+ users.length !== 1 ||
+ base.type !== 'iscsi' ||
+ `${base.content ?? ''}` !== 'none'
+ ) {
+ wizard.showError(
+ gettext(
+ 'This target is already used by another storage. Check Datacenter > Storage.',
+ ),
+ );
+ return;
+ }
+ if (base.disable) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ let baseNodes = base.nodes ? base.nodes.split(',') : [];
+ if (baseNodes.length && !baseNodes.includes(Proxmox.NodeName)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Connection storage "{0}" is not available on node "{1}". Open the web UI on one of its nodes.',
+ ),
+ base.storage,
+ Proxmox.NodeName,
+ ),
+ ),
+ );
+ return;
+ }
+ let selectedNodes = nodes ? nodes.split(',') : baseNodes;
+ if (
+ baseNodes.length &&
+ selectedNodes.some((node) => !baseNodes.includes(node))
+ ) {
+ wizard.showError(
+ gettext(
+ 'The connection storage is not available on all selected nodes.',
+ ),
+ );
+ return;
+ }
+ let connection = {
+ storage: base.storage,
+ target: base.target,
+ nodes: selectedNodes.join(','),
+ };
+ if (!base.multipath) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Enable Multipath in the edit dialog of storage "{0}" before using it here.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ connected(connection);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () =>
+ connected({ storage: params.storage, target: params.target, nodes }),
+ });
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ let common = PVE.panel.StorageBase.commonFields(true);
+ // wide enough for the longest label of the step
+ let labelWidth = 150;
+ me.items = [
+ {
+ xtype: 'textfield',
+ name: 'portal',
+ fieldLabel: 'Portal',
+ labelWidth,
+ allowBlank: false,
+ listeners: {
+ change: {
+ buffer: 500,
+ fn: function (field, value) {
+ let target = me.down('field[name=target]');
+ target.setDisabled(!value);
+ target.setValue('');
+ target.setPortal(value);
+ },
+ },
+ },
+ },
+ {
+ xtype: 'pveIScsiScan',
+ name: 'target',
+ fieldLabel: gettext('Target'),
+ labelWidth,
+ disabled: true,
+ showNodeSelector: false,
+ nodename: Proxmox.NodeName,
+ listeners: { change: () => me.updateConnectionField() },
+ listConfig: {
+ width: 650,
+ emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')),
+ columns: [
+ {
+ text: gettext('Target'),
+ dataIndex: 'target',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Portals'),
+ dataIndex: 'portal',
+ width: 220,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ },
+ {
+ ...common.id,
+ name: 'connection',
+ fieldLabel: gettext('Connection Storage'),
+ labelWidth,
+ },
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${Ext.htmlEncode(
+ gettext(
+ 'Next creates or reuses the connection storage before you select a LUN.',
+ ),
+ )}`,
+ },
+ { xtype: 'pveStorageWizardNodeIdentities' },
+ ];
+ me.advancedItems = [
+ { ...common.nodes, labelWidth, validator: PVE.storage.wizard.validateNodes },
+ ];
+ me.callParent();
+ me.on('afterrender', () =>
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: me,
+ failure: function (response) {
+ if (!me.destroyed) {
+ me.up('window').showError(response.htmlStatus);
+ }
+ },
+ success: function (response) {
+ if (!me.destroyed) {
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ }
+ },
+ }),
+ );
+ },
+});
+
+PVE.storage.wizard.createIScsiLVM = function (wizard, values, lun) {
+ let connection = wizard.connection;
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`,
+ method: 'GET',
+ params: { content: 'images' },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let volume = response.result.data.find((entry) =>
+ entry.volid.endsWith(`.dm-uuid-mpath-${lun.wwid}`),
+ );
+ if (!volume) {
+ wizard.showError(
+ gettext(
+ 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.',
+ ),
+ );
+ return;
+ }
+ wizard.addLVMStorage({ ...values, base: volume.volid }, fail);
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
new file mode 100644
index 000000000..1156a4eee
--- /dev/null
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -0,0 +1,158 @@
+Ext.define('PVE.storage.wizard.LunSelect', {
+ extend: 'Ext.panel.Panel',
+ xtype: 'pveStorageWizardLunSelect',
+ layout: { type: 'vbox', align: 'stretch' },
+
+ // as an input panel does, so that the wizard shows its help button for this step
+ listeners: {
+ activate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxShowHelp', this.onlineHelp);
+ },
+ deactivate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxHideHelp', this.onlineHelp);
+ },
+ },
+
+ getSelection: function () {
+ return this.down('grid').getSelection()[0]?.data;
+ },
+
+ reload: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let grid = me.down('grid');
+ me.rstore.stopUpdate();
+ me.store.setFilters([
+ { property: 'iscsi-target', value: wizard.connection.target, exactMatch: true },
+ ]);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(wizard.connection.storage)}/content`,
+ method: 'GET',
+ waitMsgTarget: grid,
+ failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
+ callback: function () {
+ if (!me.destroyed && wizard.down('#wizcontent').getActiveTab() === me) {
+ me.rstore.startUpdate();
+ }
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-luns',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', { rstore: me.rstore });
+ let updateSelection = function () {
+ let row = me.getSelection();
+ me.down('#selection').setValue(row && !row['used-by-storage'] ? row.wwid : '');
+ };
+ me.items = [
+ {
+ xtype: 'textfield',
+ itemId: 'selection',
+ hidden: true,
+ allowBlank: false,
+ submitValue: false,
+ },
+ {
+ xtype: 'component',
+ cls: 'pmx-hint',
+ margin: '0 0 10 0',
+ html: gettext(
+ 'A LUN used by a storage cannot be selected. A LUN with other data has to be wiped under Node > SAN first.',
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store: me.store,
+ emptyText: gettext('No LUNs found. Check connections and array access.'),
+ viewConfig: {
+ enableTextSelection: true,
+ getRowClass: (rec) => (rec.get('used-by-storage') ? 'x-item-disabled' : ''),
+ },
+ listeners: {
+ beforeselect: (sm, rec) => !rec.get('used-by-storage'),
+ selectionchange: updateSelection,
+ },
+ columns: [
+ {
+ text: gettext('Name'),
+ dataIndex: 'name',
+ flex: 1,
+ minWidth: 260,
+ renderer: (value, md, rec) => Ext.htmlEncode(value || rec.get('wwid')),
+ },
+ { text: 'LUN', dataIndex: 'iscsi-lun', width: 60 },
+ {
+ text: gettext('Model'),
+ dataIndex: 'model',
+ width: 160,
+ renderer: (value, md, rec) =>
+ Ext.htmlEncode([rec.get('vendor'), value].filter(Boolean).join(' ')),
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 110,
+ renderer: (value, md, rec) =>
+ PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ ),
+ },
+ {
+ text: gettext('Multipath'),
+ dataIndex: 'multipath',
+ width: 170,
+ renderer: PVE.SANUtils.renderSanLunMultipath,
+ },
+ {
+ text: gettext('Used By'),
+ dataIndex: 'usage',
+ width: 130,
+ renderer: PVE.SANUtils.renderSanLunUsage,
+ },
+ {
+ text: gettext('Size'),
+ dataIndex: 'size',
+ width: 100,
+ renderer: Proxmox.Utils.render_size,
+ },
+ {
+ text: gettext('Device'),
+ dataIndex: 'devpath',
+ width: 180,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ tbar: [
+ {
+ text: gettext('Reload'),
+ iconCls: 'fa fa-refresh',
+ handler: () => me.reload(),
+ },
+ '->',
+ {
+ xtype: 'tbtext',
+ html: Ext.htmlEncode(`${gettext('Scan node')}: ${Proxmox.NodeName}`),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
+ me.mon(me.rstore, 'load', updateSelection);
+ me.on('activate', () => me.reload());
+ me.on('deactivate', () => me.rstore.stopUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js
new file mode 100644
index 000000000..9c7ab8cce
--- /dev/null
+++ b/www/manager6/storage/wizard/NodeIdentities.js
@@ -0,0 +1,83 @@
+Ext.define('pve-san-node-identity', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'iscsi-initiator-name'],
+});
+
+Ext.define('PVE.storage.wizard.NodeIdentities', {
+ extend: 'Ext.grid.Panel',
+ xtype: 'pveStorageWizardNodeIdentities',
+ height: 220,
+ disableSelection: true,
+ viewConfig: { enableTextSelection: true },
+ columns: [
+ { text: gettext('Node'), dataIndex: 'node', width: 100, renderer: Ext.htmlEncode },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 175,
+ renderer: PVE.SANUtils.renderState,
+ },
+ {
+ text: gettext('Initiator Name'),
+ dataIndex: 'iscsi-initiator-name',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-identities',
+ model: 'pve-san-node-identity',
+ interval: 5000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: (raw) => ({
+ ...raw,
+ data: Object.entries(raw.data.nodes).map(([node, report]) => ({
+ ...report,
+ node,
+ })),
+ }),
+ },
+ },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.tbar = [
+ {
+ xtype: 'tbtext',
+ text: gettext('Allow these initiator names on the target.'),
+ },
+ '->',
+ {
+ text: gettext('Copy Initiator Names'),
+ iconCls: 'fa fa-clipboard',
+ handler: () =>
+ PVE.Utils.copyToClipboard(
+ me.store
+ .getRange()
+ .map((rec) => rec.get('iscsi-initiator-name'))
+ .filter(Boolean)
+ .join('\n'),
+ ),
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me, me.rstore);
+ me.on('afterrender', () => me.rstore.startUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
new file mode 100644
index 000000000..3062cfa99
--- /dev/null
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -0,0 +1,180 @@
+Ext.ns('PVE.storage.wizard');
+
+PVE.storage.wizard.subject = (type) =>
+ Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+
+PVE.storage.wizard.validateNodes = function () {
+ let nodes = [].concat(this.getValue() || []).filter(Boolean);
+ return (
+ !nodes.length ||
+ nodes.includes(Proxmox.NodeName) ||
+ Ext.String.format(
+ gettext('Must include node "{0}", which sets up the volume group.'),
+ Proxmox.NodeName,
+ )
+ );
+};
+
+Ext.define('PVE.storage.wizard.SAN', {
+ extend: 'PVE.window.Wizard',
+ width: 1050,
+ height: 620,
+
+ showError: function (message) {
+ if (this.destroyed) {
+ return;
+ }
+ this.down('#submit').enable();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
+ volumeSettings: function () {
+ let me = this;
+ let value = (name) => me.down(`field[name=${name}]`).getValue();
+ return {
+ storage: value('storage'),
+ vgname: value('vgname'),
+ 'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
+ nodes: me.connection.nodes,
+ };
+ },
+
+ // Adds the LVM storage with the volume settings as the last request of a setup. Only the node
+ // serving the web UI looked at the LUN, so show its state on the other nodes afterwards.
+ addLVMStorage: function (values, failure) {
+ let me = this;
+ let params = { type: 'lvm', shared: 1, content: 'images,rootdir', ...values };
+ if (!params.nodes) {
+ delete params.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: me,
+ failure,
+ success: function () {
+ let wwid = me.down('#luns').getSelection().wwid;
+ me.close();
+ Ext.create('PVE.window.SANLunState', {
+ wwid,
+ storage: values.storage,
+ autoShow: true,
+ });
+ },
+ });
+ },
+
+ multipathSummary: function (lun) {
+ // an explicit entry configures the map, also of a LUN of the connection storage
+ if (lun.multipath === 'manual') {
+ return PVE.SANUtils.multipathText('manual');
+ }
+ return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ },
+
+ updateSummary: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ let rows = [
+ [gettext('Connection Storage'), me.connection.storage],
+ [gettext('Storage ID'), values.storage],
+ [gettext('Volume Group'), values.vgname],
+ ['WWID', lun.wwid],
+ [gettext('Multipath'), me.multipathSummary(lun)],
+ [gettext('Size'), Proxmox.Utils.format_size(lun.size)],
+ [gettext('Nodes'), values.nodes || gettext('All (No restrictions)')],
+ [
+ gettext('Allow Snapshots as Volume-Chain'),
+ Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
+ ],
+ ];
+ me.down('#summary')
+ .getStore()
+ .setData(rows.map(([key, value]) => ({ key, value })));
+ },
+
+ finish: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ me.down('#submit').disable();
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.subject = PVE.storage.wizard.subject(me.wizardType);
+ me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
+ let common = PVE.panel.StorageBase.commonFields(true);
+ let snapshots = PVE.panel.StorageBase.volumeChainFields(true, 'lvm');
+ let settings = {
+ xtype: 'inputpanel',
+ title: gettext('Volume Group'),
+ onlineHelp: 'storage_multipath',
+ items: [
+ { ...common.id, fieldLabel: gettext('Storage ID') },
+ {
+ xtype: 'textfield',
+ name: 'vgname',
+ fieldLabel: gettext('Volume Group'),
+ allowBlank: false,
+ vtype: 'StorageId',
+ },
+ snapshots.checkbox,
+ snapshots.hint,
+ ],
+ };
+ me.items = [
+ { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ {
+ xtype: 'pveStorageWizardLunSelect',
+ title: 'LUN',
+ itemId: 'luns',
+ onlineHelp: 'storage_multipath',
+ },
+ settings,
+ {
+ title: gettext('Confirm'),
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'grid',
+ itemId: 'summary',
+ store: { fields: ['key', 'value'] },
+ columns: [
+ {
+ text: gettext('Setting'),
+ dataIndex: 'key',
+ width: 280,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Value'),
+ dataIndex: 'value',
+ flex: 1,
+ cellWrap: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ ],
+ listeners: { activate: () => me.updateSummary() },
+ onSubmit: () => me.finish(),
+ },
+ ];
+ me.callParent();
+ let tabs = me.down('#wizcontent');
+ tabs.on('tabchange', function (tp, tab) {
+ if (tab === me.down('#luns')) {
+ me.down('#back').disable();
+ }
+ me.down('#submit').setText(
+ tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
+ );
+ });
+ me.down('#submit').setText(gettext('Next'));
+ me.on('destroy', () => me.reloadCallback?.());
+ },
+});
diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js
new file mode 100644
index 000000000..154836f3b
--- /dev/null
+++ b/www/manager6/window/SANLunState.js
@@ -0,0 +1,111 @@
+Ext.define('pve-san-lun-node', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'paths-active', 'paths-total', 'paths-expected'],
+});
+
+// Shows the state of the LUN of a new storage on each of its nodes, from the cluster-wide status.
+Ext.define('PVE.window.SANLunState', {
+ extend: 'Ext.window.Window',
+
+ modal: true,
+ width: 550,
+ height: 400,
+ layout: { type: 'vbox', align: 'stretch' },
+ bodyPadding: 10,
+
+ initComponent: function () {
+ let me = this;
+ if (!me.wwid || !me.storage) {
+ throw 'no LUN or storage specified';
+ }
+ me.title = Ext.String.format(gettext('Storage {0}: LUN State'), me.storage);
+ // The other nodes set up a new LUN with their next status updates.
+ let pendingUntil = Date.now() + 60000;
+ let rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-lun-state',
+ model: 'pve-san-lun-node',
+ interval: 3000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: function (raw) {
+ let lun = raw.data?.luns?.find((entry) => entry.wwid === me.wwid);
+ let nodes = Object.entries(lun?.nodes ?? {});
+ return { ...raw, data: nodes.map(([node, state]) => ({ ...state, node })) };
+ },
+ },
+ },
+ });
+ let store = Ext.create('Proxmox.data.DiffStore', {
+ rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.items = [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.',
+ ),
+ me.storage,
+ ),
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store,
+ disableSelection: true,
+ emptyText: gettext('No node reported this LUN yet.'),
+ columns: [
+ {
+ text: gettext('Node'),
+ dataIndex: 'node',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ flex: 1,
+ renderer: function (value, metaData, rec) {
+ if (value === 'missing' && Date.now() < pendingUntil) {
+ let tip = gettext(
+ 'Not reported by the node yet; the SAN view shows that as "Missing".',
+ );
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(Ext.htmlEncode(tip))}"`;
+ return `<i class="fa fa-fw fa-spinner fa-pulse"></i> ${Ext.htmlEncode(gettext('Pending'))}`;
+ }
+ return PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ );
+ },
+ },
+ {
+ text: gettext('Active Paths'),
+ dataIndex: 'paths-active',
+ width: 120,
+ renderer: (value, metaData, rec) =>
+ value === undefined
+ ? ''
+ : Ext.htmlEncode(PVE.SANUtils.pathCount(rec.data)),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), rstore);
+ me.on('destroy', function () {
+ store.destroy();
+ rstore.destroy();
+ });
+ rstore.startUpdate();
+ },
+});
^ permalink raw reply related [relevance 12%]
* [PATCH v4 docs 23/36] storage: document the cluster-wide multipath management
2026-11-13 3:00 13% [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
@ 2026-11-13 3:00 19% ` Thomas Lamprecht
2026-11-13 3:00 12% ` [PATCH v4 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-16 1:28 9% ` superseded: [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-13 3:00 UTC (permalink / raw)
To: pve-devel
Add a chapter for multipath on iSCSI and Fibre Channel SANs, written
around the tasks an admin has: prerequisites, setting up shared LVM
with the guided setup or by hand, adding, growing and removing a LUN,
reading the states during a path failure, array-specific settings and
moving over from a hand-made multipath.conf.
Removing a LUN stays a manual procedure, as Proxmox VE never removes a
WWID or a map by itself, so the chapter spells it out including how to
get out of queued I/O.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 260 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 ++-
6 files changed, 290 insertions(+), 6 deletions(-)
create mode 100644 pve-storage-multipath.adoc
diff --git a/pmxcfs.adoc b/pmxcfs.adoc
index 4a334fd..9a1dbd0 100644
--- a/pmxcfs.adoc
+++ b/pmxcfs.adoc
@@ -105,6 +105,8 @@ Files
|`ha/manager_status` | JSON-formatted information regarding HA services on the cluster
|`ha/resources.cfg` | Resources managed by high availability, and their current state
|`ha/rules.cfg` | Rules putting constraints on the HA manager's scheduling of HA resources
+|`multipath-overrides.conf` | Hardware-specific multipath settings, in `multipath.conf` format, applied on all nodes
+|`multipath.cfg` | {pve} cluster-wide multipath configuration (LUN entries)
|`nodes/<NAME>/config` | Node-specific configuration
|`nodes/<NAME>/lxc/<VMID>.conf` | VM configuration data for LXC containers
|`nodes/<NAME>/openvz/` | Prior to {pve} 4.0, used for container configuration data (deprecated, removed soon)
diff --git a/pve-storage-iscsi.adoc b/pve-storage-iscsi.adoc
index a02ed46..f8b3a76 100644
--- a/pve-storage-iscsi.adoc
+++ b/pve-storage-iscsi.adoc
@@ -23,6 +23,10 @@ resources.
Low-level iscsi management task can be done using the `iscsiadm` tool.
+TIP: To set up shared LVM on a LUN of an iSCSI target, use the guided setup
+under *Datacenter -> Storage -> SAN* in the web UI, see
+xref:storage_multipath_setup[Multipath].
+
Configuration
~~~~~~~~~~~~~
@@ -38,6 +42,13 @@ target::
iSCSI target.
+multipath::
+
+Combine the paths to each LUN of the target into one `dm-multipath` map on every
+node the storage is enabled on, and monitor the maps cluster-wide. A shared LVM
+storage on a target with several portals needs this option. See
+xref:storage_multipath[Multipath].
+
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-iscsidirect.adoc b/pve-storage-iscsidirect.adoc
index ae722e8..822e9c7 100644
--- a/pve-storage-iscsidirect.adoc
+++ b/pve-storage-iscsidirect.adoc
@@ -21,7 +21,7 @@ Configuration
~~~~~~~~~~~~~
The user mode iSCSI backend uses the same configuration options as the
-Open-iSCSI backend.
+Open-iSCSI backend, except for `multipath`.
.Configuration Example (`/etc/pve/storage.cfg`)
----
diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc
index 5b88151..3813a06 100644
--- a/pve-storage-lvm.adoc
+++ b/pve-storage-lvm.adoc
@@ -121,6 +121,9 @@ A benefit of LVM is that it can be used with shared storage.
For example, an iSCSI LUN. The backend implements proper cluster-wide locking if
the storage is marked as shared in the configuration.
+TIP: The guided setup under *Datacenter -> Storage -> SAN* in the web UI creates
+a shared LVM storage on a SAN LUN, see xref:storage_multipath_setup[Multipath].
+
NOTE: If you extend a shared volume group onto another device on one node, the
other nodes may only see the added physical volume after LVM has scanned their
devices again, for example with `pvscan --cache`. This command also resets the
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
new file mode 100644
index 0000000..d4503a7
--- /dev/null
+++ b/pve-storage-multipath.adoc
@@ -0,0 +1,260 @@
+[[storage_multipath]]
+Multipath
+---------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: Multipath
+endif::wiki[]
+
+Use multipath for shared LVM on an iSCSI or Fibre Channel SAN with redundant
+connections. Device-mapper multipath combines the paths to a LUN into one block
+device, called a map, so I/O can continue when a path fails. Its World Wide
+Identifier (WWID) identifies the same LUN on every node.
+
+{pve} configures maps cluster-wide and shows their state under *Datacenter ->
+Storage -> SAN*. An iSCSI storage with *Multipath* enabled requests maps for its
+LUNs; Fibre Channel LUNs need entries in `/etc/pve/multipath.cfg`. NVMe
+namespaces use kernel-native multipath instead; the procedures below cover SCSI
+LUNs.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+. Upgrade all nodes before enabling cluster-wide multipath management.
+. Install `multipath-tools` on every participating node. The
+ `libpve-storage-perl` package recommends it, but installations without
+ recommended packages need it added separately. A node without it shows
+ *Multipath unavailable* with the reason under *Datacenter -> Storage -> SAN*.
+ Plain iSCSI and LVM without the multipath option still work without it.
+. Allow each node's iSCSI initiator name on the array; the names are shown under
+ *Datacenter -> Storage -> SAN* and in the guided setup. Install `open-iscsi`
+ if needed.
+ For Fibre Channel, configure zoning and LUN masking for the WWPNs of each
+ node's HBA ports, which `cat /sys/class/fc_host/host*/port_name` lists.
+. Present the same empty LUN to all intended nodes over redundant paths. A node
+ does not scan for a Fibre Channel LUN that is mapped to it later, so rescan
+ the Fibre Channel hosts on each node:
++
+----
+# for host in /sys/class/fc_host/host*; do echo '- - -' > /sys/class/scsi_host/${host##*/}/scan; done
+----
++
+If the LUN still does not show up, check the target ports of the array on the
+node. This lists the WWPN, state and roles of each remote port; those of the
+array need the state `Online` and the role `FCP Target`. A `Blocked` port needs
+its connection restored before a rescan can reach it:
++
+----
+# for port in /sys/class/fc_remote_ports/rport-*; do echo $(cat $port/{port_name,port_state,roles}); done
+----
+
+[[storage_multipath_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~
+
+. Open *Datacenter -> Storage -> SAN* in the web UI on a node that can access
+ the LUN and select *Add Storage -> LVM on iSCSI* or *LVM on Fibre Channel*.
+. For iSCSI, enter a portal, select the target and name the connection storage.
+ This storage connects to the target with `content none` and *Multipath*
+ enabled, while the LVM storage manages guest disks. Continuing creates or
+ reuses the connection storage before you select a LUN.
+. Select the LUN, choose the storage ID and volume group, then confirm. For
+ Fibre Channel, the setup adds the multipath entry of the LUN if it has none.
+ An entry it adds expects as many paths as the map has on the node serving
+ the web UI when it appears, if that is at least two; existing entries and
+ maps stay as they are. Set *Expected Paths* in the entry if it is missing or
+ does not match the intended topology, for example because a fabric was down
+ at that time or nodes have different path counts.
+ Leave *Nodes* empty for all nodes. Virtual machines on the storage can only
+ have snapshots with *Allow Snapshots as Volume-Chain*, a technology preview
+ that applies to disks created after it is set; see
+ xref:pvesm_lvm_config[LVM configuration].
+. Check the state of the LUN on each node of the storage, which the setup
+ shows once the storage is added. Before that, only the node serving the web
+ UI looked at the LUN; the LUN list names it as *Scan node*. The other nodes
+ set the LUN up with their next status updates and show *Pending* during the
+ first minute. For a node that stays *Missing*, check its access to the LUN
+ on the array before placing guests on the storage. *OK (1 path)* means that
+ the node reaches the LUN over a single path. The *State* column of the view
+ shows the same later.
+
+A LUN that a storage uses cannot be selected, and the setup refuses a LUN that
+contains data. To reuse such a LUN, first stop all its users on all hosts and
+remove its storage references, then use *Wipe* under *Node -> SAN* as
+`root@pam`. This destroys its data. The usage shown for a LUN is cached per
+node, so other nodes can still show the old content after a wipe. If setup
+fails, check the error, the node's task log and *Datacenter -> Storage* before
+retrying; closing the dialog does not undo changes.
+
+The dialogs under *Datacenter -> Storage -> Add* can do the same for iSCSI in
+two steps: add an *iSCSI* storage with *Multipath* enabled and *Use LUNs
+directly* cleared, then an *LVM* storage with it as *Base storage* and the LUN
+as *Base volume*. Selecting a base storage enables *Shared*; keep it enabled.
+
+To set up iSCSI by hand, run these commands on a node with access to the target:
+
+----
+# pvesm add iscsi <connection> --portal <portal> --target <iqn> --content none --multipath 1
+# pvesm list <connection> --content images
+# pvesm add lvm <storage> --vgname <vg> --base <volume-id> --shared 1
+----
+
+Use the complete volume ID from the listing, including the connection storage
+prefix and the `dm-uuid-mpath-<wwid>` suffix. Adding the LVM storage creates the
+volume group. Keep its base volume: it connects the target before LVM
+activation.
+
+For Fibre Channel, add an entry with the number of paths each node should
+have, wait for the scan to show a by-id path with `dm-uuid-mpath-<wwid>`, then
+create the volume group and shared storage:
+
+----
+# pvesh create /cluster/multipath/wwid --wwid <wwid> --paths-expected <paths>
+# pvesm scan san-luns --output-format json
+# pvesh create /nodes/<node>/disks/lvm --name <storage> \
+ --device /dev/disk/by-id/dm-uuid-mpath-<wwid> --add_storage 1
+----
+
+These examples allow all nodes. For a subset, set `--nodes <nodes>` on the
+entry or iSCSI storage and on the LVM storage (`pvesm set <storage> --nodes
+<nodes>`), using a comma-separated list. `pvesh` waits for the creation task;
+check its output for errors before using the storage.
+
+Adding Another LUN
+~~~~~~~~~~~~~~~~~~
+
+. Present the new LUN to the same nodes on the array. Enabled iSCSI storages
+ rescan their sessions automatically; for Fibre Channel, rescan the hosts as
+ shown in the prerequisites.
+. Run the guided setup again. For iSCSI, select the same target to reuse its
+ connection storage. If it lacks *Multipath*, enable that option in its edit
+ dialog first, observing the migration advice below.
+. Select the new LUN and create a separate LVM storage. By hand, repeat the
+ iSCSI listing and LVM command above, or the Fibre Channel procedure.
+
+[[storage_multipath_grow]]
+Growing a LUN
+~~~~~~~~~~~~~
+
+. Grow the LUN on the array. Never shrink a LUN in use.
+. Wait for the iSCSI session rescan, or rescan each SCSI path on every Fibre
+ Channel node with `echo 1 > /sys/block/<path>/device/rescan`, where `<path>`
+ is a member device such as `sdc`, not the map.
+. Check the map size on every node with `multipath -ll <wwid>` or under
+ *Node -> SAN*. The generated configuration sets `auto_resize grow_only`:
+ the map grows once all its paths report the new size. If necessary, run
+ `multipathd resize map <map>` after all paths have grown.
+. Run `pvresize /dev/disk/by-id/dm-uuid-mpath-<wwid>` on one node only, after
+ every node's map has grown. A smaller map cannot access the added space.
+
+[[storage_multipath_remove]]
+Removing a LUN
+~~~~~~~~~~~~~~
+
+{pve} never flushes maps or removes WWIDs from `/etc/multipath/wwids`.
+Removing a configuration entry is not enough. A map that queues I/O without
+paths can block guests and LVM commands, so disable queueing before unmapping:
+
+. Stop all users of the LUN on all hosts, or move their data elsewhere. Remove
+ the LVM storage with `pvesm remove <storage>` and deactivate its volume group
+ on every node with `vgchange -an <vg>`. Neither command erases the data.
+. Set an existing entry to fail I/O with
+ `pvesh set /cluster/multipath/wwid/<wwid> --no-path-retry fail`.
+ If none exists, create one with
+ `pvesh create /cluster/multipath/wwid --wwid <wwid> --no-path-retry fail`.
+ Add `--nodes <nodes>` if only a subset of nodes sees the LUN.
+. Wait until `multipath -ll <wwid>` on every participating node no longer lists
+ `queue_if_no_path` in the map's features. Wait for offline nodes to return.
+ Record the map name and member devices, and each member's identifier from
+ `/sys/block/<path>/device/wwid`.
+. Unmap the LUN on the array.
+. On every node, flush the map with `multipath -f <map>`. If it is busy, retry
+ after a few seconds; if it stays busy, find and stop its remaining users. Do
+ not force removal. For each recorded path,
+ check that its identifier is unchanged, then delete it with
+ `echo 1 > /sys/block/<path>/device/delete`. Skip paths already gone; stop if
+ an identifier changed.
+. Remove the explicit entry with `pvesh delete /cluster/multipath/wwid/<wwid>`.
+ Removing it earlier makes the nodes apply the default retry policy of the
+ array again, which can queue I/O on a map that is not flushed yet and block
+ whatever opens it.
+. On every node, wait until its next status update has removed the WWID from
+ `/etc/multipath/conf.d/pve-aliases.conf`, which takes about ten seconds, then
+ run `multipath -w <wwid>` to remove it from the allow-list. Running it before
+ that update can let the update add the WWID again. Check that
+ `grep -c '^/<wwid>/$' /etc/multipath/wwids` prints 0, and again after the
+ next status update.
+
+If the LUN was already unmapped and I/O is stuck, run
+`multipathd disablequeueing map <map>` on each affected node, then continue
+with the removal procedure.
+
+[[storage_multipath_disconnect]]
+Removing an iSCSI connection storage does not log out its sessions. Keep it
+while other LUNs of the target are in use; session maintenance is done with
+`iscsiadm`, not the read-only *Node -> SAN -> iSCSI* view.
+
+Checking Path Failures
+~~~~~~~~~~~~~~~~~~~~~
+
+*Datacenter -> Storage -> SAN* shows node availability, configuration errors
+and LUN states. The *State* of a LUN is the worst one among its nodes and names
+them if they are only some of the nodes. Hover over it for the states and path
+counts of all nodes. *Multipath* describes how the map is managed, not its
+health: by an explicit entry, by the storage that requests it, or *Unmanaged*
+for a map that {pve} did not set up. Under *Node -> SAN*, expand the LUN to
+inspect individual paths. *Node -> SAN -> iSCSI* shows targets and sessions.
+
+*Optimal*:: All known paths are usable and no expected path is missing.
+*OK (1 path)*:: The only path is usable, and there is no other path to fail
+over to. The API reports this as `optimal` with one path.
+*Degraded*:: Some paths are unusable or fewer paths exist than expected.
+*Failed*:: No usable path remains; I/O queues or fails according to the retry
+policy.
+*Missing*:: A node with a current report is expected to have the LUN but does
+not.
+*Unknown*:: No usable current observation is available for that node.
+
+During a path failure, inspect the degraded LUN's paths and restore the failed
+connection. The state returns to *Optimal* when the paths recover. Check node
+availability too: unknown observations do not worsen a known LUN state.
+
+An iSCSI storage expects one path per portal. For a Fibre Channel LUN, set
+*Expected Paths* in its multipath entry, as the guided setup does. Without it,
+a node only shows fewer paths than it should have while the lost ones are
+still listed. Depending on the settings for the array, the kernel removes a
+path that stays down longer than `dev_loss_tmo`, and the map then shows
+*Optimal* with fewer paths, or *OK (1 path)* for the last one.
+
+[[storage_multipath_config]]
+Array Settings and Existing Configurations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Use the built-in device profiles unless the array vendor requires changes.
+*Edit Overrides* under *Datacenter -> Storage -> SAN* edits
+`/etc/pve/multipath-overrides.conf` for all nodes. For example, to set a retry
+count for one array model (replace the vendor and product expressions):
+
+----
+devices {
+ device {
+ vendor "<vendor>"
+ product "<product>"
+ no_path_retry 12
+ }
+}
+----
+
+To move from a hand-made `/etc/multipath.conf`:
+
+. Back up the local configuration on every node. Move shared array settings to
+ the overrides file; add WWID entries under *Datacenter -> Storage -> SAN* for
+ Fibre Channel LUNs or per-LUN aliases and `no-path-retry` settings.
+. Enable *Multipath* on existing iSCSI storages. Keep existing LVM base volumes.
+ Check `multipathd show config` on every node before removing duplicate local
+ settings. Do not edit the generated `/etc/multipath/conf.d/pve-*.conf` files.
+. Check active volume dependencies with `lsblk` on each node. Enabling multipath
+ does not move active volumes off individual paths. Stop and restart affected
+ guests, or migrate them away and back, before relying on path redundancy.
+ Keep LVM component detection enabled and follow the
+ xref:storage_lvm[shared LVM autoactivation guidance].
diff --git a/pvesm.adoc b/pvesm.adoc
index 5bd24b2..5668a41 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -96,11 +96,10 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, FibreChannel (FC), or SAS block storage as shared storage in a
-cluster, LVM is used to split the LUN into virtual disks. The
-https://pve.proxmox.com/wiki/Multipath[Multipath Guide] explains how to
-configure it in a cluster, including multipathing which is usually a
-requirement in these scenarios.
+^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
+a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
+reachable over several paths; xref:storage_multipath[Multipath] describes how
+{pve} manages them in a cluster.
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -153,6 +152,11 @@ also useful for local storage types. In this case such local storage
is available on all nodes, but it is physically different and can have
totally different content.
+Add storage under *Datacenter -> Storage -> Add* in the web UI. For shared LVM
+on a xref:storage_multipath_setup[SAN LUN], use the guided setup under
+*Datacenter -> Storage -> SAN -> Add Storage* instead. It creates the storages
+that are needed and enables multipath for the LUN.
+
Storage Pools
~~~~~~~~~~~~~
@@ -421,6 +425,8 @@ See Also
* link:/wiki/Storage:_iSCSI[Storage: iSCSI]
+* link:/wiki/Storage:_Multipath[Storage: Multipath]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -463,6 +469,8 @@ include::pve-storage-iscsi.adoc[]
include::pve-storage-iscsidirect.adoc[]
+include::pve-storage-multipath.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
^ permalink raw reply related [relevance 19%]
* [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM
@ 2026-11-13 3:00 13% Thomas Lamprecht
2026-11-13 3:00 19% ` [PATCH v4 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
` (2 more replies)
0 siblings, 3 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-13 3:00 UTC (permalink / raw)
To: pve-devel
This is v4 of the combined and reduced series of the cluster-wide
multipath work [0][1] and Dietmar's RFC for guided remote storage setup
and SAN visibility [2].
v3 [3] had 76 patches in six repositories. I tried to trim v4 down by
reducing both the scope, minimally, and the implementation. This narrows
the series to shared LVM on iSCSI and Fibre Channel LUNs: 36 patches in
four repositories, about 7700 added lines instead of 26300. It basically
trades automatic cleanup and broad usage checks for a smaller
implementation and documented procedures for the admin. "The rework"
below gives some reasoning, "Changes since v3" the details.
Overview of what an admin gets with this:
- Datacenter > Storage > SAN, a new entry below Storage, shows the
multipath state of every node and of the LUNs that multipath
handles, and edits the multipath entries and array-specific
overrides. I explicitly chose this over the client/plugin side of
Storage, as we do not have e.g. Ceph or ZFS/LVM/... creation in
there either. We might want to rethink and consolidate our storage
interface vs. management story in the future, but IMO a partial
switch now is not worth it, that would add even more potential for
confusion than the new SAN view.
- Its Add Storage menu guides through shared LVM on a LUN: for iSCSI
it connects or reuses a target, with the initiator names of all
nodes at hand, for Fibre Channel it takes a LUN the nodes already
see. Both set up multipath for the LUN and end with its state on
every node of the new storage.
- Datacenter > Storage > Add keeps its dialogs. The iSCSI one gets a
Multipath option and the LVM one enables Shared for a base storage,
so the same works there in two steps. Both name the SAN view in a
note whose link opens it, as admins coming from other platforms look
for their SAN there first.
- Node > SAN lists the LUNs of a node with their paths and usage, can
wipe a LUN that no storage uses, and shows the iSCSI sessions.
The rework:
The series is for a cluster that reaches the LUNs of an array over
iSCSI or Fibre Channel on two or more paths and puts shared LVM on
them. v3 went further: it cleaned up after the admin, tried to find
every user of a LUN before a write, and added iSCSI operations of its
own. Each of these brought a ton of state and failure handling that has
to be maintained and tested. v4 drops them for the time being to get
this into a shippable state, and tries to follow a few rules instead:
- Add, never remove. A node adds the WWIDs it needs to the multipath
allow-list, but never removes one and never flushes a map. v3 did,
which took a record of who added what and probes for maps still in
use. Removing a LUN is rare and hurts when it goes wrong, so I made
it a documented procedure.
- Check a write where it happens. Creating a volume group or wiping a
LUN checks that no storage references it and looks at the device on
that node for mounts, holders and, for a volume group, existing
data. v3 also scanned for other local users, let the web UI ask the
other nodes and verified the device again between the writes of a
wipe. Stopping the users on other nodes and hosts before a wipe is
up to the admin now.
- Lists do not probe. The LUN inventory uses what udev, multipathd and
LVM's hint file already know, it no longer reads signatures or runs
LVM commands. The price is that usage can lag behind, for example on
the other nodes after a wipe, and that LVM keeps no hints while it
sees duplicate PVs, for example a LUN with an old PV that has two
paths and no map yet. Until that is resolved, the node shows no
volume group names and no storage for a Fibre Channel LUN, which has
no base volume to go by. A write asks LVM itself and is not
affected.
- Use what is there. The output of multipathd is parsed in Perl. v3
had a new crate in proxmox and its binding in proxmox-perl-rs for
that (patches 01 and 02), both repositories are out of the series.
Bounding the LVM status commands got reworked on top of the existing
run_fork_with_timeout() and sent separately [4].
- No new iSCSI operations. Session logout, record removal, rescan and
session parameters are gone from the API and from pvenode. The iSCSI
view is read-only and iscsiadm remains for the rest, so removing an
iSCSI storage leaves its sessions and node records behind, as on
master.
- The guided setup makes the API calls an admin would make by hand,
for iSCSI and Fibre Channel only. It no longer tracks and resumes
partial setups, always enables multipath, and no storage plugin gets
a setup method for it. It looks at the LUN on the node serving the
web UI only and does not ask the other nodes before it writes.
Instead it ends with the state of the LUN on each node of the
storage, from the cluster-wide status, so that a node without access
shows up right there.
- Multipath management is turned on by the admin. The API no longer
checks that every node supports it before the option is set, or
that nothing needs the option or an entry before it is removed. The
docs say to upgrade all nodes first and how to remove a LUN.
Again, we might reintroduce _some_ of this in a fitting form later, but
scope creep weighed v3 (and the revisions before it) down way too much
for it to ever get into a sane, shippable state where we do not get a
ton of maintenance issues. This here is certainly not perfect, but it
is at least still manageable and should get us the most relevant
convenience features.
Two things an admin will likely miss: there is no notification when a
LUN loses path redundancy, the state only shows on the SAN pages and in
the API. A node with fewer paths than its iSCSI portals or the expected
paths of the LUN's entry at least shows as degraded there, and a LUN
that only has one path reads "OK (1 path)" instead of optimal. And Fibre
Channel starts at a LUN the nodes already see, the web UI neither lists
the WWPNs of the nodes nor rescans their HBAs; the chapter gives the
commands for both, and the setup points to the rescan.
How it works:
- /etc/pve/multipath.cfg holds explicit entries per WWID (nodes, alias,
no-path-retry, expected paths), /etc/pve/multipath-overrides.conf
array settings in multipath.conf syntax; patch 01 registers
both. An iSCSI storage with the new 'multipath' option supplies its
LUNs without entries, Fibre Channel LUNs get an explicit entry.
- pvestatd calls one function of pve-storage per pass. It adds the
WWIDs the node needs to /etc/multipath/wwids, writes the drop-ins
/etc/multipath/conf.d/pve-*.conf (entries, overrides and one
generated default, auto_resize grow_only) and reloads multipathd
when something changed. The same call publishes the node's maps and
their state through the node key-value store (key 'multipath').
- /cluster/multipath/status aggregates these reports, derives
'missing' from the configuration and names the storage that requests
each map; /cluster/multipath/{wwid,overrides} edit the two files.
- The volumes of an iSCSI storage with the option end in
dm-uuid-mpath-<wwid> instead of the name of one path, so an LVM
storage uses them through the existing 'base' mechanism.
- /nodes/{node}/scan/san-luns and 'pvesm scan san-luns' return one row
per LUN with a WWID, /nodes/{node}/iscsi/{status,target} the
read-only session view.
- Volume group creation and wipe run under a cluster lock per LUN
(cfs_lock_domain) and do not hold the storage configuration lock
while they write. Adding an LVM storage with a new base volume still
does, as before.
- multipath-tools becomes a Recommends of libpve-storage-perl. Nodes
without it report that; plain iSCSI and LVM are unaffected.
Patches:
- cluster 01: register the two configuration files
- storage 02-22: helpers for the disk and iSCSI session inventory
(mostly Dietmar's), the multipath library and configuration, the
iSCSI option, the per-node apply and status with their API, the LUN
inventory, the read-only iSCSI status, volume groups on LUNs and the
wipe, in that order
- docs 23: the multipath chapter, rewritten around tasks
- manager 24-36: the pvestatd call, report and API mounts, then
the views, the two dialog changes, the two guided setups and the
note in the add dialogs
Changes since v3 [3] (numbers are v3 patches):
- applied meanwhile: the independent fixes 05 and 07 to 11, the
documentation note 43 and the scan picker fixes 47 and 48
- sent separately [4]: the bound for LVM status commands (04, 06, 46),
now one pve-storage patch without a pvestatd part or plugin API
change. Unlike v3 it leaves thin pool activation unbounded.
Whichever of the two is applied second has to pass the status cache
to the two lvm_vgs() calls of the base volume activation
- removed: everything "The rework" names, and with it the NFS,
SMB/CIFS and ZFS over iSCSI types, the wipe step, the node selector
and the multipath checkbox of the guided setup; the structured
'defaults' section of multipath.cfg and the per-LUN path settings
except no-path-retry (the generated defaults no longer set
find_multipaths, user_friendly_names and polling_interval); the
duplicate PV flag, the rows for devices without a WWID and the
'incomplete' marking in the LUN lists; the include-remote option of
the disk list; identity-based names for plain iSCSI volumes (40);
the JavaScript unit tests
- changed:
- get_disks() lists iSCSI devices only on request, so Ceph OSD
creation needs no change (45) and no Breaks
- one SAN panel below Datacenter > Storage instead of a SAN and a
Multipath view, with one state per node and per LUN. The state
of a LUN names the nodes it applies to, a single path is shown
as such instead of optimal, and the LUN list says how the
multipath of each LUN is managed instead of a yes or no for an
entry
- the guided setup starts from the Add Storage menu of that panel
instead of Datacenter > Storage > Add, offers snapshots as volume
chain, the Fibre Channel one adds its storage itself, and both
show the state of the LUN on each node at the end instead of
asking the other nodes before
- the node disk API adds the storage of a volume group on a LUN as
shared and for all nodes, and only under a new storage ID
- the chapter went from 527 to 260 lines
- new: destroying the volume group of a shared storage through the node
disk API is refused, and the LVM dialog enables Shared when a base
storage is selected; explicit multipath entries can set the expected
number of paths, which the Fibre Channel setup fills in
When applying, versioned dependencies have to be set: pve-manager on
libpve-storage-perl, and libpve-storage-perl (also as build dependency)
on the libpve-cluster-perl with patch 01, as PVE::Storage
registers the two files when it is loaded.
The per-node target and portal series [5][6] are independent of this
one. It takes the LUNs of an iSCSI storage from the sessions of its one
target, so if a storage can have several targets per node, whichever is
applied second has to cover that.
I tested this on a six-node nested cluster attached to a NetApp AFF A20
with three iSCSI portals and to Linux LIO targets with two: the guided
iSCSI setup with a new and with a reused connection storage, the same
through the plain dialogs and from the CLI as documented, a LUN that one
node is not allowed to see and gets access later, the Fibre Channel flow
through the web UI, also as an administrator other than root@pam, a
guest on the resulting storages (snapshot, rollback, online resize, live
migration, one path cut under I/O), growing a LUN, wipe and its
refusals, one path and all paths down with queued I/O, a stopped
multipathd, a node reboot and the documented LUN removal. The lab has no
FC hardware, so I emulated it with software FCoE in VN2VN mode and an
LIO tcm_fc target on two fabrics: the nodes get real FC host and remote
port objects, and the documented WWPN listing, rescan and LUN growth
work there as written. The guided Fibre Channel setup ran on such a LUN,
with one node on one fabric only and one node that saw the LUN only
after the rescan. The setup records the paths it sees in the LUN's
entry, so the node on one fabric shows as degraded, and a fabric cut
stays degraded also after the kernel removed the lost paths (66 seconds
dev_loss_tmo of the LIO profile). Real HBA drivers were not tested. Most
of that ran with the NVMe over Fabrics series on top and with the LVM
status patch [4] applied, the series alone ran on one node of that
cluster for the guided setups, the CLI procedure and the views. Without
[4] a stuck LVM command blocks pvestatd as on master.
[0]: https://lore.proxmox.com/pve-devel/20260626121000.2095591-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20260703124707.1172980-2-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20260731102156.3947857-1-dietmar@proxmox.com/
[3]: https://lore.proxmox.com/pve-devel/20261105233336.2178064-1-t.lamprecht@proxmox.com/
[4]: https://lore.proxmox.com/pve-devel/20261111015217.941220-1-t.lamprecht@proxmox.com/
[5]: https://lore.proxmox.com/pve-devel/20260430173220.441001-1-m.limbeck@proxmox.com/
[6]: https://lore.proxmox.com/pve-devel/20260804090819.2136483-1-dietmar@proxmox.com/
pve-cluster:
Thomas Lamprecht (1):
cfs: observe the multipath configuration files
src/PVE/Cluster.pm | 2 ++
src/pmxcfs/status.c | 2 ++
2 files changed, 4 insertions(+)
pve-storage:
Dietmar Maurer (8):
diskmanage: collect disk transport type from lsblk
diskmanage: qualify NVMe over fabrics transport
diskmanage: optionally include iSCSI session devices in disk enumeration
diskmanage: collect native NVMe multipath path state
iscsi: factor out session device map from device list
diskmanage: add helper to list multipath devices
pvesm: expose the SAN LUN inventory
api: add node-level iSCSI status
Thomas Lamprecht (13):
multipath: add a library around multipathd
multipath: add a cluster-wide configuration
iscsi: add an option to manage storage LUNs with multipath
lvm: activate a missing base volume before using the volume group
multipath: apply the configuration on every node
multipath: publish per-node status
api: add endpoints for the cluster-wide multipath configuration
api: multipath: add the cluster-wide health status
api: scan: add a SAN LUN inventory
disks: lvm: drop unused imports
disks: lvm: allow volume groups on SAN LUNs and multipath maps
disks: lvm: refuse to destroy the volume group of a shared storage
disks: allow wiping a SAN LUN that no storage uses
debian/control | 3 +-
src/PVE/API2/Disks.pm | 36 +-
src/PVE/API2/Disks/LVM.pm | 64 ++-
src/PVE/API2/ISCSI.pm | 165 +++++++
src/PVE/API2/Makefile | 2 +
src/PVE/API2/Multipath.pm | 446 ++++++++++++++++++
src/PVE/API2/Storage/Scan.pm | 197 ++++++++
src/PVE/CLI/pvesm.pm | 14 +
src/PVE/Diskmanage.pm | 212 ++++++++-
src/PVE/ISCSI/Topology.pm | 95 ++++
src/PVE/Makefile | 6 +
src/PVE/Multipath.pm | 211 +++++++++
src/PVE/Multipath/Config.pm | 204 ++++++++
src/PVE/Multipath/Generator.pm | 112 +++++
src/PVE/Multipath/Identity.pm | 43 ++
src/PVE/Multipath/Status.pm | 184 ++++++++
src/PVE/Storage/ISCSIPlugin.pm | 211 +++++----
src/PVE/Storage/LVMPlugin.pm | 128 ++++-
src/PVE/Storage/Makefile | 3 +-
src/PVE/Storage/SAN.pm | 328 +++++++++++++
src/test/Makefile | 34 +-
src/test/disk_api_test.pm | 256 ++++++++++
src/test/disk_tests/iscsi/disklist | 1 +
.../disk_tests/iscsi/disklist_expected.json | 19 +
src/test/disk_tests/iscsi/lsblk | 5 +
src/test/disk_tests/iscsi/sda/device/model | 1 +
src/test/disk_tests/iscsi/sda/device/vendor | 1 +
.../disk_tests/iscsi/sda/queue/rotational | 1 +
src/test/disk_tests/iscsi/sda/size | 1 +
src/test/disk_tests/iscsi/sda_udevadm | 21 +
src/test/disk_tests/multipath/disklist | 11 +
.../multipath/disklist_expected.json | 107 +++++
src/test/disk_tests/multipath/dm-0/dm/name | 1 +
src/test/disk_tests/multipath/dm-0/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-0/size | 1 +
src/test/disk_tests/multipath/dm-0_slaves | 4 +
src/test/disk_tests/multipath/dm-1/dm/name | 1 +
src/test/disk_tests/multipath/dm-1/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-1/size | 1 +
src/test/disk_tests/multipath/dm-1_slaves | 4 +
src/test/disk_tests/multipath/dm-2/dm/name | 1 +
src/test/disk_tests/multipath/dm-2/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-2/size | 1 +
src/test/disk_tests/multipath/dm-2_slaves | 0
src/test/disk_tests/multipath/dm-3/dm/name | 1 +
src/test/disk_tests/multipath/dm-3/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-3/size | 1 +
src/test/disk_tests/multipath/dm-3_slaves | 0
src/test/disk_tests/multipath/dm-4/dm/name | 1 +
src/test/disk_tests/multipath/dm-4/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-4/size | 1 +
src/test/disk_tests/multipath/dm-4_slaves | 0
src/test/disk_tests/multipath/lsblk | 77 +++
src/test/disk_tests/multipath/lvs | 0
src/test/disk_tests/multipath/mounts | 1 +
.../multipath/multipath_expected.json | 59 +++
src/test/disk_tests/multipath/multipathd | 124 +++++
.../multipath/multipathd_status_expected.json | 40 ++
.../nvme-subsystem/nvme-subsys0/nvme3/address | 1 +
.../nvme-subsys0/nvme3/nvme2c3n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme3/state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/address | 1 +
.../nvme-subsys0/nvme4/nvme2c4n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/state | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/address | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/state | 1 +
.../disk_tests/multipath/nvme8n1/device/model | 1 +
.../multipath/nvme8n1/device/transport | 1 +
.../multipath/nvme8n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme8n1/size | 1 +
src/test/disk_tests/multipath/nvme8n1_udevadm | 14 +
.../disk_tests/multipath/nvme9n1/device/model | 1 +
.../multipath/nvme9n1/device/transport | 1 +
.../multipath/nvme9n1/device/vendor | 1 +
.../multipath/nvme9n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme9n1/size | 1 +
src/test/disk_tests/multipath/nvme9n1_udevadm | 12 +
.../multipath/nvme_path_status_expected.json | 19 +
src/test/disk_tests/multipath/partlist | 0
src/test/disk_tests/multipath/pvs | 1 +
.../disk_tests/multipath/sda/device/model | 1 +
.../disk_tests/multipath/sda/device/vendor | 1 +
.../disk_tests/multipath/sda/holders/holder | 1 +
.../disk_tests/multipath/sda/queue/rotational | 1 +
src/test/disk_tests/multipath/sda/size | 1 +
src/test/disk_tests/multipath/sda_udevadm | 18 +
.../disk_tests/multipath/sdb/device/model | 1 +
.../disk_tests/multipath/sdb/device/vendor | 1 +
.../disk_tests/multipath/sdb/holders/holder | 1 +
.../disk_tests/multipath/sdb/queue/rotational | 1 +
src/test/disk_tests/multipath/sdb/size | 1 +
src/test/disk_tests/multipath/sdb_udevadm | 18 +
.../disk_tests/multipath/sdc/device/model | 1 +
.../disk_tests/multipath/sdc/device/vendor | 1 +
.../disk_tests/multipath/sdc/holders/holder | 1 +
.../disk_tests/multipath/sdc/queue/rotational | 1 +
src/test/disk_tests/multipath/sdc/size | 1 +
src/test/disk_tests/multipath/sdc_udevadm | 18 +
.../disk_tests/multipath/sdd/device/model | 1 +
.../disk_tests/multipath/sdd/device/vendor | 1 +
.../disk_tests/multipath/sdd/holders/holder | 1 +
.../disk_tests/multipath/sdd/queue/rotational | 1 +
src/test/disk_tests/multipath/sdd/size | 1 +
src/test/disk_tests/multipath/sdd_udevadm | 18 +
src/test/disk_tests/multipath/zpool | 1 +
.../disk_tests/sas/disklist_expected.json | 1 +
src/test/disk_tests/sas/lsblk | 5 +
src/test/disklist_test.pm | 107 ++++-
src/test/multipath-three-states.json | 52 ++
src/test/run_disk_api_tests.pl | 11 +
src/test/run_iscsi_activation_tests.pl | 86 ++++
src/test/run_lun_identity_tests.pl | 48 ++
src/test/run_multipath_api_tests.pl | 352 ++++++++++++++
src/test/run_multipath_tests.pl | 169 +++++++
src/test/run_san_api_tests.pl | 94 ++++
src/test/run_san_library_tests.pl | 84 ++++
src/test/run_san_lun_scan_tests.pl | 180 +++++++
src/test/run_san_nvme_tests.pl | 107 +++++
src/test/run_san_taint_tests.pl | 60 +++
src/test/run_san_wipe_tests.pl | 137 ++++++
src/test/run_test_lvm_base_activation.pl | 117 +++++
src/test/run_test_lvm_base_conflicts.pl | 232 ++++++---
src/test/run_test_lvm_create.pl | 14 +
123 files changed, 5244 insertions(+), 214 deletions(-)
pve-docs:
Thomas Lamprecht (1):
storage: document the cluster-wide multipath management
pmxcfs.adoc | 2 +
pve-storage-iscsi.adoc | 11 ++
pve-storage-iscsidirect.adoc | 2 +-
pve-storage-lvm.adoc | 3 +
pve-storage-multipath.adoc | 260 +++++++++++++++++++++++++++++++++++
pvesm.adoc | 18 ++-
6 files changed, 290 insertions(+), 6 deletions(-)
pve-manager:
Dietmar Maurer (2):
api: nodes: expose the iSCSI status
ui: node: san: show iSCSI targets and sessions
Thomas Lamprecht (11):
pvestatd: apply the multipath configuration and report the node status
report: add the managed multipath configuration
api: cluster: add the multipath endpoints
ui: dc: add a SAN view
ui: storage: iscsi: add the multipath option
ui: lvm: enable shared when a base storage is selected
ui: node: add SAN LUNs panel
ui: node: san: wipe a LUN that no storage uses
ui: dc: san: add a guided setup for shared LVM on iSCSI
ui: dc: san: add a guided setup for shared LVM on Fibre Channel
ui: storage: point the iSCSI and LVM add dialogs to the SAN view
PVE/API2/Cluster.pm | 7 +
PVE/API2/Nodes.pm | 7 +
PVE/Report.pm | 3 +
PVE/Service/pvestatd.pm | 7 +
www/manager6/Makefile | 12 +
www/manager6/SANUtils.js | 161 +++++++++
www/manager6/Utils.js | 14 +
www/manager6/dc/Config.js | 23 +-
www/manager6/dc/MultipathWwidEdit.js | 81 +++++
www/manager6/dc/SAN.js | 331 ++++++++++++++++++
www/manager6/node/Config.js | 24 ++
www/manager6/node/ISCSITargets.js | 122 +++++++
www/manager6/node/SANLuns.js | 184 ++++++++++
www/manager6/storage/Base.js | 5 +
www/manager6/storage/IScsiEdit.js | 46 +++
www/manager6/storage/LVMEdit.js | 6 +
www/manager6/storage/wizard/FibreChannel.js | 162 +++++++++
www/manager6/storage/wizard/IScsi.js | 272 ++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 181 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 +++++
www/manager6/storage/wizard/Wizard.js | 254 ++++++++++++++
www/manager6/window/SANLunState.js | 115 ++++++
www/manager6/window/SANLunWipe.js | 53 +++
23 files changed, 2147 insertions(+), 6 deletions(-)
^ permalink raw reply [relevance 13%]
* [PATCH v3 manager 53/76] ui: storage wizard: add Fibre Channel shared LVM setup
2026-11-05 23:30 13% [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup Thomas Lamprecht
2026-11-05 23:31 12% ` [PATCH v3 docs 44/76] storage: document the cluster-wide multipath management Thomas Lamprecht
@ 2026-11-05 23:31 4% ` Thomas Lamprecht
2026-11-13 3:07 9% ` superseded: [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup Thomas Lamprecht
2 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-05 23:31 UTC (permalink / raw)
To: pve-devel
Fibre Channel exposes block devices rather than a storage plugin.
Guide shared LVM setup using unused devices or existing volume groups,
showing storage ownership and local usage alongside device identity.
Accept only Fibre Channel devices. Local and unknown transports remain
display-only under "Show all devices": identity alone does not establish
shared access. Require stable by-id links for new groups because kernel
names can be reused before the task runs.
Bind inventory responses and selections to their scan node and request,
rejecting obsolete selections. Reuse these responses for cluster
visibility checks without silently excluding unchecked nodes.
The wizard tracks volume-group creation and keeps partial-setup settings
fixed. Resume status checks for known tasks, but never repeat an
unanswered creation request; direct users to task history if its task ID
is unknown.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 3 +
www/manager6/SANUtils.js | 179 +++++
www/manager6/Utils.js | 4 +
www/manager6/storage/wizard/CommonSettings.js | 2 +
www/manager6/storage/wizard/FibreChannel.js | 674 ++++++++++++++++++
www/manager6/storage/wizard/LunPicker.js | 25 +
www/manager6/storage/wizard/Wizard.js | 169 ++++-
7 files changed, 1054 insertions(+), 2 deletions(-)
create mode 100644 www/manager6/SANUtils.js
create mode 100644 www/manager6/storage/wizard/FibreChannel.js
create mode 100644 www/manager6/storage/wizard/LunPicker.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 7002518e0..602e3b9b9 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -7,6 +7,7 @@ JSSRC= \
StateProvider.js \
qemu/Architecture.js \
Utils.js \
+ SANUtils.js \
UIOptions.js \
Toolkit.js \
VNCConsole.js \
@@ -380,8 +381,10 @@ JSSRC= \
storage/ESXIEdit.js \
storage/wizard/Wizard.js \
storage/wizard/CommonSettings.js \
+ storage/wizard/LunPicker.js \
storage/wizard/NFS.js \
storage/wizard/CIFS.js \
+ storage/wizard/FibreChannel.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/SANUtils.js b/www/manager6/SANUtils.js
new file mode 100644
index 000000000..3b31ec614
--- /dev/null
+++ b/www/manager6/SANUtils.js
@@ -0,0 +1,179 @@
+Ext.define('PVE.SANUtils', {
+ singleton: true,
+
+ lun_fields: [
+ 'devpath',
+ 'size',
+ 'vendor',
+ 'model',
+ 'paths-total',
+ 'usage',
+ 'used-by-storage',
+ 'vgname',
+ 'pv-in-use',
+ 'detail',
+ 'by-id',
+ ],
+
+ render_san_lun_device: function (value, metaData, rec) {
+ let text = Ext.htmlEncode(value);
+ // only multipath mapped devices report their path count
+ let paths = rec.get('paths-total');
+ if (paths) {
+ text += ` (${paths} ${ngettext('path', 'paths', paths)})`;
+ }
+ return text;
+ },
+
+ // Unchecked nodes (offline, failed or timed out) may still see a LUN.
+ scan_nodes_for_luns: function (
+ callback,
+ request = (options) => Proxmox.Utils.API2Request(options),
+ ) {
+ let wwids = {};
+ let unchecked = [];
+ let nodes = PVE.data.ResourceStore.getNodes();
+ let pending = nodes.length;
+ let finish = function () {
+ callback({
+ sees: (wwid) =>
+ Object.keys(wwids)
+ .filter((node) => wwids[node].has(wwid))
+ .sort(),
+ unchecked: unchecked.sort(),
+ });
+ };
+ if (!pending) {
+ finish();
+ return;
+ }
+ let done = function () {
+ if (--pending === 0) {
+ finish();
+ }
+ };
+ for (const node of nodes) {
+ if (node.status !== 'online') {
+ unchecked.push(node.node);
+ done();
+ continue;
+ }
+ request({
+ url: `/nodes/${node.node}/scan/san-luns`,
+ method: 'GET',
+ timeout: 20000,
+ failure: function () {
+ unchecked.push(node.node);
+ done();
+ },
+ success: function (response) {
+ let rows = (response.result.data || []).filter(
+ (row) => !['sata', 'usb'].includes(row.transport),
+ );
+ if (rows.some((row) => row['wwid-unknown'])) {
+ unchecked.push(node.node);
+ }
+ wwids[node.node] = new Set(rows.map((row) => row.wwid).filter((w) => w));
+ done();
+ },
+ });
+ }
+ },
+
+ request_uncertain: function (response) {
+ return response.timedout || response.status === 0 || response.result?.success === undefined;
+ },
+
+ render_san_lun_usage: function (value, metaData, rec) {
+ let text = PVE.SANUtils.san_lun_usage_text(rec.data);
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(text)}"`;
+ return text;
+ },
+
+ san_storage_only_connects: function (storeid) {
+ let rec = PVE.data.ResourceStore.findRecord('storage', storeid, 0, false, true, true);
+ if (!rec || !(rec.get('plugintype') === 'iscsi')) {
+ return false;
+ }
+ let content = `${rec.get('content') ?? ''}`;
+ return content === '' || content === 'none';
+ },
+
+ san_lun_usage_text: function (row) {
+ let value = row.usage;
+ if (value === 'unknown') {
+ return Ext.htmlEncode(
+ Ext.String.format(
+ gettext('Could not check this LUN for data: {0}'),
+ row.detail || gettext('unknown'),
+ ),
+ );
+ }
+ let sid = row['used-by-storage'];
+ // the scan also attributes LUNs to a connection-only storage, which leaves them free
+ let connects = sid && PVE.SANUtils.san_storage_only_connects(sid);
+ if (value === 'unused') {
+ if (connects) {
+ return Ext.htmlEncode(
+ Ext.String.format(gettext('unused, connected through storage "{0}"'), sid),
+ );
+ }
+ if (sid) {
+ return Ext.htmlEncode(Ext.String.format(gettext('used by storage "{0}"'), sid));
+ }
+ return gettext('unused');
+ }
+ if (connects) {
+ sid = undefined;
+ }
+ if (value === 'lvm' || (value === 'other' && row.detail === 'LVM2_member')) {
+ let vgname = row.vgname;
+ if (vgname) {
+ let text = Ext.String.format(gettext('VG "{0}"'), vgname);
+ if (sid === vgname) {
+ text = Ext.String.format(gettext('VG of storage "{0}"'), sid);
+ } else if (sid) {
+ text = Ext.String.format(
+ gettext('VG "{0}", used by storage "{1}"'),
+ vgname,
+ sid,
+ );
+ }
+ return Ext.htmlEncode(text);
+ }
+ let orphan = [0, '0', false].includes(row['pv-in-use']);
+ let text;
+ if (orphan) {
+ text = gettext('LVM physical volume, no volume group');
+ } else {
+ text = gettext('LVM physical volume, volume group not known on this node');
+ }
+ return Ext.htmlEncode(
+ sid ? Ext.String.format(gettext('{0}, used by storage "{1}"'), text, sid) : text,
+ );
+ }
+ return Ext.htmlEncode(row.detail || gettext('in use'));
+ },
+
+ render_san_transport: function (value) {
+ if (!value) {
+ return '';
+ }
+ return (
+ {
+ iscsi: 'iSCSI',
+ iser: 'iSER',
+ fc: 'FC',
+ fcoe: 'FCoE',
+ sas: 'SAS',
+ nvme: 'NVMe',
+ 'nvme-tcp': 'NVMe/TCP',
+ 'nvme-rdma': 'NVMe/RDMA',
+ 'nvme-fc': 'NVMe/FC',
+ 'nvme-loop': 'NVMe loop',
+ tcp: 'TCP',
+ rdma: 'RDMA',
+ }[value] ?? Ext.htmlEncode(value)
+ );
+ },
+});
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index ca850158b..bc5171712 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -274,6 +274,10 @@ Ext.define('PVE.Utils', {
return '<i class="fa fa-' + iconCls + '"></i> ' + value;
},
+ note_text: function (text) {
+ return `<span class="pmx-hint">${gettext('Note:')}</span> ${text}`;
+ },
+
validateZfsBlocksize: function (value) {
if (!value) {
return true;
diff --git a/www/manager6/storage/wizard/CommonSettings.js b/www/manager6/storage/wizard/CommonSettings.js
index a2bd240fd..fedd6dc31 100644
--- a/www/manager6/storage/wizard/CommonSettings.js
+++ b/www/manager6/storage/wizard/CommonSettings.js
@@ -10,6 +10,7 @@ Ext.define('PVE.storage.wizard.CommonSettings', {
fixedContent: undefined,
contentFieldConfig: undefined,
nodesFieldConfig: undefined,
+ extraColumn1: undefined,
onGetValues: function (values) {
values.disable = values.enable ? 0 : 1;
@@ -28,6 +29,7 @@ Ext.define('PVE.storage.wizard.CommonSettings', {
vtype: 'StorageId',
allowBlank: false,
},
+ ...(me.extraColumn1 || []),
];
if (!me.fixedContent) {
diff --git a/www/manager6/storage/wizard/FibreChannel.js b/www/manager6/storage/wizard/FibreChannel.js
new file mode 100644
index 000000000..4affbd8a7
--- /dev/null
+++ b/www/manager6/storage/wizard/FibreChannel.js
@@ -0,0 +1,674 @@
+Ext.define('PVE.storage.wizard.FCLunSelect', {
+ extend: 'Proxmox.panel.InputPanel',
+ xtype: 'pveStorageWizardFCLunSelect',
+ mixins: ['PVE.storage.wizard.LunPicker'],
+
+ onlineHelp: 'storage_lvm',
+
+ // { lun } of the selected row
+ selection: undefined,
+ lunScan: undefined,
+
+ // include unchecked nodes, one left out cannot use the storage after a migration
+ updateNodes: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let lun = me.selection?.lun;
+ if (PVE.Utils.isStandaloneNode() || !lun?.wwid || !me.lunScan) {
+ return;
+ }
+ let nodes = new Set([
+ wizard.getScanNode(),
+ ...me.lunScan.sees(lun.wwid),
+ ...me.lunScan.unchecked,
+ ]);
+ wizard.down('field[name=nodes]').setValue([...nodes].sort());
+ },
+
+ validator: function () {
+ let wizard = this.up('window');
+ return !wizard.busy && !!wizard.getViewModel().get('vgmode');
+ },
+
+ updateActions: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let blocked = wizard.busy;
+ let grid = me.down('#lunGrid');
+ grid.setDisabled(blocked || me.scanning);
+ me.down('#rescan').setDisabled(blocked);
+ me.down('pveStorageScanNodeSelector')?.setDisabled(blocked);
+ if (wizard.down('#wizcontent').getActiveTab() === me) {
+ wizard.down('#next').setDisabled(!me.validator());
+ }
+ },
+
+ currentSelection: function (values) {
+ let me = this;
+ let wizard = me.up('window');
+ let rec = me.down('#lunGrid').getSelection()[0];
+ if (
+ me.scanning ||
+ !rec?.get('selectable') ||
+ rec.data !== me.selection?.lun ||
+ rec.get('scanNode') !== wizard.getScanNode() ||
+ rec.get('scanGeneration') !== me.scanGeneration
+ ) {
+ return false;
+ }
+ return values.vgmode === 'existing'
+ ? rec.get('usage') === 'lvm' && values.vgname === rec.get('vgname')
+ : values.vgmode === 'create' &&
+ rec.get('usage') === 'unused' &&
+ !!rec.get('by-id') &&
+ values.device === rec.get('by-id');
+ },
+
+ updateEmptyText: function () {
+ let me = this;
+ let text = Ext.String.format(
+ gettext(
+ 'No Fibre Channel devices found on node "{0}". Check zoning and array access, and rescan the host bus adapters on the node. Then press Rescan.',
+ ),
+ Ext.htmlEncode(me.up('window').getScanNode()),
+ );
+ if (!me.down('#showAllDevices').getValue()) {
+ text +=
+ ' ' +
+ gettext(
+ '"Show all devices" also lists local devices and devices with an unknown transport.',
+ );
+ }
+ me.down('#lunGrid').setEmptyText(text);
+ },
+
+ updatePrivilegeNote: function () {
+ let me = this;
+ let note = me.down('#privilegeNote');
+ if (!note || me.canModify) {
+ return;
+ }
+ let rows = me.down('#lunGrid').getStore().getRange();
+ let stuck =
+ me.scanDone &&
+ !rows.some((rec) => rec.get('selectable')) &&
+ rows.some((rec) => rec.get('usage') === 'unused' && !rec.get('reason'));
+ let text = gettext(
+ 'Without the Sys.Modify privilege on "/", only LUNs with an existing volume group can be selected.',
+ );
+ note.setValue(
+ stuck
+ ? `<i class="fa fa-exclamation-triangle warning"></i> ${text}`
+ : PVE.Utils.note_text(text),
+ );
+ note[stuck ? 'addCls' : 'removeCls']('pmx-hint');
+ },
+
+ refreshLuns: function () {
+ let me = this;
+ if (!me.rendered || me.destroyed) {
+ return;
+ }
+ me.updateEmptyText();
+ let wizard = me.up('window');
+ let node = wizard.getScanNode();
+ let generation = (me.scanGeneration = (me.scanGeneration ?? 0) + 1);
+ let current = () =>
+ !me.destroyed && generation === me.scanGeneration && node === wizard.getScanNode();
+ let grid = me.down('#lunGrid');
+ me.scanning = true;
+ me.scanDone = false;
+ grid.getSelectionModel().deselectAll();
+ me.selection = undefined;
+ me.lunScan = undefined;
+ wizard.getViewModel().set({ vgmode: '', device: '', vgname: '' });
+ grid.getStore().setData([]);
+ Proxmox.Utils.setErrorMask(grid, false);
+ grid.setLoading(true);
+ wizard.updateActions();
+ // the grid and the cluster-wide check share the raw local scan within this load
+ let scans = new Map();
+ let request = function (options) {
+ let scan = scans.get(options.url);
+ if (scan) {
+ if (scan.outcome) {
+ options[scan.outcome](scan.response);
+ } else {
+ scan.waiting.push(options);
+ }
+ return;
+ }
+ scan = { waiting: [options] };
+ scans.set(options.url, scan);
+ let finish = function (outcome, response) {
+ scan.outcome = outcome;
+ scan.response = response;
+ scan.waiting.forEach((listener) => listener[outcome](response));
+ scan.waiting = [];
+ };
+ Proxmox.Utils.API2Request({
+ ...options,
+ failure: (response) => finish('failure', response),
+ success: (response) => finish('success', response),
+ });
+ };
+ request({
+ url: `/nodes/${node}/scan/san-luns`,
+ method: 'GET',
+ timeout: 20000,
+ failure: function (response) {
+ if (!current()) {
+ return;
+ }
+ me.scanning = false;
+ grid.setLoading(false);
+ Proxmox.Utils.setErrorMask(grid, response.htmlStatus);
+ me.updatePrivilegeNote();
+ wizard.updateActions();
+ },
+ success: function (response) {
+ if (!current()) {
+ return;
+ }
+ grid.getStore().setData(
+ (response.result.data || []).map((row) => ({
+ ...row,
+ scanNode: node,
+ scanGeneration: generation,
+ })),
+ );
+ me.scanning = false;
+ me.scanDone = true;
+ grid.setLoading(false);
+ me.updatePrivilegeNote();
+ wizard.updateActions();
+ },
+ });
+ if (!PVE.Utils.isStandaloneNode()) {
+ PVE.SANUtils.scan_nodes_for_luns(function (result) {
+ if (!current()) {
+ return;
+ }
+ me.lunScan = result;
+ me.updateNodes();
+ }, request);
+ }
+ },
+
+ initComponent: function () {
+ let me = this;
+
+ let sanTransports = { fc: 1, 'nvme-fc': 1 };
+
+ // these need an initiator connection, which this storage type does not set up on other
+ // nodes
+ let remoteTransports = {
+ fcoe: 1,
+ iscsi: 1,
+ 'nvme-tcp': 1,
+ 'nvme-rdma': 1,
+ 'nvme-loop': 1,
+ };
+
+ // a device on these is attached to this node only; for SAS or an unknown transport the scan
+ // cannot tell whether other nodes reach it
+ let localTransports = { ata: 1, mmc: 1, nvme: 1, sata: 1, sbp: 1, usb: 1, virtio: 1 };
+
+ let sanTransportFilter = new Ext.util.Filter({
+ id: 'san-transport',
+ filterFn: (rec) => !!sanTransports[rec.get('transport')],
+ });
+
+ let remoteTransportFilter = new Ext.util.Filter({
+ id: 'remote-transport',
+ filterFn: (rec) => !remoteTransports[rec.get('transport')],
+ });
+
+ // creating the volume group needs Sys.Modify on /
+ let caps = Ext.state.Manager.get('GuiCap');
+ let canModify = !!caps.dc['Sys.Modify'];
+ me.canModify = canModify;
+
+ let notOffered = function (data) {
+ if (!sanTransports[data.transport]) {
+ return localTransports[data.transport]
+ ? gettext('Not offered: local device')
+ : gettext('Not offered: shared access cannot be verified for this transport');
+ }
+ // a kernel name may point to another device by the time the volume group is created
+ if (data.usage === 'unused' && !data['used-by-storage'] && !data['by-id']) {
+ return gettext('The LUN has no stable device name for creating a volume group.');
+ }
+ return undefined;
+ };
+
+ let columns = me.lunColumns();
+ let store = Ext.create('Ext.data.Store', {
+ fields: [
+ ...PVE.SANUtils.lun_fields,
+ 'scanNode',
+ 'scanGeneration',
+ 'transport',
+ 'serial',
+ 'wwn',
+ 'wwid',
+ 'iscsi-lun',
+ {
+ name: 'reason',
+ calculate: notOffered,
+ },
+ {
+ name: 'selectable',
+ calculate: function (data) {
+ if (notOffered(data) || data['used-by-storage']) {
+ return false;
+ }
+ if (data.usage === 'unused') {
+ return canModify;
+ }
+ return data.usage === 'lvm' && !!data.vgname;
+ },
+ },
+ ],
+ filters: [remoteTransportFilter, sanTransportFilter],
+ sorters: [
+ {
+ sorterFn: function (a, b) {
+ let rank = (rec) => (sanTransports[rec.data.transport] ? 0 : 1);
+ return rank(a) - rank(b) || a.data.devpath.localeCompare(b.data.devpath);
+ },
+ },
+ ],
+ });
+
+ let updateSelection = function (rec) {
+ let wizard = me.up('window');
+ me.selection = rec ? { lun: rec.data } : undefined;
+ let vm = wizard.getViewModel();
+ if (!rec || !rec.get('selectable')) {
+ vm.set({ vgmode: '', device: '', vgname: '' });
+ } else if (rec.get('usage') === 'unused') {
+ vm.set({ vgmode: 'create', device: rec.get('by-id'), vgname: '' });
+ } else {
+ vm.set({ vgmode: 'existing', device: '', vgname: rec.get('vgname') });
+ }
+ me.updateNodes();
+ };
+
+ me.items = [
+ {
+ xtype: 'displayfield',
+ value: gettext('Select the SAN LUN for the volume group:'),
+ },
+ {
+ xtype: 'grid',
+ itemId: 'lunGrid',
+ height: 220,
+ store: store,
+ viewConfig: {
+ trackOver: false,
+ getRowClass: (rec) => (rec.get('selectable') ? '' : 'x-item-disabled'),
+ },
+ listeners: {
+ beforeselect: (grid, rec) => rec.get('selectable'),
+ selectionchange: (sm, selection) => updateSelection(selection[0]),
+ },
+ columns: [
+ {
+ header: gettext('Device'),
+ dataIndex: 'devpath',
+ flex: 3,
+ renderer: PVE.SANUtils.render_san_lun_device,
+ },
+ {
+ header: gettext('Transport'),
+ dataIndex: 'transport',
+ width: 80,
+ renderer: PVE.SANUtils.render_san_transport,
+ },
+ columns.size,
+ columns.model,
+ {
+ header: gettext('Usage'),
+ dataIndex: 'usage',
+ flex: 2,
+ renderer: function (value, metaData, rec) {
+ let reason = rec.get('reason');
+ if (!reason) {
+ return PVE.SANUtils.render_san_lun_usage(value, metaData, rec);
+ }
+ let text = Ext.htmlEncode(reason);
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(text)}"`;
+ return text;
+ },
+ },
+ ],
+ },
+ {
+ xtype: 'displayfield',
+ itemId: 'privilegeNote',
+ hidden: canModify,
+ },
+ {
+ xtype: 'container',
+ layout: 'hbox',
+ items: [
+ {
+ xtype: 'button',
+ itemId: 'rescan',
+ text: gettext('Rescan'),
+ iconCls: 'fa fa-search',
+ handler: () => me.refreshLuns(),
+ },
+ ],
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ itemId: 'showAllDevices',
+ boxLabel: gettext('Show all devices'),
+ submitValue: false,
+ autoEl: {
+ tag: 'div',
+ 'data-qtip': gettext('Also list devices with local or unknown transports.'),
+ },
+ listeners: {
+ change: function (f, value) {
+ me.updateEmptyText();
+ let filters = store.getFilters();
+ if (value) {
+ filters.remove(sanTransportFilter);
+ } else {
+ filters.add(sanTransportFilter);
+ let sm = me.down('#lunGrid').getSelectionModel();
+ let selected = sm.getSelection()[0];
+ if (selected && store.indexOf(selected) < 0) {
+ sm.deselectAll();
+ }
+ }
+ me.updatePrivilegeNote();
+ },
+ },
+ },
+ {
+ xtype: 'textfield',
+ name: 'vgmode',
+ hidden: true,
+ allowBlank: false,
+ bind: { value: '{vgmode}' },
+ },
+ {
+ xtype: 'textfield',
+ name: 'device',
+ hidden: true,
+ allowBlank: true,
+ bind: { value: '{device}' },
+ },
+ ];
+
+ if (!PVE.Utils.isStandaloneNode()) {
+ me.items.unshift({
+ xtype: 'pveStorageScanNodeSelector',
+ listeners: {
+ change: function () {
+ me.refreshLuns();
+ },
+ },
+ });
+ }
+
+ // a step is created before its window
+ me.on(
+ 'afterrender',
+ function () {
+ me.mon(me.up('window'), 'setupchange', me.updateActions, me);
+ me.refreshLuns();
+ },
+ me,
+ { single: true },
+ );
+ me.callParent();
+ me.updatePrivilegeNote();
+ },
+});
+
+PVE.storage.wizard.types.fc = {
+ text: gettext('Fibre Channel'),
+ description: gettext('Block storage (LUNs) on a SAN, attached via Fibre Channel.'),
+ group: 'san',
+ apiType: 'lvm',
+ viewModel: {
+ data: {
+ vgmode: '',
+ device: '',
+ vgname: '',
+ },
+ formulas: {
+ vgCreate: (get) => get('vgmode') === 'create',
+ },
+ },
+ steps: () => [
+ {
+ xtype: 'pveStorageWizardFCLunSelect',
+ title: gettext('SAN LUN'),
+ },
+ ],
+ settings: {
+ onlineHelp: 'storage_lvm',
+ cts: ['images', 'rootdir'],
+ defaultContent: ['images', 'rootdir'],
+ extraColumn1: [
+ {
+ xtype: 'textfield',
+ name: 'vgname',
+ fieldLabel: gettext('Volume group'),
+ allowBlank: true,
+ emptyText: gettext('use storage ID'),
+ bind: {
+ value: '{vgname}',
+ readOnly: '{!vgCreate}',
+ },
+ },
+ ],
+ advancedColumn1: [
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'saferemove',
+ uncheckedValue: 0,
+ fieldLabel: gettext('Wipe Removed Volumes'),
+ },
+ ],
+ },
+
+ canSubmit: function (wizard) {
+ return !!wizard.getValues().vgmode;
+ },
+
+ summaryRows: function (values, wizard) {
+ let step = wizard.down('pveStorageWizardFCLunSelect');
+ let { lun = {} } = step.selection ?? {};
+ let rows = [];
+ if (values.vgmode === 'create') {
+ rows.push({
+ label: gettext('Volume group'),
+ value: Ext.String.format(
+ gettext('Create "{0}" on {1} ({2})'),
+ values.vgname || values.storage,
+ values.device,
+ Proxmox.Utils.format_size(lun.size),
+ ),
+ weight: 20,
+ });
+ } else {
+ rows.push({
+ label: gettext('Volume group'),
+ value: Ext.String.format(gettext('Use existing "{0}"'), values.vgname),
+ weight: 20,
+ });
+ }
+ let unchecked = (step.lunScan?.unchecked ?? []).filter((node) =>
+ []
+ .concat(values.nodes ?? [])
+ .join(',')
+ .split(',')
+ .includes(node),
+ );
+ if (unchecked.length) {
+ rows.push({
+ label: gettext('Not checked'),
+ value: Ext.String.format(
+ gettext('Could not check whether these nodes see the LUN: {0}.'),
+ unchecked.join(', '),
+ ),
+ weight: 33,
+ });
+ }
+ return { rows, skip: ['vgmode', 'vgname', 'device'] };
+ },
+
+ submit: function (wizard, values) {
+ let step = wizard.down('pveStorageWizardFCLunSelect');
+ if (!step.currentSelection(values)) {
+ Ext.Msg.alert(
+ gettext('Error'),
+ gettext('Select a LUN from the current scan before continuing.'),
+ );
+ return;
+ }
+ let enc = Ext.htmlEncode;
+ let mode = values.vgmode;
+ delete values.vgmode;
+
+ let params = {
+ storage: values.storage,
+ type: 'lvm',
+ vgname: values.vgname || values.storage,
+ shared: 1,
+ content: values.content,
+ nodes: values.nodes,
+ disable: values.disable,
+ saferemove: values.saferemove,
+ };
+
+ if (mode === 'existing') {
+ wizard.runSubmitChain([(next) => wizard.createStorage(params, next)]);
+ return;
+ }
+
+ let created = (wizard.created ??= {});
+ let node = wizard.getScanNode();
+ let device = values.device;
+
+ let vgCreatedHint = () =>
+ Ext.String.format(
+ gettext(
+ 'The volume group "{0}" was created on node "{1}". Press {2} to retry the remaining steps, or complete the setup under Datacenter > Storage > Add > LVM.',
+ ),
+ enc(params.vgname),
+ enc(node),
+ enc(wizard.down('#submit').text),
+ );
+
+ let volumeGroupFailure = function (msg, final) {
+ if (final) {
+ delete created.task;
+ wizard.unfreeze();
+ } else {
+ msg +=
+ '<br><br>' +
+ Ext.String.format(
+ gettext(
+ 'If the task outcome stays unknown, check whether the volume group "{0}" exists on node "{1}" and complete the setup under Datacenter > Storage > Add > LVM.',
+ ),
+ enc(params.vgname),
+ enc(node),
+ );
+ }
+ wizard.updateActions();
+ Ext.Msg.alert(gettext('Error'), msg);
+ };
+ let unknownVolumeGroup = function () {
+ wizard.unknownVolumeGroup = true;
+ wizard.freeze();
+ wizard.showOperationNotice(
+ Ext.String.format(
+ gettext(
+ 'The node did not answer in time, so a volume group task may still be running on node "{0}". Check its task history. Once the task is done, run the wizard again; it offers the volume group "{1}" if the task created it.',
+ ),
+ enc(node),
+ enc(params.vgname),
+ ),
+ );
+ wizard.updateActions();
+ };
+ let waitForVolumeGroup = function (next) {
+ wizard.waitForTask(node, created.task, {
+ msg: gettext('Creating the volume group...'),
+ texts: {
+ running: Ext.String.format(
+ gettext(
+ 'The task on node "{0}" is still running. Check its task log, or press {1} to wait for it again. If it creates volume group "{2}", you can select that group when you run the wizard again.',
+ ),
+ enc(node),
+ enc(wizard.down('#submit').text),
+ enc(params.vgname),
+ ),
+ },
+ success: function () {
+ created.volumeGroup = params.vgname;
+ delete created.task;
+ next();
+ },
+ failure: volumeGroupFailure,
+ });
+ };
+
+ wizard.runSubmitChain([
+ (next) => {
+ if (created.task || created.volumeGroup) {
+ next();
+ return;
+ }
+ wizard.assertStorageIdsFree([params.storage], next);
+ },
+ (next) => {
+ if (created.volumeGroup) {
+ next();
+ return;
+ }
+ // a task started earlier is still the one to wait for, a second create would
+ // race it on the same device
+ if (created.task) {
+ waitForVolumeGroup(next);
+ return;
+ }
+ wizard.request({
+ url: `/nodes/${node}/disks/lvm`,
+ method: 'POST',
+ params: {
+ name: params.vgname,
+ device: device,
+ },
+ failure: function (response) {
+ if (PVE.SANUtils.request_uncertain(response)) {
+ unknownVolumeGroup();
+ } else {
+ volumeGroupFailure(response.htmlStatus, true);
+ }
+ },
+ success: function (response) {
+ try {
+ Proxmox.Utils.parse_task_upid(response.result.data);
+ } catch (_error) {
+ unknownVolumeGroup();
+ return;
+ }
+ created.task = response.result.data;
+ wizard.freeze();
+ waitForVolumeGroup(next);
+ },
+ });
+ },
+ (next) => wizard.createStorage(params, next, vgCreatedHint()),
+ ]);
+ },
+};
diff --git a/www/manager6/storage/wizard/LunPicker.js b/www/manager6/storage/wizard/LunPicker.js
new file mode 100644
index 000000000..cb3eba7b3
--- /dev/null
+++ b/www/manager6/storage/wizard/LunPicker.js
@@ -0,0 +1,25 @@
+Ext.define('PVE.storage.wizard.LunPicker', {
+ extend: 'Ext.Mixin',
+
+ mixinConfig: {
+ id: 'lunPicker',
+ },
+
+ lunColumns: function () {
+ return {
+ size: {
+ header: gettext('Size'),
+ dataIndex: 'size',
+ width: 90,
+ renderer: Proxmox.Utils.render_size,
+ },
+ model: {
+ header: gettext('Vendor') + '/' + gettext('Model'),
+ dataIndex: 'model',
+ flex: 2,
+ renderer: (value, metaData, rec) =>
+ Ext.htmlEncode(`${rec.get('vendor') || ''} ${value || ''}`.trim()),
+ },
+ };
+ },
+});
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
index ef3e505eb..b4978d296 100644
--- a/www/manager6/storage/wizard/Wizard.js
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -82,6 +82,8 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
busy: false,
+ unknownVolumeGroup: false,
+
// the continuation lives in this window: block closing and the buttons while waiting, then
// restore them
setBusy: function (busy, msg) {
@@ -103,6 +105,42 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
me.down('#back').setDisabled(true);
}
}
+ me.updateActions();
+ },
+
+ canSubmit: function () {
+ let me = this;
+ if (me.busy || me.unknownVolumeGroup) {
+ return false;
+ }
+ let canSubmit = PVE.storage.wizard.types[me.wizardType].canSubmit;
+ if (canSubmit) {
+ return canSubmit(me);
+ }
+ return true;
+ },
+
+ actionText: function () {
+ return gettext('Finish');
+ },
+
+ updateActions: function () {
+ let me = this;
+ if (!me.down('#submit')) {
+ return;
+ }
+ me.down('#submit').setText(me.actionText());
+ // a type with its own submit condition decides the state of the confirm buttons
+ let confirmActive = me.down('#wizcontent').getActiveTab() === me.down('#confirm');
+ if (PVE.storage.wizard.types[me.wizardType].canSubmit && confirmActive) {
+ me.down('#submit').setDisabled(!me.canSubmit());
+ me.down('#back').setDisabled(!!me.frozenValues || me.busy);
+ }
+ me.fireEvent('setupchange', me);
+ // after the listeners, so no step can enable an action again
+ if (me.busy || me.unknownVolumeGroup) {
+ ['#back', '#next', '#submit'].forEach((id) => me.down(id).disable());
+ }
},
// keeps the window busy, so it cannot close with the continuation pending
@@ -150,13 +188,117 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
me.down('#back').setDisabled(true);
},
+ unfreeze: function () {
+ let me = this;
+ if (!me.frozenValues) {
+ return;
+ }
+ delete me.frozenValues;
+ me.down('#wizcontent').items.each((tab) => tab.enable());
+ me.down('#back').setDisabled(false);
+ },
+
getValues: function (dirtyOnly) {
let me = this;
return me.frozenValues ? Ext.clone(me.frozenValues) : me.callParent([dirtyOnly]);
},
- // a step calls next() on success and just returns after a failure, so Finish retries from
- // there
+ // Wait without a TaskProgress window, as closing it would drop the continuation. An unreachable
+ // task status is not final: the next submit resumes waiting.
+ waitForTask: function (node, upid, options) {
+ let me = this;
+ let transportFailures = 0;
+ let deadline = Date.now() + 180000;
+ let ended = false;
+ let lastRunning = 0;
+ let unknown =
+ options.texts?.unknown ??
+ Ext.String.format(
+ gettext('The task outcome is unknown. Press {0} to wait for it again.'),
+ Ext.htmlEncode(me.actionText()),
+ );
+ let timer;
+ let fail = function (msg, final) {
+ if (me.destroyed || ended) {
+ return;
+ }
+ ended = true;
+ clearTimeout(timer);
+ me.setBusy(false);
+ options.failure(msg, final);
+ };
+ timer = Ext.defer(
+ () =>
+ fail(
+ lastRunning && Date.now() - lastRunning < 3000
+ ? (options.texts?.running ?? unknown)
+ : unknown,
+ false,
+ ),
+ 180000,
+ );
+ let poll = function () {
+ if (me.destroyed || ended) {
+ return;
+ }
+ if (Date.now() >= deadline) {
+ fail(unknown, false);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${node}/tasks/${encodeURIComponent(upid)}/status`,
+ method: 'GET',
+ timeout: Math.max(1, Math.min(30000, deadline - Date.now())),
+ failure: function (response) {
+ if (me.destroyed || ended) {
+ return;
+ }
+ lastRunning = 0;
+ if (++transportFailures <= 10 && Date.now() < deadline) {
+ Ext.defer(poll, 3000);
+ return;
+ }
+ fail(`${unknown}<br><br>${response.htmlStatus}`, false);
+ },
+ success: function (response) {
+ if (me.destroyed || ended) {
+ return;
+ }
+ transportFailures = 0;
+ let task = response.result.data;
+ if (task?.status === 'running') {
+ lastRunning = Date.now();
+ if (Date.now() >= deadline) {
+ fail(options.texts?.running ?? unknown, false);
+ return;
+ }
+ Ext.defer(poll, 1000);
+ return;
+ }
+ let outcome =
+ task?.status === 'stopped' && task.exitstatus
+ ? Proxmox.Utils.parse_task_status(task.exitstatus)
+ : 'unknown';
+ if (outcome === 'unknown') {
+ fail(unknown, false);
+ } else if (outcome === 'error') {
+ fail(Ext.htmlEncode(task.exitstatus), true);
+ } else {
+ // a task that finished with warnings did its job
+ ended = true;
+ clearTimeout(timer);
+ me.setBusy(false);
+ options.success();
+ }
+ },
+ });
+ };
+ me.setBusy(true, options.msg);
+ poll();
+ },
+
+ // a step calls next() on success and just returns after a failure, so the next submit retries
+ // from there
runSubmitChain: function (steps) {
let me = this;
let run = function (idx) {
@@ -207,6 +349,14 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
});
},
+ showOperationNotice: function (text) {
+ let notice = this.down('#operationNotice');
+ notice.setValue(text ? `<i class="fa fa-exclamation-triangle warning"></i> ${text}` : '');
+ notice.setHidden(!text);
+ this.down('#summaryNotes').setHidden(!!text);
+ this.updateActions();
+ },
+
// errorHtml (safe HTML) is prepended to an error
createStorage: function (params, next, errorHtml) {
let me = this;
@@ -317,6 +467,7 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
for (const note of typeEntry.summaryNotes?.(values, me) || []) {
notes.add({ value: note });
}
+ me.updateActions();
},
submitSimple: function (values) {
@@ -422,6 +573,11 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
},
],
},
+ {
+ xtype: 'displayfield',
+ itemId: 'operationNotice',
+ hidden: true,
+ },
{
xtype: 'container',
itemId: 'summaryNotes',
@@ -437,6 +593,9 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
},
onSubmit: function () {
let wizard = this.up('window');
+ if (!wizard.canSubmit()) {
+ return;
+ }
let values = wizard.getValues();
delete values.delete;
let typeEntry = PVE.storage.wizard.types[wizard.wizardType];
@@ -467,5 +626,11 @@ Ext.define('PVE.storage.wizard.RemoteStorage', {
});
me.callParent();
+ me.query('field').forEach((field) => {
+ field.on('change', () => me.updateActions());
+ field.on('validitychange', () => me.updateActions());
+ });
+ me.down('#wizcontent').on('tabchange', () => me.updateActions());
+ me.down('#wizcontent').on('beforetabchange', () => !me.busy && !me.frozenValues);
},
});
--
2.47.3
^ permalink raw reply related [relevance 4%]
* [PATCH v3 docs 44/76] storage: document the cluster-wide multipath management
2026-11-05 23:30 13% [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup Thomas Lamprecht
@ 2026-11-05 23:31 12% ` Thomas Lamprecht
2026-11-05 23:31 4% ` [PATCH v3 manager 53/76] ui: storage wizard: add Fibre Channel shared LVM setup Thomas Lamprecht
2026-11-13 3:07 9% ` superseded: [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup Thomas Lamprecht
2 siblings, 0 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-05 23:31 UTC (permalink / raw)
To: pve-devel
Document managed multipath setup, health states, and upgrade
requirements so administrators can distinguish incomplete configuration
from unusable paths.
Cover shared LVM setup and recovery in the Remote Storage wizard,
including device checks, unanswered requests, task completion, and
readiness before guest use. Explain safe connection-storage removal,
growing LUNs, and presenting them again without queued I/O blocking
the operation.
Require content none in the iSCSI guidance for LVM, rather than merely
recommending it: initialization is refused while a storage uses the
target for disk images.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
pve-storage-iscsi.adoc | 13 +-
pve-storage-multipath.adoc | 527 +++++++++++++++++++++++++++++++++++++
pvesm.adoc | 13 +-
3 files changed, 545 insertions(+), 8 deletions(-)
create mode 100644 pve-storage-multipath.adoc
diff --git a/pve-storage-iscsi.adoc b/pve-storage-iscsi.adoc
index aea26d2..67055f1 100644
--- a/pve-storage-iscsi.adoc
+++ b/pve-storage-iscsi.adoc
@@ -38,6 +38,13 @@ target::
iSCSI target.
+multipath::
+
+Combine the paths to each LUN of the target into one `dm-multipath` map on every
+node the storage is enabled on, and monitor the maps cluster-wide. A shared LVM
+storage on a target with several portals needs this option. See
+xref:storage_multipath[Multipath].
+
.Configuration Example (`/etc/pve/storage.cfg`)
----
@@ -47,9 +54,9 @@ iscsi: mynas
content none
----
-TIP: If you want to use LVM on top of iSCSI, it make sense to set
-`content none`. That way it is not possible to create VMs using iSCSI
-LUNs directly.
+NOTE: To use LVM on top of iSCSI, set `content none`. When you add an LVM
+storage with a LUN as its base volume, {pve} refuses the operation if any
+configured storage also uses that target for disk images.
File naming conventions
diff --git a/pve-storage-multipath.adoc b/pve-storage-multipath.adoc
new file mode 100644
index 0000000..6f6dc1a
--- /dev/null
+++ b/pve-storage-multipath.adoc
@@ -0,0 +1,527 @@
+[[storage_multipath]]
+Multipath
+---------
+ifdef::wiki[]
+:pve-toplevel:
+:title: Storage: Multipath
+endif::wiki[]
+
+A storage area network (SAN) usually exports each logical unit (LUN) over
+several paths, for example over two iSCSI portals or two Fibre Channel ports.
+Linux sees every path as a separate block device. Device-mapper multipath
+(`dm-multipath`) combines the paths of a LUN into one device, called a
+multipath map, keeps I/O flowing while a path is down, and spreads the load over
+the paths.
+
+{pve} manages `dm-multipath` cluster-wide: it decides which LUNs get a map,
+sets the name and options of each map, and monitors every path on every node. A
+LUN is identified by its World Wide Identifier (WWID), which is the same on
+every node. The configuration is stored in the cluster file system, every node
+generates its local `multipath-tools` configuration from it, and
+*Datacenter -> SAN -> Multipath* shows the health of the maps across the
+cluster.
+
+NOTE: NVMe over Fabrics namespaces use native NVMe multipath in the kernel
+instead of `dm-multipath`. They need no multipath configuration and do not
+appear under *Datacenter -> SAN -> Multipath*. They show up under
+*Node -> SAN*.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+Install `multipath-tools` on every node that accesses the SAN:
+
+----
+# apt install multipath-tools
+----
+
+A node without the package does not take part. *Datacenter -> SAN* shows it as
+*Not installed*, which counts as a problem once a LUN is expected on the node.
+
+Upgrade every node of the cluster before you enable the multipath option of a
+storage. A node with an older version does not know the option and removes it
+from every iSCSI storage the next time it writes the storage configuration,
+even for an unrelated change. The other nodes then stop managing the LUNs of
+those storages. {pve} therefore refuses to enable the option until every
+cluster node has reported multipath support, which a node does while it is
+online. It also refuses while `multipath-tools` is not installed on a node the
+storage is available on, as the volumes of the storage cannot be activated
+there without their maps. Upgrade a node before it joins a cluster that uses the
+option, as the check covers only the nodes that are members when you enable it.
+
+Managing LUNs
+~~~~~~~~~~~~~
+
+{pve} assembles maps only for the LUNs on its allow-list, so unrelated disks,
+the boot disk, and LUNs that other software uses directly stay untouched. A LUN
+gets onto the allow-list in one of two ways, and the *Source* column under
+*Datacenter -> SAN -> Multipath* shows which one applies:
+
+iSCSI storages::
+
+Enable *Multipath* in the edit dialog of the iSCSI storage or in the
+*Remote Storage* wizard, see
+xref:storage_multipath_setup[Setting Up Shared LVM]. Every node the storage is
+enabled on then assembles one map per LUN over the paths through the portals of
+the target. The storage lists its LUNs as multipath maps afterwards, and an LVM
+storage created on top of it uses the map as its base volume, see
+xref:storage_lvm[LVM].
++
+Without the option, {pve} logs in to every portal of the target as well, and
+each LUN shows up once per portal as a separate device. LVM ignores a volume
+group that it finds on several devices, so a shared LVM storage on a target with
+several portals needs the option. The option cannot be disabled while an LVM
+storage uses one of the maps as its base volume.
++
+You do not need to remove and add an existing LVM storage again when you enable
+the option: it can keep its base volume. LVM finds the physical volume by its
+metadata, not by the device name. Keep `multipath_component_detection` enabled
+in the LVM configuration (the default), so that LVM ignores the path devices of
+the LUN and uses the map. Logical volumes that are already active on a single
+path device stay there when you enable the option; before you rely on path
+redundancy, run `lsblk` on each node to see which device they use. Deactivating
+and activating a logical volume again moves it to the map, for example by
+migrating its guest to another node and back.
++
+The same can happen when a node logs in to the target for the first time, for
+example after it joined the cluster, or when the target presents a new LUN: the
+node adds a LUN to its allow-list only after it found it, and until then LVM can
+activate logical volumes with autoactivation enabled on a path device. {pve} 9
+creates new logical volumes for guests with autoactivation disabled. For older
+guest volumes, run
+`/usr/share/pve-manager/migrations/pve-lvm-disable-autoactivation`; for other
+logical volumes, run `lvchange --setautoactivation n <vg>/<lv>`.
++
+If the volume group is not visible yet, for example right after a node booted,
+activating a volume of the LVM storage also activates the base volume and waits
+briefly for the map. For a base volume that is still named by the SCSI
+identifier of the LUN, a timeout only logs a warning and activation continues;
+activation can still fail if the volume group remains unavailable.
+
+Other LUNs::
+
+LUNs attached over Fibre Channel or SAS, and LUNs of an iSCSI target without an
+iSCSI storage, need an explicit entry in the cluster-wide multipath
+configuration, shown as *Explicit entry* in the *Source* column. For Fibre
+Channel, the *Remote Storage* wizard can add the entry together with the volume
+group and the LVM storage, see
+xref:storage_multipath_setup[Setting Up Shared LVM]. To add an entry by hand:
++
+. Under *Node -> SAN*, select the LUN and choose *Enable Multipath*.
+. Review *Nodes*. For a new entry, the dialog preselects this node, the nodes
+ that see the LUN, and the nodes it could not check. Adjust the selection to
+ the nodes that should use the LUN. Optionally set an *Alias*, which becomes
+ the map name on every selected node.
+. Wait for the map to assemble, which takes up to about ten seconds, as every
+ node applies the configuration periodically.
+. Create the volume group on the map with `pvesh create
+ /nodes/<node>/disks/lvm --name <vg> --device
+ /dev/disk/by-id/dm-uuid-mpath-<wwid>` and check its output for errors. Then
+ add the shared LVM storage with
+ `pvesm add lvm <storage> --vgname <vg> --shared 1`.
+
+A map that {pve} does not manage, for example one from a hand-made
+configuration that predates the upgrade, shows up as *Unmanaged* under
+*Node -> SAN*. Select it and choose *Manage* to add it to the cluster-wide
+configuration.
+
+A node keeps a LUN on its allow-list while an explicit entry or an enabled
+storage requires it there. Once neither does, the node removes the LUN from its
+allow-list and `multipathd` releases the map, unless the LUN was added to the
+allow-list outside of {pve}. However, the node keeps the LUN on its allow-list
+while something on the node still uses the map, for example a volume group, a
+file system, or a partition table, as the users would otherwise fall back to a
+single path after the next reboot. The datacenter view and the SAN
+view of the node show such a LUN as *Kept while in use* until the node can
+confirm that the map is unused, including that no data signatures remain. To
+keep the LUN on the allow-list after it is no longer in use, choose *Manage* in
+the SAN view of the node, which adds an explicit entry for it.
+
+{pve} refuses to remove an explicit entry, or to restrict it to fewer nodes,
+while an LVM storage uses the map as its base volume on a node that would then
+drop the LUN from its allow-list. Remove or change that storage first. An LVM
+storage without a base volume, as used for Fibre Channel, is not linked to the
+LUN in the configuration. It is protected only because every node keeps the LUN
+on its allow-list while the volume group is on the map, as described above.
+
+[[storage_multipath_setup]]
+Setting Up Shared LVM
+~~~~~~~~~~~~~~~~~~~~~
+
+The *Remote Storage* wizard under *Datacenter -> Storage -> Add* sets up shared
+LVM storage on a LUN. For iSCSI, it creates the volume group from the node that
+the web interface is connected to. That node must reach the target and be
+included in any node restriction. For Fibre Channel, it uses the selected scan
+node and can enable multipath for the selected LUN, create a volume group or use
+an existing one, and add the LVM storage.
+
+For iSCSI, the wizard first adds or reuses a connection storage: an iSCSI
+storage with `content none` that connects the nodes to the target without
+offering its LUNs as disk images. *Connect and Select LUN* adds the connection
+storage and lists its LUNs. If a connection storage for the target already
+exists, the button is *Select LUN* and lists the LUNs of that storage. Select a
+LUN, then choose *Create Volume Group*. The LVM storage gets the LUN as its
+base volume, so that a node connects to the target before it activates the
+volume group, for example for guests that start at boot. Keep the base volume
+when you add such a storage by hand.
+
+The wizard offers only LUNs that no configured storage uses for data, that are
+neither mounted nor used by another device on the node, and on which the node
+finds no partitions, file system, LVM, or other signature. The node checks the
+device and its users again right before it creates the volume group. If no
+configured storage uses a device for data and nothing on the node uses it,
+`root@pam` can wipe it for reuse: in the wizard after selecting *Allow wiping
+LUNs with data*, or under *Node -> SAN*.
+
+Before you put guests on a new shared storage, check under
+*Datacenter -> SAN -> Multipath* that every node of the storage sees the LUN
+with all its paths.
+
+If a step fails after the wizard has created something, you can no longer
+change the settings in the wizard. *Retry Setup* runs the remaining steps again.
+If creating the LVM storage on iSCSI fails, retries use the same LUN and do not
+return to device selection, as the attempt may have written to it. If the wizard
+could not confirm that it created a storage, *Check and Retry* checks whether
+the storage exists with the expected settings and creates it only if it is
+missing. Closing the wizard does not remove the storages it already created.
+
+If the wizard cannot tell whether a wipe finished, it blocks the device until
+the outcome is known. *Check Task Status* waits for the same wipe task again; it
+does not start another wipe. If the wizard does not know the task ID, check the
+*Task History* of the node before you choose *Dismiss* or use the device.
+
+If the node does not answer while the Fibre Channel wizard creates the volume
+group, the wizard stops, as the task may still be running. Check the
+*Task History* of the node to see whether the task created the volume group.
+Once the task has finished, run the wizard again. If the volume group exists,
+the wizard offers it; select it to complete the setup.
+
+NOTE: When you use the API, a returned task ID only means that the node
+accepted the task, not that the task succeeded. Wait for the task to finish and
+check its exit status before you use the device. `pvesh` runs the task in the
+foreground; check its output for errors.
+
+Health
+~~~~~~
+
+*Datacenter -> SAN* shows one row per node with the state of its multipath
+service, the number of its managed LUNs in each state, and its iSCSI initiator
+name, which the targets of its iSCSI storages have to allow. A node that has not
+reported shows *No report*. A missing `multipath-tools` package or a stopped
+`multipathd` counts as a problem only on a node that should see a LUN.
+
+*Datacenter -> SAN -> Multipath* lists every managed LUN with its state on each
+node:
+
+*Optimal*:: Every path is active and no expected path is missing.
+*Degraded*:: Some paths are down, or fewer paths are present than the storage
+configuration expects.
+*Failed*:: No active path remains.
+*Missing*:: The node should see the LUN but has not assembled its map.
+*Unknown*:: The node has no current report. The view also shows why: the node
+is offline, its report is stale, `multipath-tools` is not installed,
+`multipathd` is not running or did not answer, or the node has too many LUNs to
+list them. A node that runs an older version, or has not reported since its
+cluster file system started, has no report at all.
+
+If the status updates of a node stall, for example while a status query waits
+for I/O to a LUN that lost every path, the view keeps a *Degraded*, *Missing*,
+or *Failed* state from the last report of the node, but shows *Unknown* instead
+of *Optimal*, as that report may be long outdated.
+
+A LUN of an iSCSI storage that no node finds on the target anymore, and that no
+node has a map of, shows *Not currently observed* instead of *Missing*. This
+usually means that the LUN was unmapped on the storage system, on purpose or by
+mistake, so check which one it was. The storage keeps the LUN on the allow-list,
+see xref:storage_multipath_remove[Removing a LUN]. A LUN stays *Missing* if it
+has an explicit entry or an LVM storage uses it. It also stays *Missing* while
+one of its nodes cannot tell whether the LUN is gone: the node runs an older
+version, could not apply the configuration, has no current report or stalled
+status updates, has not completed login and the initial LUN scan on every
+portal of the target, or cannot identify every LUN of the target.
+
+The *Cluster Health* of a LUN is the worst state among the nodes that should see
+it. Nodes without a current report do not count, so *Optimal* means that every
+node with a current report is fine, not that every node has reported. While the
+state on one of these nodes is unknown, the view shows *Optimal (incomplete)*. A
+node that should see the LUN but cannot manage multipath, because
+`multipath-tools` is not installed or `multipathd` is not running or does not
+answer, makes the LUN *Degraded*. An explicit entry without a node restriction
+expects the LUN on every node of the cluster.
+
+Nodes report the state of their LUNs through the cluster file system, which
+limits the size of a report. A node with more than about 200 LUNs reports only
+the number of its LUNs in each state, and the datacenter view refers to the SAN
+view of that node for details.
+
+For an iSCSI storage, {pve} knows how many paths a LUN should have: one per
+portal of the target. If several storages provide the same LUN, the LUN is
+expected on the nodes of all of them, with the highest path count among them.
+For Fibre Channel, {pve} only knows the paths that are currently present. If the
+transport has already removed a failed path, the map shows as *Optimal* with
+fewer paths, so compare the path count with what the SAN should provide.
+
+A node learns the portals of an iSCSI target when it first logs in to it. A
+portal that is added to the target later is neither used nor expected until the
+node discovers the target again. To start using a new portal, run the discovery
+on every node, against any portal of the target:
+
+----
+# iscsiadm --mode discovery --type sendtargets --portal <portal>
+----
+
+The next activation of the storage then also logs in to the new portal.
+
+Above the list, *Datacenter -> SAN -> Multipath* shows the nodes that could not
+apply the configuration, so a node that drifts from the configured state does
+not go unnoticed. It also shows nodes that cannot identify some LUNs of their
+iSCSI storages, because the identifiers of their paths are not available or
+could not be verified, for example while `multipathd` starts. Such a LUN is left
+out until the node can identify it.
+
+*Node -> SAN* lists each LUN of the node with its users and the state of its
+paths, and shows the problems of the node above the list. There, `root@pam` can
+also wipe a LUN that no configured storage uses for data, for example before
+reusing it. The wipe dialog first asks the other nodes what uses the LUN and
+refuses while one of them reports a user. *Node -> SAN -> iSCSI* shows the iSCSI
+targets and sessions of the node and its initiator name.
+
+Permissions
+~~~~~~~~~~~
+
+The multipath views and changes need these privileges:
+
+* Viewing the multipath status: `Sys.Audit` on `/` or `Datastore.Allocate` on
+ `/storage`.
+* Viewing the SAN views of a node: `Sys.Audit` on `/nodes/<node>` or
+ `Datastore.Allocate` on `/storage`.
+* Changing the cluster-wide multipath configuration through the API:
+ `Sys.Modify` on `/`.
+* Using *Enable Multipath*, *Manage*, or *Edit* in the multipath views:
+ `Sys.Modify` and `Sys.Audit` on `/`. The editors read the configuration before
+ changing it.
+* Changing the multipath option of a storage: `Datastore.Allocate` on
+ `/storage`.
+
+[[storage_multipath_grow]]
+Growing a LUN
+~~~~~~~~~~~~~
+
+{pve} lets a map grow with its LUN once every path of the map reports the new
+size, see `auto-resize` under xref:storage_multipath_config[Configuration]. To
+grow a LUN that carries a shared LVM volume group:
+
+. Grow the LUN on the storage system. Never shrink a LUN that is in use.
+. Make every path on every node report the new size. For iSCSI, {pve} rescans
+ the sessions of an active storage about every ten seconds, so this happens on
+ its own; a path of a session that is down follows once the session recovers.
+ For Fibre Channel, rescan each path on every node with
+ `echo 1 > /sys/block/<path>/device/rescan`, where `<path>` is a path device
+ of the map, such as `sdc`. NVMe over Fabrics targets notify the hosts
+ themselves.
+. Check the size of the map on every node, under *Node -> SAN* or with
+ `multipath -ll <wwid>`. If the map of a node did not follow, run
+ `multipathd resize map <wwid>` on that node.
+. Only then, on one node, grow the physical volume with
+ `pvresize /dev/disk/by-id/dm-uuid-mpath-<wwid>`. A node whose map is still
+ smaller cannot activate logical volumes in the added space.
+
+[[storage_multipath_remove]]
+Removing a LUN
+~~~~~~~~~~~~~~
+
+The device profiles of many storage systems make `dm-multipath` queue I/O while
+a map has no path, some of them without a time limit, so that a controller
+failover causes no I/O errors. If such a LUN is unmapped on the storage system,
+every process that reads its map blocks until a path returns or the retries run
+out. This includes LVM commands, which scan every device. The map cannot be
+removed while processes wait for it. The LVM status commands share a 15-second
+time limit. If they fail or time out, {pve} shows the affected LVM storages as
+not active on that node. The rest of the status update can take longer. Guests,
+backups, and other LVM commands can still hang. Therefore, turn off queueing
+before you unmap a LUN:
+
+. Stop the guests that use volumes on the LUN or move their disks to another
+ storage, and remove the LVM storage. Removing the storage entry does not stop
+ its users and keeps the volume group with its data.
+. Deactivate the volume group on every node with `vgchange -an <vg>`. Do not
+ remove the volume group or the physical volume unless you want to destroy the
+ data; removing them is not part of this procedure.
+. Make the map fail I/O instead of queueing it. If the LUN has an explicit
+ entry, note its `no-path-retry` setting and set it to `fail`, for example with
+ `pvesh set /cluster/multipath/wwid/<wwid> --no-path-retry fail`. Otherwise,
+ create a temporary entry for the nodes that see the LUN:
++
+----
+# pvesh create /cluster/multipath/wwid --wwid <wwid> --nodes <nodes> \
+ --no-path-retry fail
+----
+
+. On every node that sees the LUN, check in the output of `multipath -ll <wwid>`
+ that the `features` of the map no longer list `queue_if_no_path`. If a node is
+ offline, wait until it is back and check it as well before you continue.
+. On every node, note the path devices of the map that `multipath -ll <wwid>`
+ lists, and for each of them the identifier in `/sys/block/<path>/device/wwid`.
+ Then unmap the LUN on the storage system.
+. On every node:
+.. Remove the map with `multipath -f <wwid>`. If the map is still in use, do not
+ force the removal: find out what uses it, and retry after you have deleted
+ the path devices.
+.. For each noted path device, check that `/sys/block/<path>/device/wwid` still
+ shows the noted identifier, then delete the device with
+ `echo 1 > /sys/block/<path>/device/delete`. Skip a path device that is gone.
+ If one shows another identifier, stop: its name now belongs to another LUN.
+.. Check that `dmsetup ls` no longer lists the map.
+. Remove the temporary entry with `pvesh delete /cluster/multipath/wwid/<wwid>`,
+ or set `no-path-retry` of the explicit entry back to its previous value. If it
+ was not set before, unset it with
+ `pvesh set /cluster/multipath/wwid/<wwid> --delete no-path-retry`.
+
+If the LUN was already unmapped while its map queued I/O, processes that read
+the map hang, and changing the entry does not stop the queueing while they hold
+the map open. Run `multipathd disablequeueing map <wwid>` on every node that has
+the map to fail the queued I/O, then continue with noting the path devices and
+removing the map.
+
+An iSCSI storage keeps every LUN it has found on the allow-list for as long as
+the storage exists, as it cannot tell a LUN that was withdrawn on purpose from
+one that is only temporarily not visible. The datacenter view therefore keeps
+showing an unmapped LUN as *Not currently observed*. The allow-list entry is
+harmless, and if the LUN is presented again, it is managed again right away.
+Once you remove the storage or disable its multipath option, each node removes
+the allow-list entries that {pve} added, as soon as no other storage or
+explicit entry needs them and the map is unused. Allow-list entries that {pve}
+did not add stay in place.
+
+If the nodes lost a LUN, for example because it was unmapped by mistake, its
+paths report a size of zero after it is presented again, until they are
+rescanned. For iSCSI, the periodic session rescan of {pve} repairs the paths
+that still exist, and `iscsiadm --mode session --rescan` finds the LUNs whose
+paths were deleted. For Fibre Channel, rescan the remaining paths as described
+in xref:storage_multipath_grow[Growing a LUN], and rescan the host adapters to
+find the deleted paths, for example with `rescan-scsi-bus.sh` from the
+`sg3-utils` package.
+
+[[storage_multipath_disconnect]]
+Removing a Connection Storage
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Removing an iSCSI storage leaves its sessions connected and does not erase any
+data. To remove such a connection storage and disconnect the nodes safely:
+
+. Find out what uses each LUN of the target, not only the one that an LVM
+ storage uses. Stop these users or move their data to another storage.
+. Remove the LVM storages on the connection storage, and deactivate their
+ volume groups on every node with `vgchange -an <vg>`. Removing a storage does
+ not deactivate its volumes or remove its data.
+. Remove the connection storage. Make sure that no other enabled storage uses
+ the same target, as it would connect again.
+. On every node, choose *Logout* for the sessions under *Node -> SAN -> iSCSI*.
+ Once the iSCSI sessions are gone, *Remove* deletes the saved target records.
+ A logout is refused if it would take away the last usable path of a LUN that
+ is in use; stop what uses it instead of forcing the removal.
+
+Snapshot Clones
+~~~~~~~~~~~~~~~
+
+Do not present a snapshot clone of a LUN that carries an LVM physical volume to
+the nodes that use the original LUN. LVM then sees the same physical volume
+twice and refuses to activate logical volumes of the volume group or to change
+it, so guests on that storage cannot start or migrate. The SAN view of a node
+flags such LUNs as *duplicate PV*, but that check relies on the information udev
+recorded and can miss a duplicate. To access the data of a clone, present it to
+another host, or give it a new identity with `vgimportclone` on a host that
+sees only the clone before presenting it to the nodes.
+
+[[storage_multipath_config]]
+Configuration
+~~~~~~~~~~~~~
+
+The cluster-wide configuration is stored in `/etc/pve/multipath.cfg`. It has an
+optional `defaults` section for global `multipathd` settings and one `wwid`
+section for each explicit entry. From it, every node generates drop-in files
+with the prefix `pve-` under `/etc/multipath/conf.d/`, and maintains its
+allow-list in `/etc/multipath/wwids` with the LUNs of its multipath-enabled
+storages and the explicit entries that apply to the node. A hand-made
+`/etc/multipath.conf` and allow-list entries that {pve} did not add stay in
+place.
+
+.Example (`/etc/pve/multipath.cfg`)
+----
+defaults: defaults
+ no-path-retry queue
+
+wwid: 3600140558631413f06d4840826b34782
+ alias san1-lun0
+ nodes pve1,pve2
+ path-selector service-time 0
+----
+
+The `defaults` section takes `find-multipaths`, `user-friendly-names`,
+`polling-interval`, `auto-resize`, `no-path-retry`, `path-grouping-policy`,
+`failback`, and `path-selector`. Keep `find-multipaths` at `strict`, so that
+`multipathd` assembles maps only for LUNs on the allow-list, and
+`user-friendly-names` at `no`, so that maps without an explicit alias use their
+WWIDs as names, consistently across nodes and without a node-local bindings
+file. `auto-resize` defaults to `grow_only`, so a map grows with its LUN, see
+xref:storage_multipath_grow[Growing a LUN]; `grow_shrink` also shrinks it, and
+`never` leaves resizing to you.
+
+The built-in device profiles of `multipath-tools` set `no-path-retry` and the
+path settings for many storage systems, and these profiles take precedence over
+a `defaults` section. {pve} therefore writes `no-path-retry`,
+`path-grouping-policy`, `failback`, and `path-selector` from its `defaults`
+section into an `overrides` section, which takes precedence over the device
+profiles. Leave these settings unset to keep the values from the profile of your
+storage system.
+
+A `wwid` section takes `alias`, `nodes`, and the per-LUN settings
+`no-path-retry`, `path-grouping-policy`, `failback`, `path-selector`,
+`rr-min-io-rq`, and `rr-weight`, which take precedence over the defaults and
+the device profiles. See the `multipath.conf` manual page for the meaning of
+each setting.
+
+NOTE: For storage systems with Asymmetric Logical Unit Access (ALUA), whose
+paths all use the `alua` or `sysfs` prioritizer, `multipathd` detects the path
+grouping policy by itself and ignores a configured `path-grouping-policy`, even
+that of a `wwid` section. Setting `path-grouping-policy` in the `defaults`
+section turns this detection off. For a policy that only a `wwid` section sets,
+turn the detection off with `detect_pgpolicy no` in an `overrides` section of
+`/etc/pve/multipath-overrides.conf`.
+
+NOTE: A LUN is identified by the WWID that `multipathd` computes for its paths.
+If you change how `multipathd` computes it, for example with `uid_attrs`, the
+WWIDs of the affected LUNs can change once `multipathd` restarts. The entries of
+their old WWIDs then stay on the allow-list until their storage is removed or
+its multipath option is disabled, see
+xref:storage_multipath_remove[Removing a LUN].
+
+Hardware-specific settings, that is, the `devices`, `overrides`, and
+`blacklist` sections of `multipath.conf`, belong in
+`/etc/pve/multipath-overrides.conf`, written as in `multipath.conf`. Edit them
+with *Edit Overrides* under *Datacenter -> SAN -> Multipath*; every node applies
+them like the rest of the configuration. An `overrides` section in this file
+takes precedence over the managed defaults, but a `devices` section does not
+take precedence over the settings that {pve} writes as overrides.
+
+The API under `/cluster/multipath` manages the configuration and reports the
+health, for example:
+
+----
+# pvesh create /cluster/multipath/wwid --nodes pve1,pve2 \
+ --wwid 3600140558631413f06d4840826b34782
+# pvesh get /cluster/multipath/status
+----
+
+ifdef::wiki[]
+
+See Also
+~~~~~~~~
+
+* link:/wiki/Storage[Storage]
+
+* link:/wiki/Storage:_iSCSI[Storage: iSCSI]
+
+* link:/wiki/Storage:_LVM[Storage: LVM]
+
+endif::wiki[]
diff --git a/pvesm.adoc b/pvesm.adoc
index 5bd24b2..6f4e776 100644
--- a/pvesm.adoc
+++ b/pvesm.adoc
@@ -96,11 +96,10 @@ TiB sized), these operations may take several minutes, or in extreme cases, even
hours. If your setup is affected, create and remove snapshots while the VM is
shut down, expecting a long task duration.
-^3^: With iSCSI, FibreChannel (FC), or SAS block storage as shared storage in a
-cluster, LVM is used to split the LUN into virtual disks. The
-https://pve.proxmox.com/wiki/Multipath[Multipath Guide] explains how to
-configure it in a cluster, including multipathing which is usually a
-requirement in these scenarios.
+^3^: With iSCSI, Fibre Channel (FC), or SAS block storage as shared storage in
+a cluster, LVM is used to split the LUN into virtual disks. A LUN is usually
+reachable over several paths; xref:storage_multipath[Multipath] describes how
+{pve} manages them in a cluster.
^4^: Since {pve} 9, snapshots as a volume chain have been available for VMs.
These snapshots use separate volumes for the snapshot data and layer them. For
@@ -421,6 +420,8 @@ See Also
* link:/wiki/Storage:_iSCSI[Storage: iSCSI]
+* link:/wiki/Storage:_Multipath[Storage: Multipath]
+
* link:/wiki/Storage:_LVM[Storage: LVM]
* link:/wiki/Storage:_LVM_Thin[Storage: LVM Thin]
@@ -463,6 +464,8 @@ include::pve-storage-iscsi.adoc[]
include::pve-storage-iscsidirect.adoc[]
+include::pve-storage-multipath.adoc[]
+
include::pve-storage-rbd.adoc[]
include::pve-storage-cephfs.adoc[]
--
2.47.3
^ permalink raw reply related [relevance 12%]
* [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup
@ 2026-11-05 23:30 13% Thomas Lamprecht
2026-11-05 23:31 12% ` [PATCH v3 docs 44/76] storage: document the cluster-wide multipath management Thomas Lamprecht
` (2 more replies)
0 siblings, 3 replies; 37+ results
From: Thomas Lamprecht @ 2026-11-05 23:30 UTC (permalink / raw)
To: pve-devel
This v3 combines the cluster-wide multipath series [0][1] with
Dietmar's RFC for guided remote storage setup and SAN visibility [2].
What it adds:
- cluster-wide dm-multipath management through /etc/pve/multipath.cfg:
iSCSI storages with the new 'multipath' option supply their LUNs;
explicit entries cover individual LUNs, for example Fibre Channel.
pvestatd applies the configuration on each node without removing
allow-list entries added by hand or for boot from SAN. Array-specific
settings go in /etc/pve/multipath-overrides.conf.
- SAN views: Datacenter > SAN shows node status and initiator names
for target access rules. Its Multipath view groups path health per
LUN, including expected paths, report age, and unresolved identities.
Node > SAN lists LUNs, paths, usage, and iSCSI targets and sessions,
with actions to enable multipath or wipe a LUN as root@pam.
- guided setup for NFS, SMB/CIFS, iSCSI, Fibre Channel, and ZFS over
iSCSI. For shared LVM over iSCSI, it creates or reuses the connection
storage, waits for LUN discovery, and creates a volume group on the
selected LUN, using its map when multipath is enabled. Partial setups
retain their settings and retry only missing steps; unanswered
requests are checked before retrying.
- guards for destructive actions: SAN wipes and volume-group creation
check cluster storage references, local users, and device identities.
Before a wipe, the web UI also asks the other nodes for users of the
LUN. Wipes keep the checked device references and recheck identities
between writes. Inconclusive checks refuse the operation. Session
logout is refused if it would remove the last usable path of a LUN in
use. Cluster locks do not cover hosts outside the cluster.
Patches 04-11 are independent fixes and could go in first, with their
documentation and pvestatd parts in patches 43 and 46: status-only
activation and bounded LVM queries, shared VGs missed by LVM hints,
per-target rescans, LUNs listed per iSCSI session, validation before
volume-group creation, and a target check that refuses composite
devices. The smaller fixes for SCSI padding, iSCSI discovery errors,
iSER and offload sessions, LVM base volumes and the iSCSI edit dialog
are already applied.
Changes since v2:
- combined with Dietmar's RFC; multipath is an iSCSI storage option
rather than a separate per-LUN storage type
- Node > SAN offers Enable Multipath; the datacenter view uses one
row per LUN with expandable node details, not a column per node
(Dominik)
- addressed Dominik's API and code remarks: add_wwid accepts alias and
settings, alias changes use the update endpoint, config helpers are
renamed, group_by_tpg is available, and the overrides example is
fixed
- preserved existing allow-list entries, addressing Maximiliano's
migration concern without a warning on first use
- added expected path counts, stalled-node detection, withdrawn LUN
status, unresolved identities, and duplicate-PV hints for clones
- added LVM and wipe guards, bounded status commands, the node iSCSI
API, and pvenode commands
- added an admin guide chapter, including removal, growth, and clone
procedures tested on real hardware
- moved the parsing of multipathd map status and the health derivation
to a new proxmox-multipath crate, used through pve-rs bindings
Testing used a five-node nested cluster attached to a NetApp AFF A20
through two independent paths over iSCSI and NVMe/TCP, plus host-side
Linux LIO and nvmet targets. Scenarios covered path, LIF, and
whole-array outages with guests running; LUN unmapping with queued I/O;
revoked node access; online growth; snapshot clones; reboot; and adding
30 LUNs at once. Wizard and wipe tests covered lost responses, stuck
tasks, denied logins, and LVM metadata written by other nodes. The
screens were also reviewed from four user perspectives. The bounded
status commands and the wizard's LUN identity check also have focused
regression tests. Fibre Channel and offload iSCSI initiators, which can
run several sessions on one SCSI host, were not tested on hardware.
Open points:
- path-redundancy loss is visible in the web UI and API but sends no
notification (can be more easily done once Lukas' notification
matcher rework has landed)
- an optimal LUN is marked incomplete while its state on an expected
node is unknown, but there is no count of the current reports per LUN
- LUN removal is documented, not guided - can be added later.
- if thin_check takes longer than the shared status-command budget,
that status pass reports no LVM or LVM-thin status. Later passes
retry the activation; starting a guest activates the pool without
this budget
- pvcreate and vgcreate receive a checked, identity-bearing by-id name,
but resolve it themselves, leaving a short race after the final check
- integration with the per-node target and portal mapping work [3][4]
Apply in patch order. The pve-rs bindings need the proxmox-multipath
crate packaged first. pve-storage needs pve-cluster with the multipath
configuration files registered and libpve-rs-perl with the bindings.
pve-manager needs the matching pve-storage APIs and status-command
helper, plus the pve-docs and pve-doc-generator changes.
Feature-specific dependency bumps are deferred until the providing
package versions are known and must be added before shipping. This
includes a Breaks of libpve-storage-perl on older pve-manager, whose
Ceph OSD creation would accept the iSCSI LUNs that the disk list now
includes (patch 45).
[0]: https://lore.proxmox.com/pve-devel/20260626121000.2095591-1-t.lamprecht@proxmox.com/
[1]: https://lore.proxmox.com/pve-devel/20260703124707.1172980-2-t.lamprecht@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/20260731102156.3947857-1-dietmar@proxmox.com/
[3]: https://lore.proxmox.com/pve-devel/20260430173220.441001-1-m.limbeck@proxmox.com/
[4]: https://lore.proxmox.com/pve-devel/20260804090819.2136483-1-dietmar@proxmox.com/
proxmox:
Thomas Lamprecht (1):
add proxmox-multipath crate
Cargo.toml | 2 +
proxmox-multipath/Cargo.toml | 17 ++
proxmox-multipath/debian/changelog | 7 +
proxmox-multipath/debian/control | 38 +++
proxmox-multipath/debian/copyright | 18 ++
proxmox-multipath/debian/debcargo.toml | 7 +
proxmox-multipath/src/lib.rs | 531 +++++++++++++++++++++++++++++++++
7 files changed, 620 insertions(+)
proxmox-perl-rs:
Thomas Lamprecht (1):
pve-rs: add PVE::RS::Multipath bindings for multipathd status parsing
pve-rs/Cargo.toml | 1 +
pve-rs/Makefile | 2 ++
pve-rs/debian/control | 1 +
pve-rs/src/bindings/mod.rs | 3 ++
pve-rs/src/bindings/multipath.rs | 40 ++++++++++++++++++++++
pve-rs/test/Makefile | 1 +
pve-rs/test/multipath.pl | 74 ++++++++++++++++++++++++++++++++++++++++
7 files changed, 122 insertions(+)
pve-cluster:
Thomas Lamprecht (1):
cfs: observe the multipath configuration files
src/PVE/Cluster.pm | 2 ++
src/pmxcfs/status.c | 2 ++
2 files changed, 4 insertions(+)
pve-storage:
Dietmar Maurer (12):
diskmanage: collect disk transport type from lsblk
diskmanage: add helper to list multipath devices
diskmanage: qualify NVMe over fabrics transport
disks: list: add include-remote parameter
diskmanage: include iSCSI session devices in disk enumeration
diskmanage: link multipath member disks to their map device
iscsi: factor out session device map from device list
api: scan: add a SAN LUN inventory
pvesm: expose the SAN LUN inventory
diskmanage: collect native NVMe multipath path state
api: scan: san-luns: report path state
api: add node-level iSCSI status and maintenance
Thomas Lamprecht (27):
storage: distinguish status-only activation in plugins
lvm: find a shared volume group created by another node
storage: bound LVM status commands
iscsi: rate-limit session rescans per target
iscsi: list the LUNs of each session, not of its SCSI host
lvm: refuse to create a volume group on a device that holds data
lvm: refuse a base volume of a target that serves disk images
iscsi: refuse virtual devices other than multipath maps as volumes
disks: lvm: allow volume groups on SAN LUNs and multipath maps
multipath: add a library around multipathd
diskmanage: collect local block device users
api: iscsi: add session logout with last-path protection
multipath: add a cluster-wide configuration
iscsi: add an option to manage storage LUNs with multipath
lvm: activate a missing base volume before using the volume group
multipath: apply the configuration on every node
iscsi: share the initiator identity reader
multipath: publish per-node status
api: add endpoints for the cluster-wide multipath configuration
api: multipath: add the cluster-wide health status
multipath: collect identities of non-iSCSI SCSI paths
api: scan: san-luns: report the multipath state of each LUN
api: scan: flag duplicate physical volumes on distinct LUNs
api: disks: recheck local users and retain wipe device references
iscsi: name plain LUNs after their identity link
api: disks: guard SAN wipes with stable identities and storage checks
api: scan: refresh SAN usage with bounded probes
ApiChangeLog | 24 +
debian/control | 2 +
src/PVE/API2/Disks.pm | 76 +-
src/PVE/API2/Disks/LVM.pm | 74 +-
src/PVE/API2/ISCSI.pm | 423 +++++++
src/PVE/API2/Makefile | 2 +
src/PVE/API2/Multipath.pm | 689 +++++++++++
src/PVE/API2/Storage/Scan.pm | 247 ++++
src/PVE/CLI/pvesm.pm | 13 +
src/PVE/Diskmanage.pm | 1007 +++++++++++++++-
src/PVE/Makefile | 6 +
src/PVE/Multipath.pm | 375 ++++++
src/PVE/Multipath/ClusterConfig.pm | 64 +
src/PVE/Multipath/Config.pm | 451 +++++++
src/PVE/Multipath/Generator.pm | 314 +++++
src/PVE/Multipath/Identity.pm | 402 +++++++
src/PVE/Multipath/Status.pm | 486 ++++++++
src/PVE/Storage.pm | 272 ++++-
src/PVE/Storage/ISCSIPlugin.pm | 695 +++++++++--
src/PVE/Storage/LVMPlugin.pm | 323 ++++-
src/PVE/Storage/LvmThinPlugin.pm | 39 +-
src/PVE/Storage/Makefile | 4 +-
src/PVE/Storage/Plugin.pm | 2 +-
src/PVE/Storage/SANScan.pm | 429 +++++++
src/PVE/Storage/StatusCommand.pm | 241 ++++
src/test/Makefile | 61 +-
src/test/disk_api_test.pm | 194 +++
src/test/disk_tests/iscsi/disklist | 1 +
src/test/disk_tests/iscsi/disklist_expected.json | 19 +
src/test/disk_tests/iscsi/lsblk | 5 +
src/test/disk_tests/iscsi/sda/device/model | 1 +
src/test/disk_tests/iscsi/sda/device/vendor | 1 +
src/test/disk_tests/iscsi/sda/queue/rotational | 1 +
src/test/disk_tests/iscsi/sda/size | 1 +
src/test/disk_tests/iscsi/sda_udevadm | 21 +
src/test/disk_tests/multipath/disklist | 11 +
.../disk_tests/multipath/disklist_expected.json | 111 ++
src/test/disk_tests/multipath/dm-0/dm/name | 1 +
src/test/disk_tests/multipath/dm-0/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-0/size | 1 +
src/test/disk_tests/multipath/dm-0_slaves | 4 +
src/test/disk_tests/multipath/dm-1/dm/name | 1 +
src/test/disk_tests/multipath/dm-1/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-1/size | 1 +
src/test/disk_tests/multipath/dm-1_slaves | 4 +
src/test/disk_tests/multipath/dm-2/dm/name | 1 +
src/test/disk_tests/multipath/dm-2/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-2/size | 1 +
src/test/disk_tests/multipath/dm-2_slaves | 1 +
src/test/disk_tests/multipath/dm-3/dm/name | 1 +
src/test/disk_tests/multipath/dm-3/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-3/size | 1 +
src/test/disk_tests/multipath/dm-3_slaves | 1 +
src/test/disk_tests/multipath/dm-4/dm/name | 1 +
src/test/disk_tests/multipath/dm-4/dm/uuid | 1 +
src/test/disk_tests/multipath/dm-4/size | 1 +
src/test/disk_tests/multipath/dm-4_slaves | 1 +
src/test/disk_tests/multipath/lsblk | 77 ++
src/test/disk_tests/multipath/lvs | 0
src/test/disk_tests/multipath/mounts | 1 +
.../disk_tests/multipath/multipath_expected.json | 59 +
src/test/disk_tests/multipath/multipathd | 124 ++
.../multipath/multipathd_status_expected.json | 42 +
.../nvme-subsystem/nvme-subsys0/nvme3/address | 1 +
.../nvme-subsys0/nvme3/nvme2c3n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme3/state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/address | 1 +
.../nvme-subsys0/nvme4/nvme2c4n1/ana_state | 1 +
.../nvme-subsystem/nvme-subsys0/nvme4/state | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/address | 1 +
.../nvme-subsystem/nvme-subsys1/nvme0/state | 1 +
src/test/disk_tests/multipath/nvme8n1/device/model | 1 +
.../disk_tests/multipath/nvme8n1/device/transport | 1 +
.../disk_tests/multipath/nvme8n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme8n1/size | 1 +
src/test/disk_tests/multipath/nvme8n1_udevadm | 14 +
src/test/disk_tests/multipath/nvme9n1/device/model | 1 +
.../disk_tests/multipath/nvme9n1/device/transport | 1 +
.../disk_tests/multipath/nvme9n1/device/vendor | 1 +
.../disk_tests/multipath/nvme9n1/queue/rotational | 1 +
src/test/disk_tests/multipath/nvme9n1/size | 1 +
src/test/disk_tests/multipath/nvme9n1_udevadm | 12 +
.../multipath/nvme_path_status_expected.json | 19 +
src/test/disk_tests/multipath/partlist | 0
src/test/disk_tests/multipath/pvs | 1 +
src/test/disk_tests/multipath/sda/device/model | 1 +
src/test/disk_tests/multipath/sda/device/vendor | 1 +
src/test/disk_tests/multipath/sda/holders/holder | 1 +
src/test/disk_tests/multipath/sda/queue/rotational | 1 +
src/test/disk_tests/multipath/sda/size | 1 +
src/test/disk_tests/multipath/sda_udevadm | 18 +
src/test/disk_tests/multipath/sdb/device/model | 1 +
src/test/disk_tests/multipath/sdb/device/vendor | 1 +
src/test/disk_tests/multipath/sdb/holders/holder | 1 +
src/test/disk_tests/multipath/sdb/queue/rotational | 1 +
src/test/disk_tests/multipath/sdb/size | 1 +
src/test/disk_tests/multipath/sdb_udevadm | 18 +
src/test/disk_tests/multipath/sdc/device/model | 1 +
src/test/disk_tests/multipath/sdc/device/vendor | 1 +
src/test/disk_tests/multipath/sdc/holders/holder | 1 +
src/test/disk_tests/multipath/sdc/queue/rotational | 1 +
src/test/disk_tests/multipath/sdc/size | 1 +
src/test/disk_tests/multipath/sdc_udevadm | 18 +
src/test/disk_tests/multipath/sdd/device/model | 1 +
src/test/disk_tests/multipath/sdd/device/vendor | 1 +
src/test/disk_tests/multipath/sdd/holders/holder | 1 +
src/test/disk_tests/multipath/sdd/queue/rotational | 1 +
src/test/disk_tests/multipath/sdd/size | 1 +
src/test/disk_tests/multipath/sdd_udevadm | 18 +
src/test/disk_tests/multipath/zpool | 1 +
src/test/disk_tests/sas/disklist_expected.json | 1 +
src/test/disk_tests/sas/lsblk | 5 +
src/test/disklist_test.pm | 117 +-
src/test/lvm-fixtures/README.md | 20 +
.../lvm-fixtures/lab1-nomda-orphan-derived.colon | 2 +
src/test/lvm-fixtures/lab1-nomda-orphan.txt | 23 +
src/test/run_block_device_users_tests.pl | 172 +++
src/test/run_disk_api_tests.pl | 11 +
src/test/run_iscsi_activation_tests.pl | 171 +++
src/test/run_iscsi_device_list_tests.pl | 78 ++
src/test/run_iscsi_logout_tests.pl | 271 +++++
src/test/run_iscsi_rescan_tests.pl | 109 ++
src/test/run_iscsi_session_tests.pl | 15 +-
src/test/run_iscsi_volume_tests.pl | 81 +-
src/test/run_lun_identity_tests.pl | 1262 ++++++++++++++++++++
src/test/run_multipath_api_tests.pl | 693 +++++++++++
src/test/run_multipath_tests.pl | 1240 +++++++++++++++++++
src/test/run_san_api_tests.pl | 180 +++
src/test/run_san_library_tests.pl | 77 ++
src/test/run_san_lun_scan_tests.pl | 945 +++++++++++++++
src/test/run_san_lvm_create_tests.pl | 611 ++++++++++
src/test/run_san_taint_tests.pl | 80 ++
src/test/run_san_wipe_tests.pl | 673 +++++++++++
src/test/run_status_command_contention_tests.pl | 520 ++++++++
src/test/run_status_command_tests.pl | 189 +++
src/test/run_test_lvm_base_activation.pl | 130 ++
src/test/run_test_lvm_base_conflicts.pl | 62 +
src/test/run_test_lvm_base_volume.pl | 8 +-
src/test/run_test_lvm_create.pl | 243 ++++
src/test/run_test_lvm_hints.pl | 110 ++
src/test/run_test_lvm_status.pl | 220 ++++
src/test/run_wipe_partition_tests.pl | 387 ++++++
src/test/run_wipe_readiness_tests.pl | 138 +++
src/test/run_wipe_reference_tests.pl | 243 ++++
src/test/run_wipedisk_tests.pl | 110 ++
145 files changed, 16554 insertions(+), 215 deletions(-)
pve-docs:
Thomas Lamprecht (2):
storage: lvm: note the rescan after extending a shared volume group
storage: document the cluster-wide multipath management
pve-storage-iscsi.adoc | 13 +-
pve-storage-lvm.adoc | 9 +
pve-storage-multipath.adoc | 527 +++++++++++++++++++++++++++++++++++++++++++++
pvesm.adoc | 13 +-
4 files changed, 554 insertions(+), 8 deletions(-)
pve-manager:
Dietmar Maurer (10):
ui: storage: allow changing the node for NFS/CIFS scans
ui: storage: add guided remote storage wizard with NFS support
ui: storage wizard: add SMB/CIFS support
ui: storage wizard: add ZFS over iSCSI support
ui: dc: storage: add remote storage wizard entry to the add menu
ui: node: add SAN LUNs panel
ui: san luns: show multipath path state
api: nodes: expose iSCSI status and maintenance
pvenode: add iscsi commands
ui: node: san: add iSCSI target and session management
Thomas Lamprecht (22):
api: ceph: osd: keep iSCSI LUNs out of OSD creation
pvestatd: track pending storage status commands across re-exec
ui: storage: factor out the scan picker error mask
ui: storage: nfs: show scan errors and empty results
ui: storage wizard: preserve settings after partial setup
ui: storage wizard: add Fibre Channel shared LVM setup
ui: storage wizard: reconcile unanswered storage creation
pvestatd: apply the multipath configuration and report the node status
api: cluster: add the multipath endpoints
ui: dc: add a cluster-wide multipath view
ui: storage: iscsi: add the multipath option
ui: san luns: show multipath state and manage LUN entries
ui: storage wizard: add iSCSI support
ui: storage wizard: iscsi: show cluster initiator names
ui: storage wizard: iscsi: enable multipath for shared LVM
ui: node: san: wipe a LUN that no storage uses
ui: storage wizard: iscsi: reuse existing target connections
ui: storage wizard: fibre channel: enable multipath for a LUN
ui: storage wizard: let root@pam wipe a LUN with data
ui: storage wizard: do not offer LUNs in use for a new volume group
ui: san: show the local users of a LUN in its usage tooltip
ui: san: check the other nodes for users before wiping a LUN
PVE/API2/Ceph/OSD.pm | 3 +
PVE/API2/Cluster.pm | 7 +
PVE/API2/Nodes.pm | 7 +
PVE/CLI/pvenode.pm | 48 ++
PVE/Service/pvestatd.pm | 34 +
debian/control | 1 +
test/Makefile | 10 +
test/SANUtils_test.js | 204 +++++
test/StorageWizard_test.js | 128 +++
www/manager6/Makefile | 21 +
www/manager6/SANUtils.js | 579 +++++++++++++
www/manager6/Utils.js | 47 ++
www/manager6/dc/Config.js | 28 +-
www/manager6/dc/Multipath.js | 535 ++++++++++++
www/manager6/dc/MultipathWwidEdit.js | 233 ++++++
www/manager6/dc/SAN.js | 326 ++++++++
www/manager6/dc/StorageView.js | 13 +-
www/manager6/node/Config.js | 24 +
www/manager6/node/ISCSITargets.js | 615 ++++++++++++++
www/manager6/node/SANLuns.js | 771 ++++++++++++++++++
www/manager6/panel/SANNotice.js | 26 +
www/manager6/storage/CIFSEdit.js | 29 +-
www/manager6/storage/IScsiEdit.js | 38 +
www/manager6/storage/NFSEdit.js | 13 +
www/manager6/storage/wizard/CIFS.js | 118 +++
www/manager6/storage/wizard/CommonSettings.js | 75 ++
www/manager6/storage/wizard/FCRecovery.js | 242 ++++++
www/manager6/storage/wizard/FibreChannel.js | 1083 +++++++++++++++++++++++++
www/manager6/storage/wizard/IScsi.js | 707 ++++++++++++++++
www/manager6/storage/wizard/LunPicker.js | 101 +++
www/manager6/storage/wizard/LunSelect.js | 485 +++++++++++
www/manager6/storage/wizard/NFS.js | 89 ++
www/manager6/storage/wizard/NodeIdentities.js | 123 +++
www/manager6/storage/wizard/SanLvm.js | 179 ++++
www/manager6/storage/wizard/WipeStatus.js | 34 +
www/manager6/storage/wizard/Wizard.js | 970 ++++++++++++++++++++++
www/manager6/storage/wizard/ZFSOverISCSI.js | 180 ++++
www/manager6/window/SANLunWipe.js | 331 ++++++++
38 files changed, 8432 insertions(+), 25 deletions(-)
^ permalink raw reply [relevance 13%]
Results 1-37 of 37 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2026-11-05 23:30 13% [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup Thomas Lamprecht
2026-11-05 23:31 12% ` [PATCH v3 docs 44/76] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-05 23:31 4% ` [PATCH v3 manager 53/76] ui: storage wizard: add Fibre Channel shared LVM setup Thomas Lamprecht
2026-11-13 3:07 9% ` superseded: [PATCH v3 proxmox,proxmox-perl-rs,cluster,storage,docs,manager 00/76] SAN: cluster-wide multipath, SAN views and a guided storage setup Thomas Lamprecht
2026-11-13 3:00 13% [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-13 3:00 19% ` [PATCH v4 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-13 3:00 12% ` [PATCH v4 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-16 1:28 9% ` superseded: [PATCH v4 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-13 3:04 9% [PATCH storage,docs,manager 00/17] NVMe over Fabrics storage Thomas Lamprecht
2026-11-13 3:04 20% ` [PATCH docs 10/17] storage: document NVMe over Fabrics storages Thomas Lamprecht
2026-11-16 1:23 13% [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-16 1:23 18% ` [PATCH v5 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-16 1:23 13% ` [PATCH v5 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-16 1:23 18% ` [PATCH v5 manager 35/36] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-18 8:11 9% ` superseded: [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-18 6:52 13% [PATCH v6 cluster,storage,docs,manager 00/42] " Thomas Lamprecht
2026-11-18 6:52 18% ` [PATCH v6 docs 26/42] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-18 6:52 15% ` [PATCH v6 manager 38/42] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-18 6:52 20% ` [PATCH v6 manager 39/42] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-18 20:28 9% ` superseded: [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-18 20:25 13% [PATCH v7 cluster,storage,docs,manager 00/43] " Thomas Lamprecht
2026-11-18 20:26 18% ` [PATCH v7 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-18 20:26 15% ` [PATCH v7 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-18 20:26 20% ` [PATCH v7 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-19 19:49 9% ` superseded: [PATCH v7 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-18 20:42 9% [PATCH v2 storage,docs,manager 00/17] NVMe over Fabrics storage Thomas Lamprecht
2026-11-18 20:42 22% ` [PATCH v2 docs 10/17] storage: document NVMe over Fabrics storages Thomas Lamprecht
2026-11-19 19:46 13% [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-19 19:46 18% ` [PATCH v8 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-19 19:46 15% ` [PATCH v8 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-19 19:46 20% ` [PATCH v8 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-20 8:45 16% ` [PATCH v8 cluster,storage,docs,manager 00/43] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-22 1:25 [PATCH v3 storage,docs,manager 00/18] NVMe over Fabrics storage Thomas Lamprecht
2026-11-22 1:25 25% ` [PATCH v3 docs 10/18] storage: document NVMe over Fabrics storages Thomas Lamprecht
2026-11-23 1:47 9% [PATCH v4 storage,docs,manager 00/25] NVMe over Fabrics storage Thomas Lamprecht
2026-11-23 1:47 24% ` [PATCH v4 docs 15/25] storage: document NVMe over Fabrics storages Thomas Lamprecht
2026-11-23 13:31 9% applied: [PATCH v5 storage,docs,manager 00/26] NVMe over Fabrics storage Thomas Lamprecht
2026-11-23 13:32 24% ` [PATCH v5 docs 16/26] storage: document NVMe over Fabrics storages Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox