From: Joaquin Varela <joaquinvarela@neatech.ar>
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 [thread overview]
Message-ID: <20261126151101.310863-1-joaquinvarela@neatech.ar> (raw)
In-Reply-To: <20261126150956.310593-1-joaquinvarela@neatech.ar>
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 <joaquinvarela@neatech.ar>
---
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
prev parent reply other threads:[~2026-11-26 15:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 15:09 [PATCH storage v5 00/13] add ZFS over NVMe/TCP storage plugin Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 01/13] zfsnvme: add target state parsing and planning Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 02/13] zfsnvme: add the target transactions Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 03/13] zfsnvme: add storage configuration and volume methods Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 04/13] zfsnvme: connect the nodes and register the plugin Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 05/13] api: san luns: count zfsnvme storages as owners of their subsystem Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 06/13] api: config: check the cluster version before the first zfsnvme storage Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 07/13] test: zfsnvme: add configuration and volume tests Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 08/13] test: zfsnvme: add node side tests Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 09/13] test: zfsnvme: add an in-memory nvmet target Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 10/13] test: zfsnvme: test the target parsers and planners Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 11/13] test: zfsnvme: test the target flows Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 12/13] test: zfsnvme: add a fault sweep, renderer and taint tests Joaquin Varela
2026-11-26 15:09 ` [PATCH storage v5 13/13] zfsnvme: wait up to 30 seconds for the shared storage lock Joaquin Varela
2026-11-26 15:10 ` [PATCH docs v5] storage: document ZFS over NVMe/TCP Joaquin Varela
2026-11-26 15:11 ` Joaquin Varela [this message]
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=20261126151101.310863-1-joaquinvarela@neatech.ar \
--to=joaquinvarela@neatech.ar \
--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