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 E3BE31FF0DA for ; Thu, 19 Nov 2026 20:52:41 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4CC0521DA8; Thu, 19 Nov 2026 20:48:39 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH v8 manager 42/43] ui: san: show the guest or process that has a LUN open Date: Thu, 19 Nov 2026 20:46:47 +0100 Message-ID: <20261119194655.3163258-43-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261119194655.3163258-1-t.lamprecht@proxmox.com> References: <20261119194655.3163258-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: 1795117623863 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.151 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: QZB3T3UF56QROKJ6OBP3ILMY57CUC27H X-Message-ID-Hash: QZB3T3UF56QROKJ6OBP3ILMY57CUC27H 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 | 15 ++++++++++++++- www/manager6/node/SANLuns.js | 5 ++++- www/manager6/storage/wizard/LunSelect.js | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/www/manager6/SANUtils.js b/www/manager6/SANUtils.js index 84d482f36..520a397cd 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', @@ -33,7 +35,14 @@ Ext.define('pve-san-lun', { }, { name: 'used-by', - depends: ['used-by-storage', 'vgname', 'detail', 'usage'], + depends: [ + 'used-by-storage', + 'used-by-guest', + 'used-by-process', + 'vgname', + 'detail', + 'usage', + ], calculate: (data) => PVE.SANUtils.usageText(data), sortType: 'asUCString', }, @@ -142,6 +151,10 @@ Ext.define('PVE.SANUtils', { usageText: function (row) { return ( row['used-by-storage'] || + // also if the LUN has a volume group, which is then usually the guest's own + (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 a8b6747e6..45b45f725 100644 --- a/www/manager6/node/SANLuns.js +++ b/www/manager6/node/SANLuns.js @@ -169,7 +169,8 @@ Ext.define('PVE.node.SANLunList', { enableFn: (rec) => Proxmox.UserName === 'root@pam' && !!rec.get('by-id') && - !rec.get('used-by-storage'), + !rec.get('used-by-storage') && + !rec.get('used-by-process'), handler: (button, event, rec) => Ext.create('PVE.window.SANLunWipe', { node: me.nodename, @@ -188,6 +189,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 985131c00..834a3412c 100644 --- a/www/manager6/storage/wizard/LunSelect.js +++ b/www/manager6/storage/wizard/LunSelect.js @@ -70,7 +70,7 @@ Ext.define('PVE.storage.wizard.LunSelect', { rstore: me.rstore, sortAfterUpdate: true, }); - let inUse = (row) => row['used-by-storage']; + let inUse = (row) => row['used-by-storage'] || row['used-by-process']; let noLunsText = gettext('No LUNs found. Check connections and array access.'); let updateSelection = function () { let row = me.getSelection();