From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH v6 manager 38/42] ui: dc: san: add a guided setup for shared LVM on iSCSI
Date: Wed, 18 Nov 2026 07:52:55 +0100 [thread overview]
Message-ID: <20261118065302.3033937-39-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20261118065302.3033937-1-t.lamprecht@proxmox.com>
Shared LVM on an iSCSI LUN needs an iSCSI storage with multipath, the
right LUN as base volume and an LVM storage on top, in that order. Add a
guided setup for it to the SAN view: connect to the target, with the
initiator names of all nodes at hand for the access rules of the array,
select a LUN, name the volume group and storage, and confirm.
The setup starts from the SAN view and not from Datacenter > Storage >
Add, as it creates a volume group and up to two storages, while an entry
of the Add menu attaches one storage. Its menu is named Guided Setup, as
in the documentation, so that it is not taken for an Add menu or button.
Continuing from the target step creates or reuses the connection storage
before the confirm step, so the target step says so.
The menu needs Datastore.Allocate. It also needs Datastore.Audit or
Datastore.AllocateSpace, as the setup reads the storage list and the
LUNs of the connection storage.
The LUN list comes from the node serving the web UI, and a LUN that a
storage uses cannot be selected. For a shared storage it matters whether
the other nodes see the LUN as well. So the setup ends with the state of
the LUN on each node of the storage, from the cluster-wide status. Nodes
set up a new LUN with their next status updates, so for the first minute
a node without the LUN shows as pending and not as missing.
Co-authored-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
www/manager6/Makefile | 5 +
www/manager6/dc/SAN.js | 25 +-
www/manager6/storage/wizard/IScsi.js | 274 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 156 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 ++++++
www/manager6/storage/wizard/Wizard.js | 184 ++++++++++++
www/manager6/window/SANLunState.js | 111 +++++++
7 files changed, 837 insertions(+), 1 deletion(-)
create mode 100644 www/manager6/storage/wizard/IScsi.js
create mode 100644 www/manager6/storage/wizard/LunSelect.js
create mode 100644 www/manager6/storage/wizard/NodeIdentities.js
create mode 100644 www/manager6/storage/wizard/Wizard.js
create mode 100644 www/manager6/window/SANLunState.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 4a6c8af72..09a02a9c4 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -137,6 +137,7 @@ JSSRC= \
window/Restore.js \
window/SafeDestroyGuest.js \
window/SafeDestroyStorage.js \
+ window/SANLunState.js \
window/SANLunWipe.js \
window/Settings.js \
window/Snapshot.js \
@@ -385,6 +386,10 @@ JSSRC= \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
storage/ESXIEdit.js \
+ storage/wizard/Wizard.js \
+ storage/wizard/LunSelect.js \
+ storage/wizard/NodeIdentities.js \
+ storage/wizard/IScsi.js \
Workspace.js \
# end of JSSRC list
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index e8d3614f2..9255d2f6a 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -50,9 +50,15 @@ Ext.define('PVE.dc.SANView', {
initComponent: function () {
let me = this;
- let caps = Ext.state.Manager.get('GuiCap').dc;
+ let allCaps = Ext.state.Manager.get('GuiCap');
+ let caps = allCaps.dc;
let canModify = !!caps['Sys.Modify'];
let canEdit = canModify && !!caps['Sys.Audit'];
+ // the setups also read the storage list and the LUNs of the connection storage
+ let storageCaps = allCaps.storage;
+ let canSetup =
+ !!storageCaps['Datastore.Allocate'] &&
+ !!(storageCaps['Datastore.Audit'] || storageCaps['Datastore.AllocateSpace']);
me.rstore = Ext.create('Proxmox.data.UpdateStore', {
storeid: 'dc-san-status',
model: 'pve-san-status',
@@ -105,6 +111,23 @@ Ext.define('PVE.dc.SANView', {
autoShow: true,
apiCallDone: (success) => success && reload(),
});
+ let setupItem = (wizardType) => ({
+ text: PVE.storage.wizard.subject(wizardType),
+ iconCls: 'fa fa-fw fa-building',
+ handler: () =>
+ Ext.create('PVE.storage.wizard.SAN', {
+ wizardType,
+ autoShow: true,
+ reloadCallback: reload,
+ }),
+ });
+ me.tbar = [
+ {
+ text: gettext('Guided Setup'),
+ disabled: !canSetup,
+ menu: [setupItem('iscsi')],
+ },
+ ];
me.items = [
{
xtype: 'grid',
diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/IScsi.js
new file mode 100644
index 000000000..94d914092
--- /dev/null
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -0,0 +1,274 @@
+Ext.define('PVE.storage.wizard.IScsiTarget', {
+ extend: 'Proxmox.panel.InputPanel',
+ xtype: 'pveStorageWizardIScsiTarget',
+ onlineHelp: 'storage_open_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,
+ );
+ let field = me.down('field[name=connection]');
+ if (storage) {
+ field.setValue(storage.storage);
+ } else if (field.readOnly) {
+ field.setValue('');
+ }
+ field.setReadOnly(!!storage);
+ },
+
+ onSubmit: function () {
+ let me = this;
+ 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 nodes = []
+ .concat(values.nodes || [])
+ .filter(Boolean)
+ .join(',');
+ if (nodes) {
+ params.nodes = nodes;
+ }
+ let connected = function (connection) {
+ if (wizard.destroyed) {
+ return;
+ }
+ wizard.connection = connection;
+ // the step does not come back, the cluster status of its initiator names is not needed
+ me.down('pveStorageWizardNodeIdentities').rstore.stopUpdate();
+ let tabs = wizard.down('#wizcontent');
+ wizard.down('#luns').enable();
+ tabs.setActiveTab(wizard.down('#luns'));
+ me.disable();
+ };
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ let users = me.storages.filter((entry) => entry.target === values.target);
+ if (users.length) {
+ let base = users[0];
+ if (
+ users.length !== 1 ||
+ base.type !== 'iscsi' ||
+ `${base.content ?? ''}` !== 'none'
+ ) {
+ wizard.showError(
+ gettext(
+ 'This target is already used by another storage. Check Datacenter > Storage.',
+ ),
+ );
+ return;
+ }
+ if (base.disable) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Storage "{0}" connects to this target, but it is disabled. Enable that storage first.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ let baseNodes = base.nodes ? base.nodes.split(',') : [];
+ if (baseNodes.length && !baseNodes.includes(Proxmox.NodeName)) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Connection storage "{0}" is not available on node "{1}". Open the web UI on one of its nodes.',
+ ),
+ base.storage,
+ Proxmox.NodeName,
+ ),
+ ),
+ );
+ return;
+ }
+ let selectedNodes = nodes ? nodes.split(',') : baseNodes;
+ if (
+ baseNodes.length &&
+ selectedNodes.some((node) => !baseNodes.includes(node))
+ ) {
+ wizard.showError(
+ gettext(
+ 'The connection storage is not available on all selected nodes.',
+ ),
+ );
+ return;
+ }
+ let connection = {
+ storage: base.storage,
+ target: base.target,
+ nodes: selectedNodes.join(','),
+ };
+ if (!base['managed-multipath']) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'Enable Multipath in the edit dialog of storage "{0}" before using it here.',
+ ),
+ base.storage,
+ ),
+ ),
+ );
+ return;
+ }
+ connected(connection);
+ return;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: () =>
+ connected({ storage: params.storage, target: params.target, nodes }),
+ });
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ let common = PVE.panel.StorageBase.commonFields(true);
+ // wide enough for the longest label of the step
+ let labelWidth = 150;
+ me.items = [
+ {
+ xtype: 'textfield',
+ name: 'portal',
+ fieldLabel: gettext('Portal'),
+ labelWidth,
+ allowBlank: false,
+ listeners: {
+ change: {
+ buffer: 500,
+ fn: function (field, value) {
+ let target = me.down('field[name=target]');
+ target.setDisabled(!value);
+ target.setValue('');
+ target.setPortal(value);
+ },
+ },
+ },
+ },
+ {
+ xtype: 'pveIScsiScan',
+ name: 'target',
+ fieldLabel: gettext('Target'),
+ labelWidth,
+ disabled: true,
+ showNodeSelector: false,
+ nodename: Proxmox.NodeName,
+ listeners: { change: () => me.updateConnectionField() },
+ listConfig: {
+ width: 650,
+ emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')),
+ columns: [
+ {
+ text: gettext('Target'),
+ dataIndex: 'target',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Portals'),
+ dataIndex: 'portal',
+ width: 220,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ },
+ {
+ ...common.id,
+ name: 'connection',
+ fieldLabel: gettext('Connection Storage'),
+ labelWidth,
+ },
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: `<span class="pmx-hint">${Ext.htmlEncode(gettext('Note:'))}</span> ${Ext.htmlEncode(
+ gettext(
+ 'Next creates or reuses the connection storage before you select a LUN.',
+ ),
+ )}`,
+ },
+ { xtype: 'pveStorageWizardNodeIdentities' },
+ ];
+ me.advancedItems = [
+ { ...common.nodes, labelWidth, validator: PVE.storage.wizard.validateNodes },
+ ];
+ me.callParent();
+ me.on('afterrender', () =>
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'GET',
+ waitMsgTarget: me,
+ failure: function (response) {
+ if (!me.destroyed) {
+ me.up('window').showError(response.htmlStatus);
+ }
+ },
+ success: function (response) {
+ if (!me.destroyed) {
+ me.storages = response.result.data;
+ me.updateConnectionField();
+ }
+ },
+ }),
+ );
+ },
+});
+
+PVE.storage.wizard.createIScsiLVM = function (wizard, values, lun) {
+ let connection = wizard.connection;
+ let fail = (response) => wizard.showError(response.htmlStatus);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(connection.storage)}/content`,
+ method: 'GET',
+ params: { content: 'images' },
+ waitMsgTarget: wizard,
+ failure: fail,
+ success: function (response) {
+ if (wizard.destroyed) {
+ return;
+ }
+ let volume = response.result.data.find((entry) =>
+ entry.volid.endsWith(`.dm-uuid-mpath-${lun.wwid}`),
+ );
+ if (!volume) {
+ wizard.showError(
+ gettext(
+ 'The selected LUN has no multipath volume yet. Check Node > SAN, then retry.',
+ ),
+ );
+ return;
+ }
+ wizard.addLVMStorage({ ...values, base: volume.volid }, fail);
+ },
+ });
+};
diff --git a/www/manager6/storage/wizard/LunSelect.js b/www/manager6/storage/wizard/LunSelect.js
new file mode 100644
index 000000000..dbf789f4e
--- /dev/null
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -0,0 +1,156 @@
+Ext.define('PVE.storage.wizard.LunSelect', {
+ extend: 'Ext.panel.Panel',
+ xtype: 'pveStorageWizardLunSelect',
+ layout: { type: 'vbox', align: 'stretch' },
+
+ // as an input panel does, so that the wizard shows its help button for this step
+ listeners: {
+ activate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxShowHelp', this.onlineHelp);
+ },
+ deactivate: function () {
+ Ext.GlobalEvents.fireEvent('proxmoxHideHelp', this.onlineHelp);
+ },
+ },
+
+ getSelection: function () {
+ return this.down('grid').getSelection()[0]?.data;
+ },
+
+ reload: function () {
+ let me = this;
+ let wizard = me.up('window');
+ let grid = me.down('grid');
+ me.rstore.stopUpdate();
+ me.store.setFilters([
+ { property: 'iscsi-target', value: wizard.connection.target, exactMatch: true },
+ ]);
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${Proxmox.NodeName}/storage/${encodeURIComponent(wizard.connection.storage)}/content`,
+ method: 'GET',
+ waitMsgTarget: grid,
+ failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
+ callback: function () {
+ if (!me.destroyed && wizard.down('#wizcontent').getActiveTab() === me) {
+ me.rstore.startUpdate();
+ }
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-luns',
+ model: 'pve-san-lun',
+ interval: 3000,
+ proxy: { type: 'proxmox', url: `/api2/json/nodes/${Proxmox.NodeName}/scan/san-luns` },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', { rstore: me.rstore });
+ let inUse = (row) => row['used-by-storage'];
+ let updateSelection = function () {
+ let row = me.getSelection();
+ me.down('#selection').setValue(row && !inUse(row) ? row.wwid : '');
+ };
+ me.items = [
+ {
+ xtype: 'textfield',
+ itemId: 'selection',
+ hidden: true,
+ allowBlank: false,
+ submitValue: false,
+ },
+ {
+ 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.',
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store: me.store,
+ emptyText: gettext('No LUNs found. Check connections and array access.'),
+ viewConfig: {
+ enableTextSelection: true,
+ getRowClass: (rec) => (inUse(rec.data) ? 'x-item-disabled' : ''),
+ },
+ listeners: {
+ beforeselect: (sm, rec) => !inUse(rec.data),
+ selectionchange: updateSelection,
+ },
+ columns: [
+ {
+ text: gettext('Name'),
+ dataIndex: 'name',
+ flex: 1,
+ minWidth: 260,
+ renderer: (value, md, rec) => Ext.htmlEncode(value || rec.get('wwid')),
+ },
+ { text: 'LUN', dataIndex: 'iscsi-lun', width: 60 },
+ {
+ text: gettext('Model'),
+ dataIndex: 'model',
+ width: 160,
+ renderer: (value, md, rec) =>
+ Ext.htmlEncode([rec.get('vendor'), value].filter(Boolean).join(' ')),
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ width: 140,
+ renderer: PVE.SANUtils.renderLunState,
+ },
+ {
+ text: gettext('Multipath'),
+ dataIndex: 'multipath',
+ width: 170,
+ renderer: PVE.SANUtils.renderSanLunMultipath,
+ },
+ {
+ text: gettext('Used By'),
+ dataIndex: 'usage',
+ width: 130,
+ renderer: PVE.SANUtils.renderSanLunUsage,
+ },
+ {
+ text: gettext('Size'),
+ dataIndex: 'size',
+ width: 100,
+ renderer: Proxmox.Utils.render_size,
+ },
+ {
+ text: gettext('Device'),
+ dataIndex: 'devpath',
+ width: 180,
+ hidden: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ tbar: [
+ {
+ text: gettext('Reload'),
+ iconCls: 'fa fa-refresh',
+ handler: () => me.reload(),
+ },
+ '->',
+ {
+ xtype: 'tbtext',
+ html: Ext.htmlEncode(`${gettext('Scan node')}: ${Proxmox.NodeName}`),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), me.rstore);
+ me.mon(me.rstore, 'load', updateSelection);
+ me.on('activate', () => me.reload());
+ me.on('deactivate', () => me.rstore.stopUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js
new file mode 100644
index 000000000..9c7ab8cce
--- /dev/null
+++ b/www/manager6/storage/wizard/NodeIdentities.js
@@ -0,0 +1,83 @@
+Ext.define('pve-san-node-identity', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'iscsi-initiator-name'],
+});
+
+Ext.define('PVE.storage.wizard.NodeIdentities', {
+ extend: 'Ext.grid.Panel',
+ xtype: 'pveStorageWizardNodeIdentities',
+ 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,
+ },
+ ],
+
+ initComponent: function () {
+ let me = this;
+ me.rstore = Ext.create('Proxmox.data.UpdateStore', {
+ storeid: 'san-wizard-identities',
+ model: 'pve-san-node-identity',
+ interval: 5000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: (raw) => ({
+ ...raw,
+ data: Object.entries(raw.data.nodes).map(([node, report]) => ({
+ ...report,
+ node,
+ })),
+ }),
+ },
+ },
+ });
+ me.store = Ext.create('Proxmox.data.DiffStore', {
+ rstore: me.rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.tbar = [
+ {
+ xtype: 'tbtext',
+ text: gettext('Allow these initiator names on the target.'),
+ },
+ '->',
+ {
+ text: gettext('Copy Initiator Names'),
+ iconCls: 'fa fa-clipboard',
+ handler: () =>
+ PVE.Utils.copyToClipboard(
+ me.store
+ .getRange()
+ .map((rec) => rec.get('iscsi-initiator-name'))
+ .filter(Boolean)
+ .join('\n'),
+ ),
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me, me.rstore);
+ me.on('afterrender', () => me.rstore.startUpdate());
+ me.on('destroy', () => {
+ me.store.destroy();
+ me.rstore.destroy();
+ });
+ },
+});
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
new file mode 100644
index 000000000..1f3975b75
--- /dev/null
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -0,0 +1,184 @@
+Ext.ns('PVE.storage.wizard');
+
+PVE.storage.wizard.subject = (type) =>
+ Ext.String.format(gettext('LVM on {0}'), PVE.Utils.format_storage_type(type));
+
+PVE.storage.wizard.validateNodes = function () {
+ let nodes = [].concat(this.getValue() || []).filter(Boolean);
+ return (
+ !nodes.length ||
+ nodes.includes(Proxmox.NodeName) ||
+ Ext.String.format(
+ gettext('Must include node "{0}", which sets up the volume group.'),
+ Proxmox.NodeName,
+ )
+ );
+};
+
+Ext.define('PVE.storage.wizard.SAN', {
+ extend: 'PVE.window.Wizard',
+ width: 1050,
+ height: 620,
+
+ showError: function (message) {
+ if (this.destroyed) {
+ return;
+ }
+ this.down('#submit').enable();
+ Ext.Msg.alert(gettext('Error'), message);
+ },
+
+ volumeSettings: function () {
+ let me = this;
+ let value = (name) => me.down(`field[name=${name}]`).getValue();
+ return {
+ storage: value('storage'),
+ vgname: value('vgname'),
+ 'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
+ nodes: me.connection.nodes,
+ };
+ },
+
+ // Adds the LVM storage with the volume settings as the last request of a setup. Only the node
+ // serving the web UI looked at the LUN, so show its state on the other nodes afterwards.
+ addLVMStorage: function (values, failure) {
+ let me = this;
+ let params = { type: 'lvm', shared: 1, content: 'images,rootdir', ...values };
+ if (!params.nodes) {
+ delete params.nodes;
+ }
+ Proxmox.Utils.API2Request({
+ url: '/storage',
+ method: 'POST',
+ params,
+ waitMsgTarget: me,
+ failure,
+ success: function () {
+ // the storage is added, also if the setup got closed in the meantime
+ if (me.destroyed) {
+ return;
+ }
+ let wwid = me.down('#luns').getSelection().wwid;
+ me.close();
+ Ext.create('PVE.window.SANLunState', {
+ wwid,
+ storage: values.storage,
+ autoShow: true,
+ });
+ },
+ });
+ },
+
+ multipathSummary: function (lun) {
+ // an explicit entry takes precedence, also for a LUN of the connection storage
+ if (lun.multipath === 'manual') {
+ return PVE.SANUtils.multipathText('manual');
+ }
+ return PVE.SANUtils.multipathText('storage', this.connection.storage);
+ },
+
+ updateSummary: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ let rows = [
+ [gettext('Connection Storage'), me.connection.storage],
+ [gettext('Storage ID'), values.storage],
+ [gettext('Volume Group'), values.vgname],
+ ['WWID', lun.wwid],
+ [gettext('Multipath'), me.multipathSummary(lun)],
+ [gettext('Size'), Proxmox.Utils.format_size(lun.size)],
+ [gettext('Nodes'), values.nodes || gettext('All (No restrictions)')],
+ [
+ gettext('Allow Snapshots as Volume-Chain'),
+ Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
+ ],
+ ];
+ me.down('#summary')
+ .getStore()
+ .setData(rows.map(([key, value]) => ({ key, value })));
+ },
+
+ finish: function () {
+ let me = this;
+ let values = me.volumeSettings();
+ let lun = me.down('#luns').getSelection();
+ me.down('#submit').disable();
+ PVE.storage.wizard.createIScsiLVM(me, values, lun);
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.subject = PVE.storage.wizard.subject(me.wizardType);
+ me.title = Proxmox.Utils.dialog_title(me.subject, true, true);
+ let common = PVE.panel.StorageBase.commonFields(true);
+ let snapshots = PVE.panel.StorageBase.volumeChainFields(true, 'lvm');
+ let settings = {
+ xtype: 'inputpanel',
+ title: gettext('Volume Group'),
+ onlineHelp: 'storage_multipath',
+ items: [
+ { ...common.id, fieldLabel: gettext('Storage ID') },
+ {
+ xtype: 'textfield',
+ name: 'vgname',
+ fieldLabel: gettext('Volume Group'),
+ allowBlank: false,
+ vtype: 'StorageId',
+ },
+ snapshots.checkbox,
+ snapshots.hint,
+ ],
+ };
+ me.items = [
+ { xtype: 'pveStorageWizardIScsiTarget', title: gettext('Target'), itemId: 'target' },
+ {
+ xtype: 'pveStorageWizardLunSelect',
+ title: 'LUN',
+ itemId: 'luns',
+ onlineHelp: 'storage_multipath',
+ },
+ settings,
+ {
+ title: gettext('Confirm'),
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'grid',
+ itemId: 'summary',
+ store: { fields: ['key', 'value'] },
+ columns: [
+ {
+ text: gettext('Setting'),
+ dataIndex: 'key',
+ width: 280,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('Value'),
+ dataIndex: 'value',
+ flex: 1,
+ cellWrap: true,
+ renderer: Ext.htmlEncode,
+ },
+ ],
+ },
+ ],
+ listeners: { activate: () => me.updateSummary() },
+ onSubmit: () => me.finish(),
+ },
+ ];
+ me.callParent();
+ let tabs = me.down('#wizcontent');
+ tabs.on('tabchange', function (tp, tab) {
+ if (tab === me.down('#luns')) {
+ me.down('#back').disable();
+ }
+ me.down('#submit').setText(
+ tab === me.down('#target') ? gettext('Next') : gettext('Finish'),
+ );
+ });
+ 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
new file mode 100644
index 000000000..154836f3b
--- /dev/null
+++ b/www/manager6/window/SANLunState.js
@@ -0,0 +1,111 @@
+Ext.define('pve-san-lun-node', {
+ extend: 'Ext.data.Model',
+ idProperty: 'node',
+ fields: ['node', 'state', 'paths-active', 'paths-total', 'paths-expected'],
+});
+
+// Shows the state of the LUN of a new storage on each of its nodes, from the cluster-wide status.
+Ext.define('PVE.window.SANLunState', {
+ extend: 'Ext.window.Window',
+
+ modal: true,
+ width: 550,
+ height: 400,
+ layout: { type: 'vbox', align: 'stretch' },
+ bodyPadding: 10,
+
+ initComponent: function () {
+ let me = this;
+ if (!me.wwid || !me.storage) {
+ throw 'no LUN or storage specified';
+ }
+ me.title = Ext.String.format(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', {
+ storeid: 'san-lun-state',
+ model: 'pve-san-lun-node',
+ interval: 3000,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/multipath/status',
+ reader: {
+ type: 'json',
+ rootProperty: 'data',
+ transform: function (raw) {
+ let lun = raw.data?.luns?.find((entry) => entry.wwid === me.wwid);
+ let nodes = Object.entries(lun?.nodes ?? {});
+ return { ...raw, data: nodes.map(([node, state]) => ({ ...state, node })) };
+ },
+ },
+ },
+ });
+ let store = Ext.create('Proxmox.data.DiffStore', {
+ rstore,
+ sorters: ['node'],
+ sortAfterUpdate: true,
+ });
+ me.items = [
+ {
+ xtype: 'component',
+ margin: '0 0 10 0',
+ html: Ext.htmlEncode(
+ Ext.String.format(
+ 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,
+ ),
+ ),
+ },
+ {
+ xtype: 'grid',
+ flex: 1,
+ store,
+ disableSelection: true,
+ emptyText: gettext('No node reported this LUN yet.'),
+ columns: [
+ {
+ text: gettext('Node'),
+ dataIndex: 'node',
+ flex: 1,
+ renderer: Ext.htmlEncode,
+ },
+ {
+ text: gettext('State'),
+ dataIndex: 'state',
+ flex: 1,
+ renderer: function (value, metaData, rec) {
+ if (value === 'missing' && Date.now() < pendingUntil) {
+ let tip = gettext(
+ 'Not reported by the node yet; the SAN view shows that as "Missing".',
+ );
+ metaData.tdAttr = `data-qtip="${Ext.htmlEncode(Ext.htmlEncode(tip))}"`;
+ return `<i class="fa fa-fw fa-spinner fa-pulse"></i> ${Ext.htmlEncode(gettext('Pending'))}`;
+ }
+ return PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ );
+ },
+ },
+ {
+ text: gettext('Active Paths'),
+ dataIndex: 'paths-active',
+ width: 120,
+ renderer: (value, metaData, rec) =>
+ value === undefined
+ ? ''
+ : Ext.htmlEncode(PVE.SANUtils.pathCount(rec.data)),
+ },
+ ],
+ },
+ ];
+ me.callParent();
+ Proxmox.Utils.monStoreErrors(me.down('grid'), rstore);
+ me.on('destroy', function () {
+ store.destroy();
+ rstore.destroy();
+ });
+ rstore.startUpdate();
+ },
+});
next prev parent reply other threads:[~2026-11-18 7:00 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 6:52 [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 cluster 01/42] cfs: observe the multipath configuration files Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 02/42] diskmanage: collect disk transport type from lsblk Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 03/42] diskmanage: qualify NVMe over fabrics transport Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 04/42] diskmanage: optionally include iSCSI session devices in disk enumeration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 05/42] diskmanage: collect native NVMe multipath path state Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 06/42] iscsi: factor out session device map from device list Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 07/42] multipath: add a library around multipathd Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 08/42] diskmanage: add helper to list multipath devices Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 09/42] multipath: add a cluster-wide configuration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 10/42] iscsi: add an option to manage storage LUNs with multipath Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 11/42] lvm: activate a missing base volume before using the volume group Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 12/42] multipath: apply the configuration on every node Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 13/42] multipath: publish per-node status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 14/42] api: add endpoints for the cluster-wide multipath configuration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 15/42] api: multipath: add the cluster-wide health status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 16/42] diskmanage: look up the requested disks by name Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 17/42] diskmanage: read the udev data of all disks with one call Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 18/42] api: scan: add a SAN LUN inventory Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 19/42] pvesm: expose the " Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 20/42] api: add node-level iSCSI status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 21/42] disks: lvm: drop unused imports Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 22/42] disks: lvm: allow volume groups on SAN LUNs and multipath maps Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 23/42] disks: lvm: refuse to destroy the volume group of a shared storage Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 24/42] disks: allow wiping a SAN LUN that no storage uses Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 storage 25/42] api: scan: report the process that has a SAN LUN open Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 docs 26/42] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 docs 27/42] storage: multipath: describe the use shown for an open LUN Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 28/42] pvestatd: apply the multipath configuration and report the node status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 29/42] report: add the managed multipath configuration Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 30/42] api: cluster: add the multipath endpoints Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 31/42] api: nodes: expose the iSCSI status Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 32/42] ui: dc: add a SAN view Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 33/42] ui: storage: iscsi: add the multipath option Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 34/42] ui: lvm: enable shared when a base storage is selected Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 35/42] ui: node: add SAN LUNs panel Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 36/42] ui: node: san: wipe a LUN that no storage uses Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 37/42] ui: node: san: show iSCSI targets and sessions Thomas Lamprecht
2026-11-18 6:52 ` Thomas Lamprecht [this message]
2026-11-18 6:52 ` [PATCH v6 manager 39/42] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 40/42] ui: storage: point the iSCSI and LVM add dialogs to the SAN view Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 41/42] ui: san: show the guest or process that has a LUN open Thomas Lamprecht
2026-11-18 6:52 ` [PATCH v6 manager 42/42] ui: node: san: add a column for the iSCSI target of a LUN Thomas Lamprecht
2026-11-18 20:28 ` superseded: [PATCH v6 cluster,storage,docs,manager 00/42] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
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=20261118065302.3033937-39-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.