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 E30FD1FF0AF for ; Fri, 06 Nov 2026 01:56:34 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C00EF21C53; Fri, 06 Nov 2026 01:51:15 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH v3 manager 55/76] ui: storage wizard: add ZFS over iSCSI support Date: Fri, 6 Nov 2026 00:31:30 +0100 Message-ID: <20261105233336.2178064-56-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261105233336.2178064-1-t.lamprecht@proxmox.com> References: <20261105233336.2178064-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: 1793926181270 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.310 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: XCVUJ5DMLPNEJFDEQCENB7O35ZFUZ6GT X-Message-ID-Hash: XCVUJ5DMLPNEJFDEQCENB7O35ZFUZ6GT 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: From: Dietmar Maurer There is no scan API for this SSH-based storage type, so the wizard splits the existing single dialog into an appliance connection step, showing only the fields relevant for the selected iSCSI provider, and a volume settings step. Signed-off-by: Dietmar Maurer [TL: show the write cache positively and only for the providers that have the option; name the SSH key the appliance is managed with] Signed-off-by: Thomas Lamprecht --- www/manager6/Makefile | 1 + www/manager6/storage/wizard/ZFSOverISCSI.js | 180 ++++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 www/manager6/storage/wizard/ZFSOverISCSI.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index 602e3b9b9..b60cfa569 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -385,6 +385,7 @@ JSSRC= \ storage/wizard/NFS.js \ storage/wizard/CIFS.js \ storage/wizard/FibreChannel.js \ + storage/wizard/ZFSOverISCSI.js \ Workspace.js \ # end of JSSRC list diff --git a/www/manager6/storage/wizard/ZFSOverISCSI.js b/www/manager6/storage/wizard/ZFSOverISCSI.js new file mode 100644 index 000000000..c891aa7ea --- /dev/null +++ b/www/manager6/storage/wizard/ZFSOverISCSI.js @@ -0,0 +1,180 @@ +Ext.define('PVE.storage.wizard.ZFSOverISCSIAppliance', { + extend: 'Proxmox.panel.InputPanel', + xtype: 'pveStorageWizardZFSOverISCSIAppliance', + + onlineHelp: 'storage_zfs', + + column1: [ + { + xtype: 'pveiScsiProviderSelector', + name: 'iscsiprovider', + value: 'comstar', + fieldLabel: gettext('iSCSI Provider'), + allowBlank: false, + listeners: { + change: function (f, value) { + let vm = this.up('window').getViewModel(); + vm.set('isLIO', value === 'LIO'); + vm.set('isComstar', value === 'comstar'); + vm.set('hasWriteCacheOption', value === 'comstar' || value === 'istgt'); + }, + }, + }, + { + xtype: 'textfield', + name: 'portal', + fieldLabel: gettext('Portal'), + allowBlank: false, + bind: { value: '{portal}' }, + }, + { + xtype: 'textfield', + name: 'target', + fieldLabel: gettext('Target'), + allowBlank: false, + }, + ], + + column2: [ + { + xtype: 'textfield', + name: 'comstar_tg', + fieldLabel: gettext('Target group'), + allowBlank: true, + bind: { + disabled: '{!isComstar}', + hidden: '{!isComstar}', + }, + }, + { + xtype: 'textfield', + name: 'comstar_hg', + fieldLabel: gettext('Host group'), + allowBlank: true, + bind: { + disabled: '{!isComstar}', + hidden: '{!isComstar}', + }, + }, + { + xtype: 'textfield', + name: 'lio_tpg', + fieldLabel: gettext('Target portal group'), + allowBlank: false, + disabled: true, + hidden: true, + bind: { + disabled: '{!isLIO}', + hidden: '{!isLIO}', + }, + }, + ], + + columnB: [ + { + xtype: 'displayfield', + bind: { value: '{sshKeyText}' }, + }, + ], +}); + +Ext.define('PVE.storage.wizard.ZFSOverISCSIVolume', { + extend: 'Proxmox.panel.InputPanel', + xtype: 'pveStorageWizardZFSOverISCSIVolume', + + onlineHelp: 'storage_zfs', + + onGetValues: function (values) { + values.nowritecache = values.writecache ? 0 : 1; + delete values.writecache; + return values; + }, + + column1: [ + { + xtype: 'textfield', + name: 'pool', + fieldLabel: gettext('Pool'), + allowBlank: false, + }, + { + xtype: 'textfield', + name: 'blocksize', + value: '4k', + fieldLabel: gettext('Block Size'), + allowBlank: false, + validator: PVE.Utils.validateZfsBlocksize, + }, + ], + + column2: [ + { + xtype: 'proxmoxcheckbox', + name: 'sparse', + checked: false, + uncheckedValue: 0, + fieldLabel: gettext('Thin provision'), + }, + { + xtype: 'proxmoxcheckbox', + name: 'writecache', + checked: true, + uncheckedValue: 0, + fieldLabel: gettext('Write cache'), + bind: { + disabled: '{!hasWriteCacheOption}', + hidden: '{!hasWriteCacheOption}', + }, + }, + ], +}); + +PVE.storage.wizard.types['zfs-over-iscsi'] = { + text: gettext('ZFS over iSCSI'), + description: gettext( + 'ZFS storage appliance managed over SSH, exporting volumes via iSCSI with snapshot support.', + ), + group: 'san', + apiType: 'zfs', + viewModel: { + data: { + isLIO: false, + isComstar: true, + hasWriteCacheOption: true, + portal: '', + }, + formulas: { + sshKeyText: (get) => + Ext.htmlEncode( + Ext.String.format( + gettext( + 'The appliance is managed as root over SSH. The private key must be stored in {0}, and the appliance must accept its public key.', + ), + `/etc/pve/priv/zfs/${get('portal') || ''}_id_rsa`, + ), + ), + }, + }, + steps: () => [ + { + xtype: 'pveStorageWizardZFSOverISCSIAppliance', + title: gettext('Appliance'), + }, + { + xtype: 'pveStorageWizardZFSOverISCSIVolume', + title: gettext('Volume Settings'), + }, + ], + settings: { + onlineHelp: 'storage_zfs', + fixedContent: 'images', + }, + summaryFields: { + nowritecache: { + label: gettext('Write cache'), + isBoolean: true, + invert: true, + skip: (values) => !['comstar', 'istgt'].includes(values.iscsiprovider), + }, + }, +}; -- 2.47.3