From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove
Date: Fri, 27 Nov 2026 16:32:40 +0100 [thread overview]
Message-ID: <20261127153243.488023-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20261127153243.488023-1-m.sandoval@proxmox.com>
..when adding a shared LVM storage through the wizard.
A LVM storage without saferemove nor on-volume-remove can potentially
leak the contents of a previously removed disk image on newly created
disk images.
The same checkboxes present in the LVM edit panel are added to
discourage this from happening.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
www/manager6/storage/wizard/Wizard.js | 36 ++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
index d70e9a94..27bf44ef 100644
--- a/www/manager6/storage/wizard/Wizard.js
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -148,10 +148,11 @@ Ext.define('PVE.storage.wizard.SAN', {
volumeSettings: function () {
let me = this;
let value = (name) => me.down(`field[name=${name}]`).getValue();
- return {
+ let values = {
storage: value('storage'),
vgname: value('vgname') || value('storage'),
'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0,
+ saferemove: value('saferemove') ? 1 : 0,
nodes:
me.wizardType === 'fc'
? []
@@ -160,6 +161,14 @@ Ext.define('PVE.storage.wizard.SAN', {
.join(',')
: me.connection.nodes,
};
+
+ if (value('on-remove-discard')) {
+ let onRemove = { discard: 1 };
+ let onRemoveString = PVE.Parser.printPropertyString(onRemove);
+ values['on-volume-remove'] = onRemoveString;
+ }
+
+ return values;
},
cleanUp: function () {
@@ -288,6 +297,13 @@ Ext.define('PVE.storage.wizard.SAN', {
gettext('Allow Snapshots as Volume-Chain'),
Proxmox.Utils.format_boolean(values['snapshot-as-volume-chain']),
],
+ [gettext('Wipe Removed Volumes'), Proxmox.Utils.format_boolean(values.saferemove)],
+ [
+ gettext('Discard Removed Volumes'),
+ Proxmox.Utils.format_boolean(
+ PVE.Parser.parsePropertyString(values['on-volume-remove']).discard,
+ ),
+ ],
];
me.down('#summary')
.getStore()
@@ -389,6 +405,24 @@ Ext.define('PVE.storage.wizard.SAN', {
userCls: 'pmx-hint',
value: gettext('Enable before creating VM disks that need snapshots.'),
},
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'saferemove',
+ uncheckedValue: 0,
+ boxLabel: gettext('Wipe Removed Volumes'),
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'on-remove-discard',
+ uncheckedValue: 0,
+ boxLabel: gettext('Discard Removed Volumes'),
+ autoEl: {
+ tag: 'div',
+ 'data-qtip': gettext(
+ 'Enable to issue discard (TRIM) requests for logical volumes before removing them.',
+ ),
+ },
+ },
],
advancedItems: [
vgname,
--
2.47.3
next prev parent reply other threads:[~2026-11-27 15:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:32 [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Maximiliano Sandoval
2026-11-27 15:32 ` Maximiliano Sandoval [this message]
2026-11-27 15:32 ` [PATCH manager 2/3] ui: lvm: display a warning when there is no cleanup Maximiliano Sandoval
2026-11-27 15:32 ` [PATCH manager 3/3] ui: storage: SAN: " Maximiliano Sandoval
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=20261127153243.488023-2-m.sandoval@proxmox.com \
--to=m.sandoval@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.