* [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove
@ 2026-11-27 15:32 Maximiliano Sandoval
2026-11-27 15:32 ` [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove Maximiliano Sandoval
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-11-27 15:32 UTC (permalink / raw)
To: pve-devel
This series adds the checkmarks present in the LVM edit dialog to the
storage wizard (e.g. creating a LVM over iSCSI) and displays a warning
when both are disabled.
Future steps:
- Document in the LVM plugin which option one should enabled based on
the setup, e.g. is the LUN thin-provisioned? Are there multiple users
creating/removing disk images in it?
- Link this documentation in the warnings
- Re-evaluate the defaults when creating a new LVM. It might be
possible to detect for the user a better combination of saferemove &
on-volume-remove than having both disavbled.
Maximiliano Sandoval (3):
ui: storage: SAN: add checkboxes for saferemove & on-volume-remove
ui: lvm: display a warning when there is no cleanup
ui: storage: SAN: display a warning when there is no cleanup
www/manager6/storage/LVMEdit.js | 14 ++++++++
www/manager6/storage/wizard/Wizard.js | 49 ++++++++++++++++++++++++++-
2 files changed, 62 insertions(+), 1 deletion(-)
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove
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
2026-12-02 10:31 ` Lukas Sichert
2026-11-27 15:32 ` [PATCH manager 2/3] ui: lvm: display a warning when there is no cleanup Maximiliano Sandoval
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-11-27 15:32 UTC (permalink / raw)
To: pve-devel
..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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH manager 2/3] ui: lvm: display a warning when there is no cleanup
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 ` [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove Maximiliano Sandoval
@ 2026-11-27 15:32 ` Maximiliano Sandoval
2026-11-27 15:32 ` [PATCH manager 3/3] ui: storage: SAN: " Maximiliano Sandoval
2026-12-02 10:42 ` [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Lukas Sichert
3 siblings, 0 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-11-27 15:32 UTC (permalink / raw)
To: pve-devel
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.
A warning when both are disabled is added to discourage this from
happening.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
www/manager6/storage/LVMEdit.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/www/manager6/storage/LVMEdit.js b/www/manager6/storage/LVMEdit.js
index 79bdb16c..8fcb924c 100644
--- a/www/manager6/storage/LVMEdit.js
+++ b/www/manager6/storage/LVMEdit.js
@@ -160,6 +160,8 @@ Ext.define('PVE.storage.LVMInputPanel', {
onlineHelp: 'storage_lvm',
+ viewModel: {},
+
onGetValues: function (values) {
let me = this;
@@ -291,12 +293,14 @@ Ext.define('PVE.storage.LVMInputPanel', {
name: 'saferemove',
uncheckedValue: 0,
fieldLabel: gettext('Wipe Removed Volumes'),
+ reference: 'saferemove',
},
{
xtype: 'proxmoxcheckbox',
name: 'on-remove-discard',
uncheckedValue: 0,
fieldLabel: gettext('Discard Removed Volumes'),
+ reference: 'on_remove_discard',
autoEl: {
tag: 'div',
'data-qtip': gettext(
@@ -304,5 +308,15 @@ Ext.define('PVE.storage.LVMInputPanel', {
),
},
},
+ {
+ xtype: 'displayfield',
+ userCls: 'pmx-hint',
+ value: gettext(
+ 'Newly allocated images can potentially contain data from previously removed images if both "Wipe Remove Volumes" and "Discard Removed Volumes" are disabled.',
+ ),
+ bind: {
+ hidden: '{saferemove.checked || on_remove_discard.checked}',
+ },
+ },
],
});
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH manager 3/3] ui: storage: SAN: display a warning when there is no cleanup
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 ` [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove Maximiliano Sandoval
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 ` Maximiliano Sandoval
2026-12-02 10:42 ` [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Lukas Sichert
3 siblings, 0 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-11-27 15:32 UTC (permalink / raw)
To: pve-devel
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.
A warning when both are disabled is added to discourage this from
happening.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
www/manager6/storage/wizard/Wizard.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/www/manager6/storage/wizard/Wizard.js b/www/manager6/storage/wizard/Wizard.js
index 27bf44ef..f38181c1 100644
--- a/www/manager6/storage/wizard/Wizard.js
+++ b/www/manager6/storage/wizard/Wizard.js
@@ -388,6 +388,7 @@ Ext.define('PVE.storage.wizard.SAN', {
let settings = {
xtype: 'inputpanel',
title: gettext('Storage'),
+ viewModel: {},
onlineHelp,
items: [
...(target
@@ -410,12 +411,14 @@ Ext.define('PVE.storage.wizard.SAN', {
name: 'saferemove',
uncheckedValue: 0,
boxLabel: gettext('Wipe Removed Volumes'),
+ reference: 'saferemove',
},
{
xtype: 'proxmoxcheckbox',
name: 'on-remove-discard',
uncheckedValue: 0,
boxLabel: gettext('Discard Removed Volumes'),
+ reference: 'on_remove_discard',
autoEl: {
tag: 'div',
'data-qtip': gettext(
@@ -423,6 +426,16 @@ Ext.define('PVE.storage.wizard.SAN', {
),
},
},
+ {
+ xtype: 'displayfield',
+ userCls: 'pmx-hint',
+ value: gettext(
+ 'Newly allocated images can potentially contain data from previously removed images if both "Wipe Remove Volumes" and "Discard Removed Volumes" are disabled.',
+ ),
+ bind: {
+ hidden: '{saferemove.checked || on_remove_discard.checked}',
+ },
+ },
],
advancedItems: [
vgname,
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove
2026-11-27 15:32 ` [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove Maximiliano Sandoval
@ 2026-12-02 10:31 ` Lukas Sichert
2026-12-02 10:39 ` Maximiliano Sandoval
0 siblings, 1 reply; 8+ messages in thread
From: Lukas Sichert @ 2026-12-02 10:31 UTC (permalink / raw)
To: Maximiliano Sandoval, pve-devel
On 2026-11-27 16:32, Maximiliano Sandoval <m.sandoval@proxmox.com> wrote:
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> www/manager6/storage/wizard/Wizard.js | 36 ++++++++++++++++++++++++++-
> - 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;
nit: Generally it is avoided to serialize the value 0 into the config.
Already logic is added to only write the on-volume-remove parameter
string into the config if enabled. This should also be done for
saferemove and 'snapshot-as-volume-chain'. The LVMEdit window already
does this correctly for 'snapshot-as-volume-chain'. Correct handling for
saferemove should be added there as well in the future.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove
2026-12-02 10:31 ` Lukas Sichert
@ 2026-12-02 10:39 ` Maximiliano Sandoval
0 siblings, 0 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-12-02 10:39 UTC (permalink / raw)
To: Lukas Sichert; +Cc: pve-devel
"Lukas Sichert" <l.sichert@proxmox.com> writes:
> On 2026-11-27 16:32, Maximiliano Sandoval <m.sandoval@proxmox.com> wrote:
>
>> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
>> ---
>> www/manager6/storage/wizard/Wizard.js | 36 ++++++++++++++++++++++++++-
>> - 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;
>
> nit: Generally it is avoided to serialize the value 0 into the config.
> Already logic is added to only write the on-volume-remove parameter
> string into the config if enabled. This should also be done for
> saferemove and 'snapshot-as-volume-chain'. The LVMEdit window already
> does this correctly for 'snapshot-as-volume-chain'. Correct handling for
> saferemove should be added there as well in the future.
saferemove 0 is set explicitly in the configuration in order to match
the behavior of the LVMEdit dialog for this particular setting.
For the record, I opted to follow the other dialog's behavior before
changing the existing LVMEdit dialog to have consistent behavior. I have
no strong preference for either behavior so please let me know if I
should send v2 cleaning this.
--
Maximiliano
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove
2026-11-27 15:32 [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Maximiliano Sandoval
` (2 preceding siblings ...)
2026-11-27 15:32 ` [PATCH manager 3/3] ui: storage: SAN: " Maximiliano Sandoval
@ 2026-12-02 10:42 ` Lukas Sichert
2026-12-02 13:51 ` Lukas Sichert
3 siblings, 1 reply; 8+ messages in thread
From: Lukas Sichert @ 2026-12-02 10:42 UTC (permalink / raw)
To: Maximiliano Sandoval, pve-devel
On 2026-11-27 16:32, Maximiliano Sandoval <m.sandoval@proxmox.com> wrote:
> This series adds the checkmarks present in the LVM edit dialog to the
> storage wizard (e.g. creating a LVM over iSCSI) and displays a warning
> when both are disabled.
>
> Future steps:
>
> - Document in the LVM plugin which option one should enabled based on
> the setup, e.g. is the LUN thin-provisioned? Are there multiple users
> creating/removing disk images in it?
>
> - Link this documentation in the warnings
>
> - Re-evaluate the defaults when creating a new LVM. It might be
> possible to detect for the user a better combination of saferemove &
> on-volume-remove than having both disavbled.
I tested this with the Shared LVM on iSCSI, NVMEoF, FibreChannel Wizard
and the LVMEdit window.
Everything worked as expected.
With the nit addressed consider:
Tested-by: Lukas Sichert <l.sichert@proxmox.com>
Reviewed-by: Lukas Sichert <l.sichert@proxmox.com>
I will send a patch for the Documentation soon.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove
2026-12-02 10:42 ` [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Lukas Sichert
@ 2026-12-02 13:51 ` Lukas Sichert
0 siblings, 0 replies; 8+ messages in thread
From: Lukas Sichert @ 2026-12-02 13:51 UTC (permalink / raw)
To: Lukas Sichert, Maximiliano Sandoval, pve-devel
On 2026-12-02 11:42, Lukas Sichert <l.sichert@proxmox.com> wrote:
> On 2026-11-27 16:32, Maximiliano Sandoval <m.sandoval@proxmox.com> wrote:
>
>> This series adds the checkmarks present in the LVM edit dialog to the
>> storage wizard (e.g. creating a LVM over iSCSI) and displays a warning
>> when both are disabled.
>>
>> Future steps:
>>
>> - Document in the LVM plugin which option one should enabled based on
>> the setup, e.g. is the LUN thin-provisioned? Are there multiple users
>> creating/removing disk images in it?
>>
>> - Link this documentation in the warnings
>>
>> - Re-evaluate the defaults when creating a new LVM. It might be
>> possible to detect for the user a better combination of saferemove &
>> on-volume-remove than having both disavbled.
>
> I tested this with the Shared LVM on iSCSI, NVMEoF, FibreChannel Wizard
> and the LVMEdit window.
>
> Everything worked as expected.
> With the nit addressed consider:
>
> Tested-by: Lukas Sichert <l.sichert@proxmox.com>
> Reviewed-by: Lukas Sichert <l.sichert@proxmox.com>
>
> I will send a patch for the Documentation soon.
I did not think about the wording of the warnings carefully enough. It
makes it sound like discard is supposed to give back zeroes for
discarded data, which is not the case in general. As discussed off-list
I will include a revised version of this in my documentation patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-12-02 13:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove Maximiliano Sandoval
2026-12-02 10:31 ` Lukas Sichert
2026-12-02 10:39 ` Maximiliano Sandoval
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
2026-12-02 10:42 ` [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Lukas Sichert
2026-12-02 13:51 ` Lukas Sichert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox