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 2BE111FF13B for ; Mon, 08 Jun 2026 16:43:21 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BA60231D4F; Mon, 8 Jun 2026 16:43:19 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 08 Jun 2026 16:43:14 +0200 Message-Id: From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Lukas Sichert" , Subject: Re: [PATCH manager/storage v6 0/2] fix #7339: lvmthick: add option to free storage for deleted VMs X-Mailer: aerc 0.21.0 References: <20260522130419.94386-1-l.sichert@proxmox.com> In-Reply-To: <20260522130419.94386-1-l.sichert@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1780929750267 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.091 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: TSPPTJAWUB2THSIQ4ALDWJUSFVB2HZBI X-Message-ID-Hash: TSPPTJAWUB2THSIQ4ALDWJUSFVB2HZBI 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: Gave this a spin. Used a LUN provided by a SAN via ISCSI with the underlying storage being thin-provisioned. Then created an LVM-thick storage with discard enabled, created a new VM with a disk on said storage and then checked that when removing the VM, the disk space was reclaimed. Used=20 `watch -n 0.5 'lvs -a -o lv_name,data_percent,metadata_percent vgsan'` to see if the storage was reclaimed as expected. I also tested what happens if discard is activated and the underlying storage does not support it. It's obvious from the code that a warning is printed and then the function carries on, but I think the warning message could make it more clear what the consequences of the failed `blkdiscard` command are because right now the warning that is printed is this: command '/sbin/blkdiscard /dev//' failed: exit code 2 I noted on the pve-storage patch that IMO this would benefit from a more explicit "Disk space could not be reclaimed with discard" or something similar. Also had a closer look at the implementation, left some comments on the individual patches. I also noticed that this lacks a pve-docs patch for the new discard option. Consider this: Tested-by: Michael K=C3=B6ppl On Fri May 22, 2026 at 3:04 PM CEST, Lukas Sichert wrote: > Logical volumes (LV) in an LVM (thick) volume group (VG) are > thick-provisioned, but the underlying backing storage can be [snip]