public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [RFC pve-manager 23/27] ui: node: add SAN LUNs panel
Date: Fri, 31 Jul 2026 12:21:52 +0200	[thread overview]
Message-ID: <20260731102156.3947857-24-dietmar@proxmox.com> (raw)
In-Reply-To: <20260731102156.3947857-1-dietmar@proxmox.com>

node > Disks intentionally lists only local disks, so devices
attached through a SAN or a software-managed initiator connection
(FC, SAS, iSCSI, NVMe-oF) are otherwise only visible inside the FC
storage wizard. Add a read-only panel below the disk related views
that lists them per node, including the multipath path count and
which storage uses each LUN, for setup verification and
troubleshooting.

The entry is only shown with Datastore.Allocate, which the san-luns
scan endpoint requires.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
---
 www/manager6/Makefile        |   1 +
 www/manager6/node/Config.js  |  14 ++++
 www/manager6/node/SANLuns.js | 154 +++++++++++++++++++++++++++++++++++
 3 files changed, 169 insertions(+)
 create mode 100644 www/manager6/node/SANLuns.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 532d4d55..c354b3aa 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -245,6 +245,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/node/Config.js b/www/manager6/node/Config.js
index 217ee284..6329241a 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -357,6 +357,20 @@ Ext.define('PVE.node.Config', {
                     groups: ['storage'],
                     xtype: 'pveZFSList',
                 },
+            );
+
+            // the san-luns scan endpoint requires Datastore.Allocate
+            if (caps.storage['Datastore.Allocate']) {
+                me.items.push({
+                    xtype: 'pveSANLunList',
+                    title: gettext('SAN LUNs'),
+                    itemId: 'san-luns',
+                    iconCls: 'fa fa-cubes',
+                    groups: ['storage'],
+                });
+            }
+
+            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 00000000..b2b9e24d
--- /dev/null
+++ b/www/manager6/node/SANLuns.js
@@ -0,0 +1,154 @@
+Ext.define('PVE.node.SANLunList', {
+    extend: 'Ext.grid.GridPanel',
+    xtype: 'pveSANLunList',
+
+    stateful: true,
+    stateId: 'grid-node-san-luns',
+
+    disableSelection: true,
+
+    emptyText: gettext(
+        'No SAN attached devices found - "Show all devices" also lists devices with local or unknown transports',
+    ),
+
+    viewConfig: {
+        trackOver: false,
+    },
+
+    columns: [
+        {
+            header: gettext('Device'),
+            dataIndex: 'devpath',
+            flex: 2,
+            renderer: PVE.Utils.render_san_lun_device,
+        },
+        {
+            header: gettext('Transport'),
+            dataIndex: 'transport',
+            width: 100,
+        },
+        {
+            header: gettext('Size'),
+            dataIndex: 'size',
+            width: 100,
+            renderer: Proxmox.Utils.format_size,
+        },
+        {
+            header: gettext('Vendor') + '/' + gettext('Model'),
+            dataIndex: 'model',
+            flex: 1,
+            renderer: (value, metaData, rec) =>
+                Ext.htmlEncode(`${rec.get('vendor') || ''} ${value || ''}`.trim()),
+        },
+        {
+            header: 'WWN',
+            dataIndex: 'wwn',
+            width: 200,
+        },
+        {
+            header: gettext('Serial'),
+            dataIndex: 'serial',
+            width: 140,
+            hidden: true,
+        },
+        {
+            header: gettext('Usage'),
+            dataIndex: 'usage',
+            flex: 2,
+            renderer: PVE.Utils.render_san_lun_usage,
+        },
+    ],
+
+    reload: function () {
+        this.getStore().load();
+    },
+
+    listeners: {
+        activate: function () {
+            this.reload();
+        },
+    },
+
+    initComponent: function () {
+        let me = this;
+
+        me.nodename = me.pveSelNode.data.node;
+        if (!me.nodename) {
+            throw 'no node name specified';
+        }
+
+        // devices sitting on a SAN or attached through a software-managed
+        // initiator connection; local disks are covered by the disk list
+        let sanTransports = {
+            fc: 1,
+            sas: 1,
+            iscsi: 1,
+            'nvme-fc': 1,
+            'nvme-tcp': 1,
+            'nvme-rdma': 1,
+            'nvme-loop': 1,
+        };
+
+        // hide devices with local or unknown transports unless 'Show all devices' is enabled
+        let sanTransportFilter = new Ext.util.Filter({
+            id: 'san-transport',
+            filterFn: (rec) => !!sanTransports[rec.get('transport')],
+        });
+
+        let store = Ext.create('Ext.data.Store', {
+            fields: [
+                'devpath',
+                'size',
+                'transport',
+                'vendor',
+                'model',
+                'serial',
+                'wwn',
+                'paths',
+                'usage',
+                'vgname',
+                'used-by-storage',
+                'detail',
+            ],
+            proxy: {
+                type: 'proxmox',
+                url: `/api2/json/nodes/${me.nodename}/scan/san-luns`,
+            },
+            filters: [sanTransportFilter],
+            sorters: 'devpath',
+        });
+        me.store = store;
+
+        me.tbar = [
+            {
+                text: gettext('Reload'),
+                iconCls: 'fa fa-refresh',
+                handler: () => me.reload(),
+            },
+            '->',
+            {
+                xtype: 'proxmoxcheckbox',
+                boxLabel: gettext('Show all devices'),
+                autoEl: {
+                    tag: 'div',
+                    'data-qtip': gettext('Also list devices with local or unknown transports.'),
+                },
+                listeners: {
+                    change: function (f, value) {
+                        let filters = store.getFilters();
+                        if (value) {
+                            filters.remove(sanTransportFilter);
+                        } else {
+                            filters.add(sanTransportFilter);
+                        }
+                    },
+                },
+            },
+        ];
+
+        me.callParent();
+
+        Proxmox.Utils.monStoreErrors(me, store);
+        me.reload();
+    },
+});
-- 
2.47.3




  parent reply	other threads:[~2026-07-31 10:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 10:21 [RFC pve-storage/proxmox-widget-toolkit/pve-manager 00/27] add guided remote storage setup and SAN visibility Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 01/27] diskmanage: collect disk transport type from lsblk Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 02/27] diskmanage: add helper to list multipath devices Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 03/27] diskmanage: qualify NVMe over fabrics transport Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 04/27] disks: list: add include-remote parameter Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 05/27] diskmanage: include iSCSI session devices in disk enumeration Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 06/27] diskmanage: link multipath member disks to their map device Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 07/27] iscsi: factor out session device map from device list Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 08/27] api: scan: add san-luns method listing SAN LUN candidates Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 09/27] disks: lvm: allow creating volume groups on multipath devices Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 10/27] diskmanage: add helper querying multipath path state Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 11/27] diskmanage: add helper querying NVMe native " Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 12/27] api: scan: san-luns: report " Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 13/27] iscsi plugin: list sessions of all transports and capture transport Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-storage 14/27] api: add node-level iSCSI initiator target and session API Dietmar Maurer
2026-07-31 10:21 ` [RFC proxmox-widget-toolkit 15/27] disk selectors: allow opting into remote devices Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 16/27] ui: storage: allow switching the scan node of the NFS/CIFS scan combos Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 17/27] ui: storage: add guided remote storage wizard with NFS support Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 18/27] ui: storage wizard: add SMB/CIFS support Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 19/27] ui: storage wizard: add iSCSI support Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 20/27] ui: storage wizard: add FC-attached SAN (shared LVM) support Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 21/27] ui: storage wizard: add ZFS over iSCSI support Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 22/27] ui: dc: storage: add remote storage wizard entry to the add menu Dietmar Maurer
2026-07-31 10:21 ` Dietmar Maurer [this message]
2026-07-31 10:21 ` [RFC pve-manager 24/27] ui: san luns: show multipath path state Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 25/27] api: nodes: add iSCSI initiator API endpoint Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 26/27] pvenode: add iscsi commands Dietmar Maurer
2026-07-31 10:21 ` [RFC pve-manager 27/27] ui: san luns: show iSCSI targets and sessions Dietmar Maurer

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=20260731102156.3947857-24-dietmar@proxmox.com \
    --to=dietmar@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal