From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1F9FD1FF13E for ; Fri, 17 Apr 2026 13:05:45 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id ED3131E910; Fri, 17 Apr 2026 13:05:44 +0200 (CEST) Content-Type: text/plain; charset=UTF-8 Date: Fri, 17 Apr 2026 13:05:35 +0200 Message-Id: From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Lukas Sichert" , Subject: Re: [PATCH manager v2 2/2] fix #7339: lvmthick: ui: add UI fields for option to free storage Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-Mailer: aerc 0.21.0 References: <20260416143729.54192-1-l.sichert@proxmox.com> <20260416143729.54192-3-l.sichert@proxmox.com> In-Reply-To: <20260416143729.54192-3-l.sichert@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1776423855918 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.102 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 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: F34NAU5V3IHSQD3PFUZCBQWQJEG4YNZL X-Message-ID-Hash: F34NAU5V3IHSQD3PFUZCBQWQJEG4YNZL X-MailFrom: m.koeppl@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 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 Thu Apr 16, 2026 at 4:37 PM CEST, Lukas Sichert wrote: > In the previous commit the backend recieved the functionality to discard nit: this would probably be fixed on apply anyway, but this still mentions a "previous commit" that will not be in pve-manager but pve-storage, so this part of the commit message won't make any sense later on. > 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 nit: s/issue_blkdiscard/issue-blkdiscard > 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. nit: same as above with "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 nit: s/issue_blkdiscard/issue-blkdiscard > '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 | 15 +++++++++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js > index b36e46fd..03558942 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/LVMEd= it.js > index 148f0601..56463bce 100644 > --- a/www/manager6/storage/LVMEdit.js > +++ b/www/manager6/storage/LVMEdit.js > @@ -241,5 +241,20 @@ Ext.define('PVE.storage.LVMInputPanel', { > uncheckedValue: 0, > fieldLabel: gettext('Wipe Removed Volumes'), > }, > + { > + xtype: 'proxmoxcheckbox', > + name: 'issue-blkdiscard', > + uncheckedValue: 0, > + cbind: { > + checked: '{isCreate}', I'm not sure about this. Can't a user have an LVM storage on a storage device that simply doesn't support blkdiscard? AFAICT, in that case a warning would be printed, but I'm not sure it makes sense to enable this by default. The bugzilla entry also mentions this as an opt-in flag. > + }, > + fieldLabel: gettext('Discard Removed Volumes'), > + autoEl: { > + tag: 'div', > + 'data-qtip': gettext( > + 'Enable to issue discard (TRIM) requests for logical= volumes before removing them.', > + ), > + }, > + }, > ], > });