From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH v6 manager 35/42] ui: node: add SAN LUNs panel
Date: Wed, 18 Nov 2026 07:52:52 +0100 [thread overview]
Message-ID: <20261118065302.3033937-36-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20261118065302.3033937-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 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 LUN not reached over iSCSI, such as 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: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/SANUtils.js | 95 ++++++++++++++++
www/manager6/node/Config.js | 15 +++
www/manager6/node/SANLuns.js | 202 +++++++++++++++++++++++++++++++++++
4 files changed, 313 insertions(+)
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..564c87374 100644
--- a/www/manager6/SANUtils.js
+++ b/www/manager6/SANUtils.js
@@ -1,3 +1,47 @@
+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',
+ // 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,
@@ -57,4 +101,55 @@ 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')));
+ },
+
+ 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] ||
+ ''
+ );
+ },
+
+ renderSanLunUsage: function (value, metaData, rec) {
+ return Ext.htmlEncode(PVE.SANUtils.usageText(rec.data));
+ },
+
+ 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/node/Config.js b/www/manager6/node/Config.js
index 217ee284c..7b1222817 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -357,6 +357,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..c5b22f72f
--- /dev/null
+++ b/www/manager6/node/SANLuns.js
@@ -0,0 +1,202 @@
+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: 'name',
+ flex: 2,
+ minWidth: 150,
+ renderer: (value, md, rec) => Ext.htmlEncode(value || rec.get('wwid')),
+ },
+ { 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: 'usage',
+ flex: 1,
+ renderer: PVE.SANUtils.renderSanLunUsage,
+ },
+ {
+ 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 });
+ 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' &&
+ !rec.get('iscsi-target') &&
+ !['iscsi', 'iser'].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-18 6:58 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 6:52 [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 6:52 ` [PATCH v6 cluster 01/42] cfs: observe the multipath configuration files Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 02/42] diskmanage: collect disk transport type from lsblk Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 03/42] diskmanage: qualify NVMe over fabrics transport Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 04/42] diskmanage: optionally include iSCSI session devices in disk enumeration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 05/42] diskmanage: collect native NVMe multipath path state Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 06/42] iscsi: factor out session device map from device list Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 07/42] multipath: add a library around multipathd Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 08/42] diskmanage: add helper to list multipath devices Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 09/42] multipath: add a cluster-wide configuration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 10/42] iscsi: add an option to manage storage LUNs with multipath Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 11/42] lvm: activate a missing base volume before using the volume group Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 12/42] multipath: apply the configuration on every node Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 13/42] multipath: publish per-node status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 14/42] api: add endpoints for the cluster-wide multipath configuration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 15/42] api: multipath: add the cluster-wide health status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 16/42] diskmanage: look up the requested disks by name Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 17/42] diskmanage: read the udev data of all disks with one call Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 18/42] api: scan: add a SAN LUN inventory Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 19/42] pvesm: expose the " Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 20/42] api: add node-level iSCSI status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 21/42] disks: lvm: drop unused imports Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 22/42] disks: lvm: allow volume groups on SAN LUNs and multipath maps Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 23/42] disks: lvm: refuse to destroy the volume group of a shared storage Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 24/42] disks: allow wiping a SAN LUN that no storage uses Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 25/42] api: scan: report the process that has a SAN LUN open Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 docs 26/42] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 docs 27/42] storage: multipath: describe the use shown for an open LUN Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 28/42] pvestatd: apply the multipath configuration and report the node status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 29/42] report: add the managed multipath configuration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 30/42] api: cluster: add the multipath endpoints Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 31/42] api: nodes: expose the iSCSI status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 32/42] ui: dc: add a SAN view Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 33/42] ui: storage: iscsi: add the multipath option Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 34/42] ui: lvm: enable shared when a base storage is selected Thomas Lamprecht
2026-11-18 6:52 ` Thomas Lamprecht [this message]
2026-11-18 6:52 ` [PATCH v6 manager 36/42] ui: node: san: wipe a LUN that no storage uses Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 37/42] ui: node: san: show iSCSI targets and sessions Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 38/42] ui: dc: san: add a guided setup for shared LVM on iSCSI Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 39/42] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 40/42] ui: storage: point the iSCSI and LVM add dialogs to the SAN view Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 41/42] ui: san: show the guest or process that has a LUN open Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 42/42] ui: node: san: add a column for the iSCSI target of a LUN Thomas Lamprecht
2026-11-18 20:28 ` superseded: [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM 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=20261118065302.3033937-36-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