From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 4F1681FF0C0 for ; Wed, 18 Nov 2026 07:58:05 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1BF4D21AAD; Wed, 18 Nov 2026 07:54:15 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH v6 manager 41/42] ui: san: show the guest or process that has a LUN open Date: Wed, 18 Nov 2026 07:52:58 +0100 Message-ID: <20261118065302.3033937-42-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261118065302.3033937-1-t.lamprecht@proxmox.com> References: <20261118065302.3033937-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794984789508 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.178 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: UHOPVMEQV5OMIWPQYV2HSMMGFNVLJKAG X-Message-ID-Hash: UHOPVMEQV5OMIWPQYV2HSMMGFNVLJKAG X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: A LUN that a guest uses by its device path, or through a third-party storage plugin, showed up as unused or with the volume group that the guest created on it. The LUN inventory reports the process that has the device open for writing and the virtual machine of that process. Show the guest, or else the process, in the Used By column. Such a LUN can neither be wiped nor selected in a guided setup, as the backend refuses both. Signed-off-by: Thomas Lamprecht --- www/manager6/SANUtils.js | 6 ++++++ www/manager6/node/SANLuns.js | 6 +++++- www/manager6/storage/wizard/LunSelect.js | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/www/manager6/SANUtils.js b/www/manager6/SANUtils.js index e972a5072..07cdd9b3d 100644 --- a/www/manager6/SANUtils.js +++ b/www/manager6/SANUtils.js @@ -20,6 +20,8 @@ Ext.define('pve-san-lun', { 'vgname', 'detail', 'used-by-storage', + 'used-by-guest', + 'used-by-process', 'multipath', 'multipath-storage', 'iscsi-target', @@ -123,6 +125,10 @@ Ext.define('PVE.SANUtils', { usageText: function (row) { return ( row['used-by-storage'] || + // also if the LUN has a volume group, which then is one of the guest + (row['used-by-guest'] && `VM ${row['used-by-guest']}`) || + (row['used-by-process'] && + Ext.String.format(gettext('Process {0}'), row['used-by-process'])) || row.vgname || row.detail || { diff --git a/www/manager6/node/SANLuns.js b/www/manager6/node/SANLuns.js index c26f9c6f3..e55bdf1bd 100644 --- a/www/manager6/node/SANLuns.js +++ b/www/manager6/node/SANLuns.js @@ -164,7 +164,9 @@ Ext.define('PVE.node.SANLunList', { iconCls: 'fa fa-eraser', disabled: true, enableFn: (rec) => - Proxmox.UserName === 'root@pam' && !rec.get('used-by-storage'), + Proxmox.UserName === 'root@pam' && + !rec.get('used-by-storage') && + !rec.get('used-by-process'), handler: (button, event, rec) => Ext.create('PVE.window.SANLunWipe', { node: me.nodename, @@ -183,6 +185,8 @@ Ext.define('PVE.node.SANLunList', { 'name', 'wwid', 'used-by-storage', + 'used-by-guest', + 'used-by-process', 'vgname', 'detail', 'multipath-storage', diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js index 0a6d5c4a4..7b4986136 100644 --- a/www/manager6/storage/wizard/LunSelect.js +++ b/www/manager6/storage/wizard/LunSelect.js @@ -51,7 +51,7 @@ Ext.define('PVE.storage.wizard.LunSelect', { 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 inUse = (row) => row['used-by-storage'] || row['used-by-process']; let updateSelection = function () { let row = me.getSelection(); me.down('#selection').setValue(row && !inUse(row) ? row.wwid : '');