From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH v8 manager 36/43] ui: node: add SAN LUNs panel
Date: Thu, 19 Nov 2026 20:46:41 +0100 [thread overview]
Message-ID: <20261119194655.3163258-37-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20261119194655.3163258-1-t.lamprecht@proxmox.com>
Show the LUNs that a node sees from a SAN under Node > SAN, separate
from the local disks, with the state of every path in the expanded row.
Admins no longer need "multipath -ll" or sysfs to check a node. A
degraded or failed LUN shows its usable and expected paths, as the
kernel removes a lost path after a while. A LUN with a single path and
no map shows Single path under Multipath rather than Not enabled, as
it has no other path to fail over to.
The node list of Datacenter > Storage > SAN links each node to its
Node > SAN view, as the cluster-wide list only summarizes the state of
a node.
A node can see many more LUNs than Proxmox VE uses, for example from a
storage plugin with one LUN per guest disk. So the list has a search
field, which also matches the devices, WWPNs and addresses of the paths.
This way, the LUN of a path device named in the kernel log is easy to
find.
For a Fibre Channel LUN, Enable Multipath opens the dialog of an
explicit entry with the WWID filled in. The entry applies to all nodes
unless restricted, which the dialog shows. Node auditors and storage
administrators can open the view, matching the API permissions.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/SANUtils.js | 114 +++++++++++++++++++-
www/manager6/dc/SAN.js | 20 ++++
www/manager6/node/Config.js | 15 +++
www/manager6/node/SANLuns.js | 204 +++++++++++++++++++++++++++++++++++
5 files changed, 352 insertions(+), 2 deletions(-)
create mode 100644 www/manager6/node/SANLuns.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 9f5beb5f1..a1d4d5493 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -249,6 +249,7 @@ JSSRC= \
node/Directory.js \
node/LVM.js \
node/LVMThin.js \
+ node/SANLuns.js \
node/StatusView.js \
node/Subscription.js \
node/Summary.js \
diff --git a/www/manager6/SANUtils.js b/www/manager6/SANUtils.js
index 1900386c3..3d7ab7952 100644
--- a/www/manager6/SANUtils.js
+++ b/www/manager6/SANUtils.js
@@ -1,3 +1,60 @@
+Ext.define('pve-san-lun', {
+ extend: 'Ext.data.Model',
+ idProperty: 'wwid',
+ fields: [
+ 'wwid',
+ 'name',
+ 'devpath',
+ 'by-id',
+ 'size',
+ 'transport',
+ 'vendor',
+ 'model',
+ 'serial',
+ 'state',
+ 'paths-active',
+ 'paths-total',
+ 'paths-expected',
+ 'path-list',
+ 'usage',
+ 'vgname',
+ 'detail',
+ 'used-by-storage',
+ 'multipath',
+ 'multipath-storage',
+ 'iscsi-target',
+ 'iscsi-lun',
+ // the texts of the Name and Used By columns, which also sort by them
+ {
+ name: 'display-name',
+ depends: ['name', 'wwid'],
+ calculate: (data) => data.name || data.wwid,
+ sortType: 'asUCString',
+ },
+ {
+ name: 'used-by',
+ depends: ['used-by-storage', 'vgname', 'detail', 'usage'],
+ calculate: (data) => PVE.SANUtils.usageText(data),
+ sortType: 'asUCString',
+ },
+ // what identifies the paths, as text for the search
+ {
+ name: 'path-search',
+ depends: ['path-list'],
+ calculate: (data) =>
+ (data['path-list'] ?? [])
+ .flatMap((path) => [
+ path.device,
+ path['host-wwpn'],
+ path['target-wwpn'],
+ path.address,
+ ])
+ .filter(Boolean)
+ .join(' '),
+ },
+ ],
+});
+
Ext.define('PVE.SANUtils', {
singleton: true,
@@ -20,11 +77,15 @@ Ext.define('PVE.SANUtils', {
return `${report['paths-active']}/${total}`;
},
- // How the multipath of a LUN is managed, as plain text.
- multipathText: function (value, storage) {
+ // How the multipath of a LUN is managed, as plain text. A LUN with one path and no map has no
+ // other path to fail over to.
+ multipathText: function (value, storage, pathsTotal) {
if (value === 'storage' && storage) {
return Ext.String.format(gettext('Storage "{0}"'), storage);
}
+ if (value === 'none' && Number(pathsTotal) === 1) {
+ return gettext('Single path');
+ }
return (
{
none: gettext('Not enabled'),
@@ -57,4 +118,53 @@ Ext.define('PVE.SANUtils', {
let [icon, label] = display ?? ['question-circle faded', value];
return `<i class="fa fa-fw fa-${icon}"></i> ${Ext.htmlEncode(label)}`;
},
+
+ // The path counts tell why a LUN is degraded while all of its listed paths are usable: the
+ // kernel removes a lost path after a while.
+ renderLunState: function (value, metaData, rec) {
+ let state = PVE.SANUtils.lunState(value, rec.get('paths-total'));
+ let text = PVE.SANUtils.renderState(state);
+ if (['degraded', 'failed'].includes(state) && rec.get('paths-active') !== undefined) {
+ text += ` (${Ext.htmlEncode(PVE.SANUtils.pathCount(rec.data))})`;
+ }
+ return text;
+ },
+
+ renderSanLunMultipath: function (value, metaData, rec) {
+ return Ext.htmlEncode(
+ PVE.SANUtils.multipathText(value, rec.get('multipath-storage'), rec.get('paths-total')),
+ );
+ },
+
+ usageText: function (row) {
+ return (
+ row['used-by-storage'] ||
+ row.vgname ||
+ row.detail ||
+ {
+ unused: gettext('Unused'),
+ lvm: gettext('LVM physical volume'),
+ other: gettext('Other'),
+ }[row.usage] ||
+ ''
+ );
+ },
+
+ renderSanTransport: function (value) {
+ return Ext.htmlEncode(
+ {
+ iscsi: 'iSCSI',
+ iser: 'iSER',
+ fc: 'FC',
+ fcoe: 'FCoE',
+ sas: 'SAS',
+ nvme: 'NVMe',
+ 'nvme-tcp': 'NVMe/TCP',
+ 'nvme-rdma': 'NVMe/RDMA',
+ 'nvme-fc': 'NVMe/FC',
+ }[value] ??
+ value ??
+ '',
+ );
+ },
});
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 5f7b4d8a6..12afa65df 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -172,6 +172,26 @@ Ext.define('PVE.dc.SANView', {
renderer: Proxmox.Utils.render_timestamp,
hidden: true,
},
+ {
+ xtype: 'actioncolumn',
+ width: 30,
+ items: [
+ {
+ iconCls: 'fa fa-chevron-right',
+ tooltip: gettext('Go to Node'),
+ isActionDisabled: (_view, _ri, _ci, _item, rec) =>
+ !PVE.data.ResourceStore.getNodeById(rec.get('node')),
+ handler: function (view, _ri, _ci, _item, _event, rec) {
+ Ext.state.Manager.getProvider().set('nodetab', {
+ value: 'san',
+ });
+ view.up('pveStdWorkspace').selectById(
+ `node/${rec.get('node')}`,
+ );
+ },
+ },
+ ],
+ },
],
},
{
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index 747119379..5caef1edf 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -382,6 +382,21 @@ Ext.define('PVE.node.Config', {
groups: ['storage'],
xtype: 'pveZFSList',
},
+ );
+ }
+
+ // the san-luns read accepts either privilege
+ if (caps.nodes['Sys.Audit'] || caps.storage['Datastore.Allocate']) {
+ me.items.push({
+ xtype: 'pveSANLunList',
+ title: 'SAN',
+ itemId: 'san',
+ iconCls: 'fa fa-cubes',
+ });
+ }
+
+ if (caps.nodes['Sys.Audit']) {
+ me.items.push(
{
xtype: 'pveNodeCephStatus',
title: 'Ceph',
diff --git a/www/manager6/node/SANLuns.js b/www/manager6/node/SANLuns.js
new file mode 100644
index 000000000..8d96bd126
--- /dev/null
+++ b/www/manager6/node/SANLuns.js
@@ -0,0 +1,204 @@
+Ext.define('PVE.node.SANLunList', {
+ extend: 'Ext.grid.Panel',
+ xtype: 'pveSANLunList',
+ onlineHelp: 'storage_multipath',
+ stateful: true,
+ stateId: 'grid-node-san-luns',
+ emptyText: gettext('No LUNs found. Check connections and array access.'),
+ viewConfig: { enableTextSelection: true },
+
+ plugins: [
+ {
+ ptype: 'rowexpander',
+ expandOnDblClick: false,
+ rowBodyTpl: [
+ '{[this.paths(values)]}',
+ {
+ paths: function (values) {
+ let columns = [
+ ['device', gettext('Path')],
+ ['state', gettext('State')],
+ ['checker-state', gettext('Checker')],
+ ['ana-state', 'ANA'],
+ ['host-wwpn', gettext('Host WWPN')],
+ ['target-wwpn', gettext('Target WWPN')],
+ ['address', gettext('Address')],
+ ];
+ let paths = values['path-list'] || [];
+ columns = columns.filter(([key]) =>
+ paths.some((path) => path[key] !== undefined),
+ );
+ let headers = columns
+ .map(([, label]) => `<th>${Ext.htmlEncode(label)}</th>`)
+ .join('');
+ let rows = paths
+ .map(
+ (path) =>
+ '<tr>' +
+ columns
+ .map(
+ ([key]) =>
+ `<td>${Ext.htmlEncode(path[key] ?? '')}</td>`,
+ )
+ .join('') +
+ '</tr>',
+ )
+ .join('');
+ return `<table style="border-spacing: 10px 2px;"><tr>${headers}</tr>${rows}</table>`;
+ },
+ },
+ ],
+ },
+ ],
+ columns: [
+ {
+ text: gettext('Name'),
+ dataIndex: 'display-name',
+ flex: 2,
+ minWidth: 150,
+ renderer: Ext.htmlEncode,
+ },
+ { text: 'WWID', dataIndex: 'wwid', flex: 2, hidden: true, renderer: Ext.htmlEncode },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 140,
+ renderer: PVE.SANUtils.renderLunState,
+ },
+ {
+ text: gettext('Multipath'),
+ dataIndex: 'multipath',
+ width: 150,
+ renderer: PVE.SANUtils.renderSanLunMultipath,
+ },
+ {
+ text: gettext('Used By'),
+ dataIndex: 'used-by',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Device'),
+ dataIndex: 'devpath',
+ width: 180,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Size'),
+ dataIndex: 'size',
+ width: 100,
+ renderer: Proxmox.Utils.render_size,
+ },
+ {
+ text: gettext('Transport'),
+ dataIndex: 'transport',
+ width: 100,
+ renderer: PVE.SANUtils.renderSanTransport,
+ },
+ { text: 'LUN', dataIndex: 'iscsi-lun', width: 60, hidden: true },
+ {
+ text: gettext('Vendor'),
+ dataIndex: 'vendor',
+ width: 100,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Model'),
+ dataIndex: 'model',
+ width: 140,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Serial'),
+ dataIndex: 'serial',
+ width: 140,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+
+ initComponent: function () {
+ let me = this;
+ me.nodename = me.pveSelNode.data.node;
+ let noLunsText = me.emptyText;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: `san-luns-${me.nodename}`,
+ model: 'pve-san-lun',
+ interval: 5000,
+ proxy: {
+ type: 'proxmox',
+ url: `/api2/json/nodes/${me.nodename}/scan/san-luns`,
+ },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sortAfterUpdate: true,
+ });
+ let reload = () => me.rstore.load();
+ let caps = Ext.state.Manager.get('GuiCap');
+ me.tbar = {
+ overflowHandler: 'scroller',
+ items: [
+ { text: gettext('Reload'), iconCls: 'fa fa-refresh', handler: reload },
+ {
+ xtype: 'proxmoxButton',
+ text: gettext('Enable Multipath'),
+ disabled: true,
+ enableFn: (rec) =>
+ !!caps.dc['Sys.Modify'] &&
+ rec.get('multipath') === 'none' &&
+ ['fc', 'fcoe'].includes(rec.get('transport')),
+ // the entry is for all nodes unless restricted, which the dialog shows
+ handler: (button, event, rec) =>
+ Ext.create('PVE.dc.MultipathWwidEdit', {
+ wwid: rec.get('wwid'),
+ isCreate: true,
+ autoShow: true,
+ apiCallDone: (success) => success && reload(),
+ }),
+ },
+ '->',
+ gettext('Search') + ':',
+ ' ',
+ {
+ xtype: 'pveRecordSearchField',
+ emptyText: gettext('Name, WWID, Storage'),
+ searchFields: [
+ 'name',
+ 'wwid',
+ 'used-by-storage',
+ 'vgname',
+ 'detail',
+ 'multipath-storage',
+ 'devpath',
+ 'path-search',
+ 'vendor',
+ 'model',
+ 'serial',
+ ],
+ targetStore: me.store,
+ listeners: {
+ // no hit for a search is no sign of a connection problem
+ searchchange: (field, query) =>
+ me.rendered &&
+ me.setEmptyText(
+ query ? gettext('No LUNs match the search.') : noLunsText,
+ ),
+ },
+ },
+ ],
+ };
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me, me.rstore);
+ me.mon(me.store, 'refresh', () => PVE.SANUtils.deselectHidden(me));
+ me.on('activate', () => me.rstore.startUpdate());
+ me.on('deactivate', () => me.rstore.stopUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
next prev parent reply other threads:[~2026-11-19 19:53 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:46 [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 ` [PATCH v8 cluster 01/43] cfs: observe the multipath configuration files Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 02/43] diskmanage: collect disk transport type from lsblk Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 03/43] diskmanage: qualify NVMe over Fabrics transport Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 04/43] diskmanage: optionally include iSCSI session devices in disk enumeration Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 05/43] diskmanage: collect native NVMe multipath path state Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 06/43] iscsi: factor out session device map from device list Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 07/43] multipath: add a library around multipathd Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 08/43] diskmanage: add helper to list multipath devices Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 09/43] multipath: add a cluster-wide configuration Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 10/43] iscsi: add an option to manage storage LUNs with multipath Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 11/43] lvm: activate a missing base volume before using the volume group Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 12/43] multipath: apply the configuration on every node Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 13/43] multipath: publish per-node status Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 14/43] api: add endpoints for the cluster-wide multipath configuration Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 15/43] api: multipath: add the cluster-wide health status Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 16/43] diskmanage: look up the requested disks by name Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 17/43] diskmanage: read the udev data of all disks with one call Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 18/43] api: scan: add a SAN LUN inventory Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 19/43] pvesm: expose the " Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 20/43] api: add node-level iSCSI status Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 21/43] api: scan: name the portal of an iSCSI path Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 22/43] disks: lvm: drop unused imports Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 23/43] disks: lvm: allow volume groups on SAN LUNs and multipath maps Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 24/43] disks: lvm: refuse to destroy the volume group of a shared storage Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 25/43] disks: allow wiping a SAN LUN that no storage uses Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 storage 26/43] api: scan: report the process that has a SAN LUN open Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 docs 27/43] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 docs 28/43] storage: multipath: describe the use shown for an open LUN Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 29/43] pvestatd: apply the multipath configuration and report the node status Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 30/43] report: add the managed multipath configuration Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 31/43] api: cluster: add the multipath endpoints Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 32/43] api: nodes: expose the iSCSI status Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 33/43] ui: dc: add a SAN view Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 34/43] ui: storage: iscsi: add the multipath option Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 35/43] ui: lvm: enable shared when a base storage is selected Thomas Lamprecht
2026-11-19 19:46 ` Thomas Lamprecht [this message]
2026-11-19 19:46 ` [PATCH v8 manager 37/43] ui: node: san: wipe a LUN that no storage uses Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 38/43] ui: node: san: show iSCSI targets and sessions Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 39/43] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 40/43] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 41/43] ui: storage: point the iSCSI and LVM add dialogs to the SAN view Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 42/43] ui: san: show the guest or process that has a LUN open Thomas Lamprecht
2026-11-19 19:46 ` [PATCH v8 manager 43/43] ui: node: san: add a column for the target or subsystem of a LUN Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119194655.3163258-37-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox