From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id E82901FF136 for ; Mon, 23 Mar 2026 15:01:32 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D835F1D2F0; Mon, 23 Mar 2026 15:01:50 +0100 (CET) Date: Mon, 23 Mar 2026 15:01:12 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= Subject: Re: [PATCH manager 2/2] fix #7339: lvmthick: ui: add UI fields for option to free storage To: Lukas Sichert , Maximiliano Sandoval References: <20260323101506.56098-1-l.sichert@proxmox.com> <20260323101506.56098-3-l.sichert@proxmox.com> In-Reply-To: MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1774273846.zr8k466n6h.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774274429393 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.053 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: P6KALA3Z2BZZC2C654Z4A5VIJWZBPDK6 X-Message-ID-Hash: P6KALA3Z2BZZC2C654Z4A5VIJWZBPDK6 X-MailFrom: f.gruenbichler@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 CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On March 23, 2026 11:52 am, Maximiliano Sandoval wrote: > Lukas Sichert writes: >=20 >> In the previous commit the backend recieved the functionality to discard >> allocated space of a VM disk on a SAN, when a VM is deleted. The backend >> checks whether to use this option by parsing storage.cfg to see if >> 'issue_blkdiscard' is set to 1. This variable will automatically be >> stored into the config file if it is present in the 'PUT' API request. >> To be able to append this to the API call, the variable needs >> to be defined in the json-Schema, but this has also been added in the >> previous commit. >> >> To enable a option to free storage in the Gui, create a checkbox with >> the name 'issue_blkdiscard'. In the checkbox use cbind to evaluate >> 'iscreate' from the component, to only autoenable on new creations of >> LVM Storages. This checkbox also adds the 'issue_blkdiscard' >> variable and its value to the return call. >> >> Also add remappings for the description of the new worker tasks, to show >> in the Gui, which options are used for the current deletion. >> >> Signed-off-by: Lukas Sichert >> --- >> www/manager6/Utils.js | 3 +++ >> www/manager6/storage/LVMEdit.js | 13 +++++++++++++ >> 2 files changed, 16 insertions(+) >> >> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js >> index 77dae42e..1c70b159 100644 >> --- a/www/manager6/Utils.js >> +++ b/www/manager6/Utils.js >> @@ -2133,6 +2133,9 @@ Ext.define('PVE.Utils', { >> clusterjoin: ['', gettext('Join Cluster')], >> dircreate: [gettext('Directory Storage'), gettext('Create')= ], >> dirremove: [gettext('Directory'), gettext('Remove')], >> + diskdiscard: ['', gettext('Discard disk')], >> + diskzero: ['', gettext('Zero out disk')], >> + diskzerodiscard: ['', gettext('Zero out and discard disk')]= , >> download: [gettext('File'), gettext('Download')], >> hamigrate: ['HA', gettext('Migrate')], >> hashutdown: ['HA', gettext('Shutdown')], >> diff --git a/www/manager6/storage/LVMEdit.js b/www/manager6/storage/LVME= dit.js >> index 148f0601..35d2b329 100644 >> --- a/www/manager6/storage/LVMEdit.js >> +++ b/www/manager6/storage/LVMEdit.js >> @@ -241,5 +241,18 @@ Ext.define('PVE.storage.LVMInputPanel', { >> uncheckedValue: 0, >> fieldLabel: gettext('Wipe Removed Volumes'), >> }, >> + { >> + xtype: 'proxmoxcheckbox', >> + name: 'issue_blkdiscard', >> + uncheckedValue: 0, >> + cbind: { >> + checked: '{isCreate}', >> + }, >> + fieldLabel: gettext('Discard Removed Volumes'), >> + autoEl: { >> + tag: 'div', >> + 'data-qtip': gettext('Enable if storage space should be= freed when VM is deleted.'), >=20 > I would recommend: >=20 > 'Whether to free up storage space when deleting the VM.' >=20 > instead. I think both this here and the backend description should contain the words "discard" and "trim". That the end result is freeing capacity on the backing device is a (desired) implementation detail. If you don't know what discard means, you should not enable this option anyway. "when VM is deleted" is wrong in any case, the option affects volumes which are destroyed (which can happen as part of destroying a guest, of course, but is not limited to those tasks). What we want to convey: - destroying a volume always logically removes it - saferemove wipes the volume before removing it (prevents data leakage) - issue_blockdiscard discards the volume's data before removing it (increases lifespan of flash media, allows better thin provisioning, requires support across the whole stack to work) "free up space" is too generic, since it's not clear whether this refers to logical space usage or physical space usage, IMHO. >=20 > But this begs the question: How is this different from "Wipe Remove > Volumes" above? Imho it should be possible to tell them apart just with > the information available in the web UI. >=20 >> + }, >> + }, >> ], >> }); >=20 > --=20 > Maximiliano >=20 >=20 >=20 >=20 >=20