From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id A1F2D1FF13A for ; Wed, 08 Jul 2026 18:36:28 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 03BBD21450; Wed, 08 Jul 2026 18:36:28 +0200 (CEST) Content-Type: text/plain; charset=UTF-8 Date: Wed, 08 Jul 2026 18:35:53 +0200 Message-Id: Subject: Re: [PATCH docs/manager/storage v8 0/5] fix #7339: lvmthick: add option to free storage for deleted VMs From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Lukas Sichert" , Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-Mailer: aerc 0.21.0 References: <20260707143252.101757-1-l.sichert@proxmox.com> In-Reply-To: <20260707143252.101757-1-l.sichert@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783528545113 X-SPAM-LEVEL: Spam detection results: 0 DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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: HTK4N2MRFO7URLL52CRPLB5ECXIZ52BT X-Message-ID-Hash: HTK4N2MRFO7URLL52CRPLB5ECXIZ52BT 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: Thanks for the patches! For this version I didn't have a SAN setup readily available, so I tested with a loop-backed LVM thin pool. On top of a thin LV I created a LVM-thick storage with discard enabled, created a VM on it, wrote some data (dd), confirmed that the thin pool's allocation grew, and then removed the VM. I observed the thin pool's usage drop back down again, as expected. I saw the "discard (TRIM) data on image vm-9999-disk-0 (/dev/testlvm/del-vm-9999-disk-0)" as expected as well. When also enabling saferemove, I could observe the usage in the thin pool drop range by range, as well as observe the "zeroed-out ..." logs. A thing I noticed is that it doesn't print the 100% log. For my case, the last log line read 99.80% and then Logical volume "del-vm-9999-disk-0" successfully removed. I don't think it's a problem, though. Just looked a bit weird at first. I also tested what happens if there's a failure during discard+saferemove removal by making the LV readonly, removing the disk (which shows "cleanup failed for lv vm-9999-disk-0..."), creating a new disk with the same base name, removing it again, again yielding "cleanup failed". Then I checked that `lvs testlvm` reports failed-1-del-vm-9999-disk-0 and failed-2-del-vm-9999-disk-0, as expected. Haven't had time yet to do a full review of the code, but added 2 comments on the individual patches. Consider this: Tested-by: Michael K=C3=B6ppl On Tue Jul 7, 2026 at 4:32 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 > thin-provisioned. In particular, this can be the case if the VG resides > on a LUN provided by a SAN via iSCSI/FC/SAS [1], where the LUN may be [snip]