From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH v5 manager 34/36] ui: dc: san: add a guided setup for shared LVM on iSCSI
Date: Mon, 16 Nov 2026 02:23:43 +0100 [thread overview]
Message-ID: <20261116012355.3187417-35-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20261116012355.3187417-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 LUN list shows the model of each LUN, and the confirm step shows
how its multipath is set up.
It 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 of its type. Those dialogs stay as
they are and can do the same in two steps. Continuing from the target
step creates or reuses the connection storage, before the confirm
step, so the step says so.
A LUN that a storage uses cannot be selected. The list is the one of
the node serving the web UI, which the LUN step names. Whether the
other nodes of the storage see the LUN as well is what matters for a
shared storage, so the setup ends with the state of the LUN on each of
them, taken from the cluster-wide status. Nodes set up a new LUN with
their next status updates, so for the first minute a node without it
shows as pending and not as missing. A tooltip on that state says that
the SAN view lists such a node as missing meanwhile. The note of the
window says that guests on the storage cannot run on a node that
stays 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 | 20 +-
www/manager6/storage/wizard/IScsi.js | 272 ++++++++++++++++++
www/manager6/storage/wizard/LunSelect.js | 158 ++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 83 ++++++
www/manager6/storage/wizard/Wizard.js | 184 ++++++++++++
www/manager6/window/SANLunState.js | 111 +++++++
7 files changed, 832 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 7fb4d7944..c7cefeacc 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 \
@@ -384,6 +385,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 b40ee7064..a8ef4cd5b 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -50,7 +50,8 @@ 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'];
me.rstore = Ext.create('Proxmox.data.UpdateStore', {
@@ -105,6 +106,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('Add Storage'),
+ disabled: !allCaps.storage['Datastore.Allocate'],
+ 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..072f96525
--- /dev/null
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -0,0 +1,272 @@
+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;
+ 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..d96cde871
--- /dev/null
+++ b/www/manager6/storage/wizard/LunSelect.js
@@ -0,0 +1,158 @@
+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 updateSelection = function () {
+ let row = me.getSelection();
+ me.down('#selection').setValue(row && !row['used-by-storage'] ? 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 used by a storage 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) => (rec.get('used-by-storage') ? 'x-item-disabled' : ''),
+ },
+ listeners: {
+ beforeselect: (sm, rec) => !rec.get('used-by-storage'),
+ 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: 110,
+ renderer: (value, md, rec) =>
+ PVE.SANUtils.renderState(
+ PVE.SANUtils.lunState(value, rec.get('paths-total')),
+ ),
+ },
+ {
+ 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-16 1:29 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 1:23 [PATCH v5 cluster,storage,docs,manager 00/36] SAN: cluster-wide multipath, SAN views and a guided setup for shared LVM Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 cluster 01/36] cfs: observe the multipath configuration files Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 02/36] diskmanage: collect disk transport type from lsblk Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 03/36] diskmanage: qualify NVMe over fabrics transport Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 04/36] diskmanage: optionally include iSCSI session devices in disk enumeration Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 05/36] diskmanage: collect native NVMe multipath path state Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 06/36] iscsi: factor out session device map from device list Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 07/36] multipath: add a library around multipathd Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 08/36] diskmanage: add helper to list multipath devices Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 09/36] multipath: add a cluster-wide configuration Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 10/36] iscsi: add an option to manage storage LUNs with multipath Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 11/36] lvm: activate a missing base volume before using the volume group Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 12/36] multipath: apply the configuration on every node Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 13/36] multipath: publish per-node status Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 14/36] api: add endpoints for the cluster-wide multipath configuration Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 15/36] api: multipath: add the cluster-wide health status Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 16/36] api: scan: add a SAN LUN inventory Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 17/36] pvesm: expose the " Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 18/36] api: add node-level iSCSI status Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 19/36] disks: lvm: drop unused imports Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 20/36] disks: lvm: allow volume groups on SAN LUNs and multipath maps Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 21/36] disks: lvm: refuse to destroy the volume group of a shared storage Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 storage 22/36] disks: allow wiping a SAN LUN that no storage uses Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 docs 23/36] storage: document the cluster-wide multipath management Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 24/36] pvestatd: apply the multipath configuration and report the node status Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 25/36] report: add the managed multipath configuration Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 26/36] api: cluster: add the multipath endpoints Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 27/36] api: nodes: expose the iSCSI status Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 28/36] ui: dc: add a SAN view Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 29/36] ui: storage: iscsi: add the multipath option Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 30/36] ui: lvm: enable shared when a base storage is selected Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 31/36] ui: node: add SAN LUNs panel Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 32/36] ui: node: san: wipe a LUN that no storage uses Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 33/36] ui: node: san: show iSCSI targets and sessions Thomas Lamprecht
2026-11-16 1:23 ` Thomas Lamprecht [this message]
2026-11-16 1:23 ` [PATCH v5 manager 35/36] ui: dc: san: add a guided setup for shared LVM on Fibre Channel Thomas Lamprecht
2026-11-16 1:23 ` [PATCH v5 manager 36/36] ui: storage: point the iSCSI and LVM add dialogs to the SAN view Thomas Lamprecht
2026-11-18 8:11 ` superseded: [PATCH v5 cluster,storage,docs,manager 00/36] 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=20261116012355.3187417-35-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.