From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 860121FF0B3 for ; Thu, 26 Nov 2026 16:13:42 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 311A2217D5; Thu, 26 Nov 2026 16:13:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neatech-ar.20260707.gappssmtp.com; s=20260707; t=1795705870; x=1796310670; darn=lists.proxmox.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eaVTWhGHCYKLPyY4zHDfOD7iqGCWobHd7r574xXPvqM=; b=sk7JpvXZKuY3+KeCvJzcQg6N3tzXwMoZrBJGF95Z6jmnFCqfiJZmeXy5SBuuEmjKj9 JlKfimuMz8hu6+f5oSdI4pb5P4iJKZEP2xxaAADVmXRXQVM7TzRNhZT9omvdkzLwM3Cl QU3Z4Z/5QloAdpT+j5aRkFieirtpzJ0Lei8xSHVNoJtfvXuZn4UrhMVZeEwMBlf5BHZq 14XFFYqLM/PuAY8HOwenCnCsDklAMhz2h3/pa4FO21Q5hCWmXPzahVCF1FXgcgx0P2AR yFf+V6SKL0b6qqVwCW3PlUgBtD+We5Wk8Aj4buKYDKJUiGukJKMsEPRIr6mmsjsvuERs KY2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795705870; x=1796310670; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=eaVTWhGHCYKLPyY4zHDfOD7iqGCWobHd7r574xXPvqM=; b=PVGNMCpQCsXIAbPWOQU8eFFnmntldmJfDJrFvTpwvniWAQCchMIpaLZKGPSH83H5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WrpwHwMkgzncEW8J9qi7gga2mnspfIchh1O QwnT/ULC3tNPnbjPosRWDrGGVVm4tc6oiZe8jrGTeUjUP1ip5PBs= X-Received: by 2002:a05:6122:3a19:b0:5ea:c3bc:c584 with SMTP id 71dfb90a1353d-5ee8ade9b2bmr17616132e0c.1.1795705869823; Thu, 26 Nov 2026 07:11:09 -0800 (PST) From: Joaquin Varela To: pve-devel@lists.proxmox.com Subject: [PATCH manager v5] ui: storage: add ZFS over NVMe/TCP editor Date: Thu, 26 Nov 2026 12:11:01 -0300 Message-ID: <20261126151101.310863-1-joaquinvarela@neatech.ar> X-Mailer: git-send-email 2.54.0.windows.1 In-Reply-To: <20261126150956.310593-1-joaquinvarela@neatech.ar> References: <20261126150956.310593-1-joaquinvarela@neatech.ar> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.205 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DMARC_PASS -0.1 DMARC pass policy RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no 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: RUS673LWKSN4MDRY3CJYNO5ROFR63MDK X-Message-ID-Hash: RUS673LWKSN4MDRY3CJYNO5ROFR63MDK X-MailFrom: joaquinvarela@neatech.ar 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 input panel for the zfsnvme storage type and list it under SAN in the Add dialog, with the subsystem NQN as its target. The pool, block size and thin provision fields are those of ZFS over iSCSI. Timeouts, I/O queues and the I/O policy use the plugin default when left empty. Fixed properties are read-only when editing, host NQNs can only be added and the DH-HMAC-CHAP key is only requested on creation, as the plugin cannot rotate it. The help button needs a pve-doc-generator with the storage_zfsnvme section of the admin guide to generate OnlineHelpInfo.js. Signed-off-by: Joaquin Varela --- www/manager6/Makefile | 1 + www/manager6/Utils.js | 6 + www/manager6/dc/StorageView.js | 8 + www/manager6/storage/ZFSNVMeEdit.js | 220 ++++++++++++++++++++++++++++ 4 files changed, 235 insertions(+) create mode 100644 www/manager6/storage/ZFSNVMeEdit.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index cdf222a2..b5c0f40e 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -389,6 +389,7 @@ JSSRC= \ storage/TemplateView.js \ storage/AddWizard.js \ storage/ZFSEdit.js \ + storage/ZFSNVMeEdit.js \ storage/ZFSPoolEdit.js \ storage/ESXIEdit.js \ storage/wizard/Wizard.js \ diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index fc3667f5..ae7079a7 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -924,6 +924,12 @@ Ext.define('PVE.Utils', { faIcon: 'building', backups: false, }, + zfsnvme: { + name: 'ZFS over NVMe/TCP', + ipanel: 'ZFSNVMeInputPanel', + faIcon: 'building', + backups: false, + }, zfspool: { name: 'ZFS', ipanel: 'ZFSPoolInputPanel', diff --git a/www/manager6/dc/StorageView.js b/www/manager6/dc/StorageView.js index 7f7d8bd0..11042236 100644 --- a/www/manager6/dc/StorageView.js +++ b/www/manager6/dc/StorageView.js @@ -78,6 +78,7 @@ Ext.define( case 'zfspool': return pool; case 'nvmeof': + case 'zfsnvme': return subsysnqn; default: return target || path; @@ -224,6 +225,13 @@ Ext.define( ), 'lun target', ], + zfsnvme: [ + 'san', + gettext( + 'Guest disks as ZFS volumes on a storage server that exports them over NVMe/TCP.', + ), + 'nvme tcp target subsystem', + ], nfs: ['network', gettext('Mount an NFS export.'), 'nas share'], cifs: ['network', gettext('Mount an SMB/CIFS share.'), 'nas samba windows'], pbs: [ diff --git a/www/manager6/storage/ZFSNVMeEdit.js b/www/manager6/storage/ZFSNVMeEdit.js new file mode 100644 index 00000000..5c5c1e45 --- /dev/null +++ b/www/manager6/storage/ZFSNVMeEdit.js @@ -0,0 +1,220 @@ +Ext.define('PVE.storage.ZFSNVMeInputPanel', { + extend: 'PVE.panel.StorageBase', + + onlineHelp: 'storage_zfsnvme', + + onGetValues: function (values) { + if (this.isCreate) { + values.content = 'images'; + } + return this.callParent([values]); + }, + + initComponent: function () { + let me = this; + + // the pool, block size and thin provision fields are those of ZFS over iSCSI + let zfs = PVE.storage.ZFSInputPanel.fields(me.isCreate); + + let defaultCtrlLossTmo = 600; + + let splitList = (value) => + (value || '') + .split(',') + .map((item) => item.trim()) + .filter((item) => item !== ''); + + // properties that are fixed after creation are read-only when editing + let fixedText = (config) => ({ + xtype: me.isCreate ? 'textfield' : 'displayfield', + value: '', + allowBlank: false, + allowOnlyWhitespace: false, + ...config, + }); + + // left empty, the plugin default applies and nothing is stored + let optionalInt = (config) => ({ + xtype: 'proxmoxintegerfield', + allowBlank: true, + deleteEmpty: !me.isCreate, + ...config, + }); + + me.column1 = [ + fixedText({ + name: 'server', + fieldLabel: gettext('SSH Server'), + emptyText: gettext('IP address or hostname'), + }), + { ...zfs.pool, allowOnlyWhitespace: false, emptyText: 'tank/pve-nvme' }, + { ...zfs.blocksize, value: '16k' }, + zfs.sparse, + ]; + + me.column2 = [ + { + xtype: 'textfield', + name: 'nvme-host-ifaces', + fieldLabel: gettext('Host Interfaces'), + emptyText: 'ens1f0,ens1f1', + allowBlank: false, + allowOnlyWhitespace: false, + }, + // The plugin cannot rotate the key. It is asked for on creation, never shown and never + // sent again, so that editing keeps it. + me.isCreate + ? { + xtype: 'textfield', + inputType: 'password', + name: 'dhchap-key', + fieldLabel: gettext('DH-HMAC-CHAP Key'), + emptyText: 'DHHC-1:xx:...:', + regex: /^DHHC-1:0[0-3]:[A-Za-z0-9+/]+={0,2}:$/, + regexText: gettext('Expected format: DHHC-1:xx:...:'), + allowBlank: false, + } + : { + xtype: 'displayfield', + fieldLabel: gettext('DH-HMAC-CHAP Key'), + value: gettext('Unchanged (rotation not supported)'), + }, + ]; + + // NQNs and portal lists are longer than a column is wide + me.columnB = [ + fixedText({ + name: 'subsysnqn', + fieldLabel: gettext('Subsystem NQN'), + emptyText: 'nqn.2026-01.com.example:pve-nvme', + // an NQN wraps best at the line end, not at its first hyphen + fieldStyle: 'word-break: break-all;', + }), + fixedText({ + name: 'nvme-portals', + fieldLabel: gettext('NVMe/TCP Portals'), + emptyText: '192.0.2.10,198.51.100.10', + fieldStyle: 'word-break: break-all;', + }), + { + xtype: 'textfield', + name: 'nvme-host-nqns', + fieldLabel: gettext('Allowed Host NQNs'), + emptyText: 'nqn.2014-08.org.nvmexpress:uuid:...', + allowBlank: false, + allowOnlyWhitespace: false, + validator: function (value) { + // the backend refuses to drop a host NQN from an existing storage + let current = splitList(value); + let removed = splitList(this.originalValue).filter( + (hostnqn) => !current.includes(hostnqn), + ); + if (removed.length) { + return Ext.String.format( + gettext('Host NQN {0} cannot be removed from an existing storage'), + Ext.htmlEncode(removed[0]), + ); + } + return true; + }, + }, + { + xtype: 'displayfield', + userCls: 'pmx-hint', + value: gettext( + 'List /etc/nvme/hostnqn from every allowed cluster node. Host interface names are matched to portals by position and must exist on every selected node.', + ), + }, + ]; + + if (!me.isCreate) { + me.columnB.push({ + xtype: 'displayfield', + userCls: 'pmx-hint', + value: gettext( + 'Host NQNs can only be added. Revoking a host requires a new storage with a new key.', + ), + }); + } + + me.advancedColumn1 = [ + { + xtype: 'proxmoxKVComboBox', + name: 'nvme-iopolicy', + value: '__default__', + deleteEmpty: !me.isCreate, + fieldLabel: gettext('I/O Policy'), + comboItems: [ + ['__default__', `${Proxmox.Utils.defaultText} (round-robin)`], + ['round-robin', 'round-robin'], + ['queue-depth', 'queue-depth'], + ['numa', 'numa'], + ], + }, + optionalInt({ + name: 'nvme-keep-alive-tmo', + minValue: 1, + maxValue: 120, + fieldLabel: gettext('Keep Alive Timeout (s)'), + emptyText: `${Proxmox.Utils.defaultText} (5)`, + }), + optionalInt({ + name: 'nvme-reconnect-delay', + minValue: 1, + maxValue: 120, + fieldLabel: gettext('Reconnect Delay (s)'), + emptyText: `${Proxmox.Utils.defaultText} (2)`, + }), + optionalInt({ + name: 'nvme-nr-io-queues', + minValue: 1, + maxValue: 1024, + fieldLabel: gettext('I/O Queues'), + emptyText: Proxmox.Utils.defaultText, + }), + ]; + + me.advancedColumn2 = [ + optionalInt({ + name: 'nvme-ctrl-loss-tmo', + minValue: -1, + maxValue: 86400, + fieldLabel: gettext('Controller Loss Timeout (s)'), + emptyText: `${Proxmox.Utils.defaultText} (${defaultCtrlLossTmo})`, + listeners: { + change: () => me.down('field[name=nvme-fast-io-fail-tmo]')?.validate(), + }, + }), + optionalInt({ + name: 'nvme-fast-io-fail-tmo', + minValue: 0, + maxValue: 86400, + fieldLabel: gettext('Fast I/O Fail Timeout (s)'), + emptyText: gettext('Off'), + validator: (value) => { + let ctrlLossTmo = + me.down('field[name=nvme-ctrl-loss-tmo]')?.getValue() ?? defaultCtrlLossTmo; + if (value === '' || ctrlLossTmo < 0) { + return true; + } + return ( + Number(value) <= ctrlLossTmo || + gettext('Must not exceed the Controller Loss Timeout') + ); + }, + }), + ]; + + me.advancedColumnB = [ + { + xtype: 'displayfield', + userCls: 'pmx-hint', + value: gettext( + 'A Controller Loss Timeout of -1 retries forever. Leave Fast I/O Fail Timeout empty to queue I/O until the controller is lost.', + ), + }, + ]; + + me.callParent(); + }, +}); base-commit: 16611a25c07c72dccb65c1b95f52c2b847aa6b4b -- 2.54.0.windows.1