public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Sichert <l.sichert@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Lukas Sichert <l.sichert@proxmox.com>
Subject: [PATCH manager v4 2/2] fix #7339: lvmthick: ui: add UI option to free storage
Date: Wed, 13 May 2026 14:02:38 +0200	[thread overview]
Message-ID: <20260513120240.81893-3-l.sichert@proxmox.com> (raw)
In-Reply-To: <20260513120240.81893-1-l.sichert@proxmox.com>

In the commit 'fix #7339: lvmthick: add worker to free space of to be
deleted VMs' for the 'pve-storage' repo the backend received 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 an 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 auto-enable on new creations of
LVM Storages. This checkbox also adds the 'issue-blkdiscard'
variable and its value to the return call.

Also rename the 'imgdel' task description from 'Erase data' to
'Destroy disk', since the task can now also discard storage blocks in
addition to zeroing data.

Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
 www/manager6/Utils.js           |  2 +-
 www/manager6/storage/LVMEdit.js | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 01e80682..417db00b 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -2151,7 +2151,7 @@ Ext.define('PVE.Utils', {
             hastart: ['HA', gettext('Start')],
             hastop: ['HA', gettext('Stop')],
             imgcopy: ['', gettext('Copy data')],
-            imgdel: ['', gettext('Erase data')],
+            imgdel: ['', gettext('Destroy image')],
             lvmcreate: [gettext('LVM Storage'), gettext('Create')],
             lvmremove: ['Volume Group', gettext('Remove')],
             lvmthincreate: [gettext('LVM-Thin Storage'), gettext('Create')],
diff --git a/www/manager6/storage/LVMEdit.js b/www/manager6/storage/LVMEdit.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}',
+            },
+            fieldLabel: gettext('Discard Removed Volumes'),
+            autoEl: {
+                tag: 'div',
+                'data-qtip': gettext(
+                    'Enable to issue discard (TRIM) requests for logical volumes before removing them.',
+                ),
+            },
+        },
     ],
 });
-- 
2.47.3





      parent reply	other threads:[~2026-05-13 12:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 12:02 [PATCH manager/storage v4 0/2] fix #7339: lvmthick: add option to free storage for deleted VMs Lukas Sichert
2026-05-13 12:02 ` [PATCH storage v4 1/2] fix #7339: lvmthick: add worker to free space of to be " Lukas Sichert
2026-05-15 14:02   ` Friedrich Weber
2026-05-15 14:28     ` Fabian Grünbichler
2026-05-13 12:02 ` Lukas Sichert [this message]

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=20260513120240.81893-3-l.sichert@proxmox.com \
    --to=l.sichert@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal