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 6A6651FF0E3 for ; Wed, 18 Nov 2026 21:45:41 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BAC1A21A63; Wed, 18 Nov 2026 21:43:36 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH v2 manager 14/17] ui: dc: san: add a guided setup for shared LVM on NVMe over Fabrics Date: Wed, 18 Nov 2026 21:42:33 +0100 Message-ID: <20261118204302.3100813-15-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261118204302.3100813-1-t.lamprecht@proxmox.com> References: <20261118204302.3100813-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: 1795034587945 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.163 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: LH3RKG75WKCCECJF2FXB2UJ5YISWWOHG X-Message-ID-Hash: LH3RKG75WKCCECJF2FXB2UJ5YISWWOHG 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: Add an NVMe over Fabrics entry to the guided setup of the SAN view, with the same steps as for iSCSI. It connects to a subsystem found at a discovery portal and shows the host NQNs of all nodes for the access rules of the array. The target step is shared with iSCSI, as only the storage type, its scan and the node identities differ. The add dialog of NVMe over Fabrics storages names the SAN view, as those of iSCSI and LVM do. Signed-off-by: Thomas Lamprecht --- www/manager6/Makefile | 2 +- www/manager6/SANUtils.js | 1 + www/manager6/dc/SAN.js | 2 +- www/manager6/storage/NVMeOFEdit.js | 3 + www/manager6/storage/wizard/LunSelect.js | 34 ++-- www/manager6/storage/wizard/NodeIdentities.js | 45 +++--- .../storage/wizard/{IScsi.js => Target.js} | 153 ++++++++++++------ www/manager6/storage/wizard/Wizard.js | 43 ++--- www/manager6/window/SANLunState.js | 23 ++- 9 files changed, 203 insertions(+), 103 deletions(-) rename www/manager6/storage/wizard/{IScsi.js => Target.js} (61%) diff --git a/www/manager6/Makefile b/www/manager6/Makefile index f8a1a2698..1fbce8c4d 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -390,7 +390,7 @@ JSSRC= \ storage/wizard/Wizard.js \ storage/wizard/LunSelect.js \ storage/wizard/NodeIdentities.js \ - storage/wizard/IScsi.js \ + storage/wizard/Target.js \ storage/wizard/FibreChannel.js \ Workspace.js \ # end of JSSRC list diff --git a/www/manager6/SANUtils.js b/www/manager6/SANUtils.js index c2df2d1ad..1b2b25c12 100644 --- a/www/manager6/SANUtils.js +++ b/www/manager6/SANUtils.js @@ -27,6 +27,7 @@ Ext.define('pve-san-lun', { 'iscsi-target', 'iscsi-lun', 'nvme-subsystem', + 'nvme-nsid', // one column shows the target of a LUN and the subsystem of a namespace { name: 'target', diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js index e9a5e5ccc..fcddc3e2e 100644 --- a/www/manager6/dc/SAN.js +++ b/www/manager6/dc/SAN.js @@ -126,7 +126,7 @@ Ext.define('PVE.dc.SANView', { { text: gettext('Guided Setup'), disabled: !canSetup, - menu: [setupItem('iscsi'), setupItem('fc', !canModify)], + menu: [setupItem('iscsi'), setupItem('fc', !canModify), setupItem('nvmeof')], }, ]; me.items = [ diff --git a/www/manager6/storage/NVMeOFEdit.js b/www/manager6/storage/NVMeOFEdit.js index 5d816cbbe..306cbea3d 100644 --- a/www/manager6/storage/NVMeOFEdit.js +++ b/www/manager6/storage/NVMeOFEdit.js @@ -29,6 +29,9 @@ Ext.define('PVE.storage.NVMeOFInputPanel', { onlineHelp: 'storage_nvmeof', + // TRANSLATORS: "Guided Setup" is a button of the SAN view, {0} the menu path of that view. + sanNote: gettext('To set up shared LVM on a namespace, use Guided Setup in {0}.'), + namespaceContent: 'images', onGetValues: function (values) { diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js index 834a3412c..9da0c195b 100644 --- a/www/manager6/storage/wizard/LunSelect.js +++ b/www/manager6/storage/wizard/LunSelect.js @@ -30,10 +30,11 @@ Ext.define('PVE.storage.wizard.LunSelect', { // The scan names one target per LUN, also for a LUN reached through several. The content // listing has the LUNs of the connection, and a LUN that shows up later is listed once the // scan names the target of the connection for it. + let targetKey = wizard.wizardType === 'nvmeof' ? 'nvme-subsystem' : 'iscsi-target'; let filter = { id: 'connection', filterFn: (rec) => - rec.get('iscsi-target') === connection.target || + rec.get(targetKey) === connection.target || (me.connectionWwids ?? []).includes(rec.get('wwid')), }; me.store.addFilter(filter); @@ -45,7 +46,7 @@ Ext.define('PVE.storage.wizard.LunSelect', { success: function (response) { if (!me.destroyed) { me.connectionWwids = response.result.data - .map((entry) => entry.volid.match(/\.dm-uuid-mpath-(.+)$/)?.[1]) + .map((entry) => entry.volid.match(/(?:\.dm-uuid-mpath-|:nvme-)(.+)$/)?.[1]) .filter(Boolean); me.store.addFilter(filter); } @@ -71,7 +72,9 @@ Ext.define('PVE.storage.wizard.LunSelect', { sortAfterUpdate: true, }); let inUse = (row) => row['used-by-storage'] || row['used-by-process']; - let noLunsText = gettext('No LUNs found. Check connections and array access.'); + let noLunsText = me.nvme + ? gettext('No namespaces found. Check connections and array access.') + : gettext('No LUNs found. Check connections and array access.'); let updateSelection = function () { let row = me.getSelection(); me.down('#selection').setValue(row && !inUse(row) ? row.wwid : ''); @@ -88,9 +91,13 @@ Ext.define('PVE.storage.wizard.LunSelect', { xtype: 'component', cls: 'pmx-hint', margin: '0 0 10 0', - html: gettext( - 'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.', - ), + html: me.nvme + ? gettext( + 'A namespace that is in use cannot be selected. A namespace with data that is no longer needed has to be wiped under Node > SAN first.', + ) + : gettext( + 'A LUN that is in use cannot be selected. A LUN with data that is no longer needed has to be wiped under Node > SAN first.', + ), }, ...(me.rescanNote ? [ @@ -123,6 +130,7 @@ Ext.define('PVE.storage.wizard.LunSelect', { renderer: Ext.htmlEncode, }, { text: 'LUN', dataIndex: 'iscsi-lun', width: 60 }, + { text: 'NSID', dataIndex: 'nvme-nsid', width: 60 }, { text: gettext('Model'), dataIndex: 'model', @@ -140,6 +148,8 @@ Ext.define('PVE.storage.wizard.LunSelect', { text: gettext('Multipath'), dataIndex: 'multipath', width: 170, + // native NVMe multipath needs no setup per namespace + hidden: me.nvme, renderer: PVE.SANUtils.renderSanLunMultipath, }, { @@ -186,7 +196,11 @@ Ext.define('PVE.storage.wizard.LunSelect', { let grid = me.down('grid'); if (grid?.rendered) { grid.setEmptyText( - query ? gettext('No LUNs match the search.') : noLunsText, + query + ? me.nvme + ? gettext('No namespaces match the search.') + : gettext('No LUNs match the search.') + : noLunsText, ); } }, @@ -202,8 +216,10 @@ Ext.define('PVE.storage.wizard.LunSelect', { let search = me.down('pveRecordSearchField'); me.on('activate', function () { search.setTargetStore(me.store); - if (me.up('window').wizardType === 'fc') { - me.down('gridcolumn[dataIndex=iscsi-lun]').hide(); + let type = me.up('window').wizardType; + me.down('gridcolumn[dataIndex=iscsi-lun]').setHidden(type !== 'iscsi'); + me.down('gridcolumn[dataIndex=nvme-nsid]').setHidden(type !== 'nvmeof'); + if (type === 'fc') { me.store.addFilter({ id: 'transport', filterFn: (rec) => ['fc', 'fcoe'].includes(rec.get('transport')), diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js index a0ef62fee..ed0ad8357 100644 --- a/www/manager6/storage/wizard/NodeIdentities.js +++ b/www/manager6/storage/wizard/NodeIdentities.js @@ -1,7 +1,7 @@ Ext.define('pve-san-node-identity', { extend: 'Ext.data.Model', idProperty: 'node', - fields: ['node', 'state', 'iscsi-initiator-name'], + fields: ['node', 'state', 'iscsi-initiator-name', 'nvme-host-nqn'], }); Ext.define('PVE.storage.wizard.NodeIdentities', { @@ -10,21 +10,8 @@ Ext.define('PVE.storage.wizard.NodeIdentities', { height: 220, disableSelection: true, viewConfig: { enableTextSelection: true }, - columns: [ - { text: gettext('Node'), dataIndex: 'node', width: 100, renderer: Ext.htmlEncode }, - { - text: gettext('State'), - dataIndex: 'state', - width: 175, - renderer: PVE.SANUtils.renderState, - }, - { - text: gettext('Initiator Name'), - dataIndex: 'iscsi-initiator-name', - flex: 1, - renderer: Ext.htmlEncode, - }, - ], + + identity: 'iscsi-initiator-name', // Lists only the given nodes, or all nodes for none, which Copy then follows. setNodes: function (nodes) { @@ -39,6 +26,24 @@ Ext.define('PVE.storage.wizard.NodeIdentities', { initComponent: function () { let me = this; + let nvme = me.identity === 'nvme-host-nqn'; + me.columns = [ + { text: gettext('Node'), dataIndex: 'node', width: 100, renderer: Ext.htmlEncode }, + { + text: gettext('State'), + dataIndex: 'state', + width: 175, + renderer: PVE.SANUtils.renderState, + // the state of multipathd, which NVMe does not use + hidden: nvme, + }, + { + text: nvme ? gettext('Host NQN') : gettext('Initiator Name'), + dataIndex: me.identity, + flex: 1, + renderer: Ext.htmlEncode, + }, + ]; me.rstore = Ext.create('Proxmox.data.UpdateStore', { storeid: 'san-wizard-identities', model: 'pve-san-node-identity', @@ -67,17 +72,19 @@ Ext.define('PVE.storage.wizard.NodeIdentities', { me.tbar = [ { xtype: 'tbtext', - text: gettext('Allow the initiator names of the nodes that will use the target.'), + text: nvme + ? gettext('Allow the host NQNs of the nodes that will use the target.') + : gettext('Allow the initiator names of the nodes that will use the target.'), }, '->', { - text: gettext('Copy Initiator Names'), + text: nvme ? gettext('Copy Host NQNs') : gettext('Copy Initiator Names'), iconCls: 'fa fa-clipboard', handler: () => PVE.Utils.copyToClipboard( me.store .getRange() - .map((rec) => rec.get('iscsi-initiator-name')) + .map((rec) => rec.get(me.identity)) .filter(Boolean) .join('\n'), ), diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/Target.js similarity index 61% rename from www/manager6/storage/wizard/IScsi.js rename to www/manager6/storage/wizard/Target.js index d23cf3bb2..3fd0912fd 100644 --- a/www/manager6/storage/wizard/IScsi.js +++ b/www/manager6/storage/wizard/Target.js @@ -1,13 +1,14 @@ -Ext.define('PVE.storage.wizard.IScsiTarget', { +Ext.define('PVE.storage.wizard.Target', { extend: 'Proxmox.panel.InputPanel', - xtype: 'pveStorageWizardIScsiTarget', - onlineHelp: 'storage_open_iscsi', + xtype: 'pveStorageWizardTarget', + + storageType: 'iscsi', updateConnectionField: function () { let me = this; let target = me.down('field[name=target]').getValue(); let storage = me.storages?.find( - (entry) => entry.type === 'iscsi' && entry.target === target, + (entry) => entry.type === me.storageType && entry[me.targetKey] === target, ); let field = me.down('field[name=connection]'); if (storage) { @@ -20,16 +21,20 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { onSubmit: function () { let me = this; + let nvme = me.storageType === 'nvmeof'; let wizard = me.up('window'); let values = me.getValues(); - let params = { - type: 'iscsi', - storage: values.connection, - portal: values.portal, - target: values.target, - content: 'none', - 'managed-multipath': 1, - }; + let params = { type: me.storageType, storage: values.connection, content: 'none' }; + if (nvme) { + params.subsysnqn = values.target; + params.portals = values.portals; + } else { + Object.assign(params, { + portal: values.portal, + target: values.target, + 'managed-multipath': 1, + }); + } let nodes = [] .concat(values.nodes || []) .filter(Boolean) @@ -61,29 +66,41 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { } me.storages = response.result.data; me.updateConnectionField(); - let users = me.storages.filter((entry) => entry.target === values.target); + let users = me.storages.filter((entry) => entry[me.targetKey] === values.target); if (users.length) { let base = users[0]; let conflict; if (users.length !== 1) { conflict = Ext.String.format( - gettext( - 'Storages {0} use this target. The setup can only reuse a target that one storage uses.', - ), + nvme + ? gettext( + 'Storages {0} use this subsystem. The setup can only reuse a subsystem that one storage uses.', + ) + : gettext( + 'Storages {0} use this target. The setup can only reuse a target that one storage uses.', + ), users.map((entry) => entry.storage).join(', '), ); - } else if (base.type !== 'iscsi') { + } else if (base.type !== me.storageType) { conflict = Ext.String.format( - gettext( - 'Storage "{0}" uses this target. The setup can only reuse an iSCSI storage.', - ), + nvme + ? gettext( + 'Storage "{0}" uses this subsystem. The setup can only reuse an NVMe over Fabrics storage.', + ) + : gettext( + 'Storage "{0}" uses this target. The setup can only reuse an iSCSI storage.', + ), base.storage, ); } else if (`${base.content ?? ''}` !== 'none') { conflict = Ext.String.format( - gettext( - 'Storage "{0}" uses the LUNs of this target directly. If no guest uses them, clear Use LUNs directly in its edit dialog, otherwise use another target.', - ), + nvme + ? gettext( + 'Storage "{0}" uses the namespaces of this subsystem directly. If no guest uses them, clear Use namespaces directly in its edit dialog, otherwise use another subsystem.', + ) + : gettext( + 'Storage "{0}" uses the LUNs of this target directly. If no guest uses them, clear Use LUNs directly in its edit dialog, otherwise use another target.', + ), base.storage, ); } @@ -95,9 +112,13 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { wizard.showError( Ext.htmlEncode( Ext.String.format( - gettext( - 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.', - ), + nvme + ? gettext( + 'Storage "{0}" connects to this subsystem, but it is disabled. Enable that storage first.', + ) + : gettext( + 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.', + ), base.storage, ), ), @@ -133,10 +154,10 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { } let connection = { storage: base.storage, - target: base.target, + target: values.target, nodes: selectedNodes.join(','), }; - if (!base['managed-multipath']) { + if (!nvme && !base['managed-multipath']) { wizard.showError( Ext.htmlEncode( Ext.String.format( @@ -159,7 +180,7 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { waitMsgTarget: wizard, failure: fail, success: () => - connected({ storage: params.storage, target: params.target, nodes }), + connected({ storage: params.storage, target: values.target, nodes }), }); }, }); @@ -167,6 +188,10 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { initComponent: function () { let me = this; + let nvme = me.storageType === 'nvmeof'; + me.targetKey = nvme ? 'subsysnqn' : 'target'; + me.onlineHelp = nvme ? 'storage_nvmeof' : 'storage_open_iscsi'; + let targetLabel = nvme ? gettext('Subsystem') : gettext('Target'); let common = PVE.panel.StorageBase.commonFields(true); // wide enough for the longest label of the step let labelWidth = 150; @@ -174,7 +199,7 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { { xtype: 'textfield', name: 'portal', - fieldLabel: gettext('Portal'), + fieldLabel: nvme ? gettext('Discovery Portal') : gettext('Portal'), labelWidth, allowBlank: false, listeners: { @@ -190,33 +215,54 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { }, }, { - xtype: 'pveIScsiScan', + xtype: nvme ? 'pveNVMeOFScan' : 'pveIScsiScan', name: 'target', - fieldLabel: gettext('Target'), + fieldLabel: targetLabel, labelWidth, disabled: true, showNodeSelector: false, nodename: Proxmox.NodeName, - listeners: { change: () => me.updateConnectionField() }, + listeners: { + change: function (field, value) { + me.updateConnectionField(); + let rec = nvme + ? field.getStore().findRecord('subsysnqn', value, 0, false, true, true) + : undefined; + if (rec) { + me.down('field[name=portals]').setValue(rec.get('portals')); + } + }, + }, listConfig: { width: 650, - emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')), + emptyText: PVE.Utils.renderNotFound(targetLabel), columns: [ { - text: gettext('Target'), - dataIndex: 'target', + text: targetLabel, + dataIndex: me.targetKey, flex: 1, renderer: Ext.htmlEncode, }, { text: gettext('Portals'), - dataIndex: 'portal', + dataIndex: nvme ? 'portals' : 'portal', width: 220, renderer: Ext.htmlEncode, }, ], }, }, + ...(nvme + ? [ + { + xtype: 'textfield', + name: 'portals', + fieldLabel: gettext('Portals'), + labelWidth, + allowBlank: false, + }, + ] + : []), { ...common.id, name: 'connection', @@ -227,12 +273,19 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { xtype: 'component', margin: '0 0 10 0', html: `${Ext.htmlEncode(gettext('Note:'))} ${Ext.htmlEncode( - gettext( - 'Next creates or reuses the connection storage before you select a LUN.', - ), + nvme + ? gettext( + 'Next creates or reuses the connection storage before you select a namespace.', + ) + : gettext( + 'Next creates or reuses the connection storage before you select a LUN.', + ), )}`, }, - { xtype: 'pveStorageWizardNodeIdentities' }, + { + xtype: 'pveStorageWizardNodeIdentities', + identity: nvme ? 'nvme-host-nqn' : 'iscsi-initiator-name', + }, ]; me.advancedItems = [ { @@ -267,8 +320,10 @@ Ext.define('PVE.storage.wizard.IScsiTarget', { }, }); -PVE.storage.wizard.createIScsiLVM = function (wizard, values, lun) { +PVE.storage.wizard.createLVMOnBase = function (wizard, values, lun) { let connection = wizard.connection; + let suffix = + wizard.wizardType === 'nvmeof' ? `:nvme-${lun.wwid}` : `.dm-uuid-mpath-${lun.wwid}`; let fail = (response) => wizard.showError(response.htmlStatus); Proxmox.Utils.API2Request({ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`, @@ -280,14 +335,16 @@ PVE.storage.wizard.createIScsiLVM = function (wizard, values, lun) { if (wizard.destroyed) { return; } - let volume = response.result.data.find((entry) => - entry.volid.endsWith(`.dm-uuid-mpath-${lun.wwid}`), - ); + let volume = response.result.data.find((entry) => entry.volid.endsWith(suffix)); if (!volume) { wizard.showError( - gettext( - 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.', - ), + wizard.wizardType === 'nvmeof' + ? gettext( + 'The selected namespace is not available yet. Check Node > SAN, then retry.', + ) + : gettext( + 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.', + ), ); return; } diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js index bfcc5a6cb..485641bac 100644 --- a/www/manager6/storage/wizard/Wizard.js +++ b/www/manager6/storage/wizard/Wizard.js @@ -138,6 +138,7 @@ Ext.define('PVE.storage.wizard.SAN', { storage: values.storage, nodes: params.nodes, fc: me.wizardType === 'fc', + nvme: me.wizardType === 'nvmeof', autoShow: true, }); }, @@ -146,6 +147,9 @@ Ext.define('PVE.storage.wizard.SAN', { multipathSummary: function (lun) { let me = this; + if (me.wizardType === 'nvmeof') { + return PVE.SANUtils.multipathText('native'); + } // an explicit entry takes precedence, also for a LUN of the connection storage if (lun.multipath === 'manual') { return PVE.SANUtils.multipathText('manual'); @@ -191,23 +195,24 @@ Ext.define('PVE.storage.wizard.SAN', { if (me.wizardType === 'fc') { PVE.storage.wizard.createFC(me, values, lun); } else { - PVE.storage.wizard.createIScsiLVM(me, values, lun); + PVE.storage.wizard.createLVMOnBase(me, values, lun); } }, initComponent: function () { let me = this; - if (!['iscsi', 'fc'].includes(me.wizardType)) { + if (!['iscsi', 'fc', 'nvmeof'].includes(me.wizardType)) { throw 'no SAN storage type specified'; } - let iscsi = me.wizardType === 'iscsi'; + let fc = me.wizardType === 'fc'; me.subject = PVE.storage.wizard.subject(me.wizardType); me.title = Proxmox.Utils.dialog_title(me.subject, true, true); + let onlineHelp = me.wizardType === 'nvmeof' ? 'storage_nvmeof' : 'storage_multipath'; let common = PVE.panel.StorageBase.commonFields(true); let settings = { xtype: 'inputpanel', title: gettext('Volume Group'), - onlineHelp: 'storage_multipath', + onlineHelp, items: [ { ...common.id, fieldLabel: gettext('Storage ID') }, { @@ -220,35 +225,37 @@ Ext.define('PVE.storage.wizard.SAN', { PVE.panel.StorageBase.volumeChainField(true, 'lvm'), ], }; - if (!iscsi) { + if (fc) { settings.advancedItems = [ { ...common.nodes, validator: PVE.storage.wizard.validateNodes }, ]; } me.items = [ - ...(iscsi - ? [ + ...(fc + ? [] + : [ { - xtype: 'pveStorageWizardIScsiTarget', + xtype: 'pveStorageWizardTarget', title: gettext('Target'), itemId: 'target', + storageType: me.wizardType, }, - ] - : []), + ]), { xtype: 'pveStorageWizardLunSelect', - title: 'LUN', + title: me.wizardType === 'nvmeof' ? gettext('Namespace') : 'LUN', itemId: 'luns', - onlineHelp: 'storage_multipath', + nvme: me.wizardType === 'nvmeof', + onlineHelp, // the nodes only see a newly mapped Fibre Channel LUN after a rescan - rescanNote: iscsi - ? undefined - : Ext.String.format( + rescanNote: fc + ? Ext.String.format( gettext( 'After mapping a new LUN on the array, rescan the Fibre Channel hosts of each node (documentation).', ), Ext.htmlEncode(Proxmox.Utils.get_help_link('storage_multipath')), - ), + ) + : undefined, }, settings, { @@ -283,14 +290,14 @@ Ext.define('PVE.storage.wizard.SAN', { me.callParent(); let tabs = me.down('#wizcontent'); tabs.on('tabchange', function (tp, tab) { - if (iscsi && tab === me.down('#luns')) { + if (!fc && tab === me.down('#luns')) { me.down('#back').disable(); } me.down('#submit').setText( tab === me.down('#target') ? gettext('Next') : gettext('Finish'), ); }); - if (iscsi) { + if (!fc) { me.down('#submit').setText(gettext('Next')); } me.on('destroy', () => me.reloadCallback?.()); diff --git a/www/manager6/window/SANLunState.js b/www/manager6/window/SANLunState.js index 6215f8e57..6cdcdce2d 100644 --- a/www/manager6/window/SANLunState.js +++ b/www/manager6/window/SANLunState.js @@ -19,7 +19,10 @@ Ext.define('PVE.window.SANLunState', { if (!me.wwid || !me.storage) { throw 'no LUN or storage specified'; } - me.title = Ext.String.format(gettext('Storage {0}: LUN State'), me.storage); + me.title = Ext.String.format( + me.nvme ? gettext('Storage {0}: Namespace State') : gettext('Storage {0}: LUN State'), + me.storage, + ); // The other nodes set up a new LUN with their next status updates. let pendingUntil = Date.now() + 60000; let rstore = Ext.create('Proxmox.data.UpdateStore', { @@ -55,13 +58,17 @@ Ext.define('PVE.window.SANLunState', { margin: '0 0 10 0', html: Ext.htmlEncode( Ext.String.format( - me.fc + me.nvme ? gettext( - 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array and rescan its Fibre Channel hosts.', + 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the namespace on the array.', ) - : gettext( - 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.', - ), + : me.fc + ? gettext( + 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array and rescan its Fibre Channel hosts.', + ) + : gettext( + 'Storage "{0}" was added. Guests on this storage cannot run on a node that stays on "Missing": check its access to the LUN on the array.', + ), me.storage, ), ), @@ -71,7 +78,9 @@ Ext.define('PVE.window.SANLunState', { flex: 1, store, disableSelection: true, - emptyText: gettext('No node reported this LUN yet.'), + emptyText: me.nvme + ? gettext('No node reported this namespace yet.') + : gettext('No node reported this LUN yet.'), columns: [ { text: gettext('Node'),