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 8F6821FF0ED for ; Fri, 31 Jul 2026 12:31:04 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 7984321575; Fri, 31 Jul 2026 12:30:53 +0200 (CEST) From: Dietmar Maurer To: pve-devel@lists.proxmox.com Subject: [RFC pve-manager 21/27] ui: storage wizard: add ZFS over iSCSI support Date: Fri, 31 Jul 2026 12:21:50 +0200 Message-ID: <20260731102156.3947857-22-dietmar@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260731102156.3947857-1-dietmar@proxmox.com> References: <20260731102156.3947857-1-dietmar@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 2 AWL -0.134 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) KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: RRXYZVS6HRH24CCQDXZYBR5PJMDMPBG3 X-Message-ID-Hash: RRXYZVS6HRH24CCQDXZYBR5PJMDMPBG3 X-MailFrom: dietmar@zilli.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: 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 --- www/manager6/Makefile | 1 + www/manager6/storage/wizard/ZFSOverISCSI.js | 162 ++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 www/manager6/storage/wizard/ZFSOverISCSI.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index 4a413d56..532d4d55 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -383,6 +383,7 @@ JSSRC= \ storage/wizard/CIFS.js \ storage/wizard/IScsi.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 00000000..579720a8 --- /dev/null +++ b/www/manager6/storage/wizard/ZFSOverISCSI.js @@ -0,0 +1,162 @@ +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, + }, + { + 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', + userCls: 'pmx-hint', + value: gettext( + 'The ZFS appliance is managed over SSH, which requires passwordless root access from all nodes.', + ), + }, + ], +}); + +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, + }, + }, + steps: () => [ + { + xtype: 'pveStorageWizardZFSOverISCSIAppliance', + title: gettext('Appliance'), + }, + { + xtype: 'pveStorageWizardZFSOverISCSIVolume', + title: gettext('Volume Settings'), + }, + ], + settings: { + onlineHelp: 'storage_zfs', + fixedContent: 'images', + }, +}; -- 2.47.3