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 9C8531FF141 for ; Tue, 16 Jun 2026 12:14:09 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 19DF52BE1; Tue, 16 Jun 2026 12:14:05 +0200 (CEST) From: Lukas Sichert To: pve-devel@lists.proxmox.com Subject: [PATCH docs v7 4/4] fix #7339: lvm: document discard option Date: Tue, 16 Jun 2026 12:13:20 +0200 Message-ID: <20260616101323.24981-5-l.sichert@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616101323.24981-1-l.sichert@proxmox.com> References: <20260616101323.24981-1-l.sichert@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781604756213 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.268 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: XRQCWKX3N5T3F43N5C2AOYFGFZ2NT2WX X-Message-ID-Hash: XRQCWKX3N5T3F43N5C2AOYFGFZ2NT2WX X-MailFrom: l.sichert@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: Lukas Sichert X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Document the new `on-volume-remove` property for LVM storage and its initial `discard` action. Also update the `saferemove` description to match the range-based zero-out worker and avoid referring to the old command-specific implementation details. Signed-off-by: Lukas Sichert Link: bugzilla.proxmox.com/show_bug.cgi?id=7339 --- pve-storage-lvm.adoc | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pve-storage-lvm.adoc b/pve-storage-lvm.adoc index ba78663..a297f31 100644 --- a/pve-storage-lvm.adoc +++ b/pve-storage-lvm.adoc @@ -44,18 +44,31 @@ accessed by other LVs created later (which happen to be assigned the same physical extents). This is a costly operation, but may be required as a security measure in certain environments. + -Storage devices that support the "write zeroes" operation will use `blkdiscard` -to zero blocks. Otherwise, a fallback to `cstream` is performed. +Storage devices that support the "write zeroes" operation use it to zero blocks. +Otherwise, zeroes are written manually. The volume is processed range by range, +according to `saferemove-stepsize`. + +`on-volume-remove`:: + +Configure additional actions to run before removing an LV. ++ +The initial supported option is `discard=1`. This issues discard requests for +the removed LV so thin-provisioned backing storage, for example a SAN LUN, can +reclaim the space used by the LV. ++ +If `saferemove` is enabled too, the LV is processed range by range: one range is +zeroed out and then discarded before continuing with the next range. This avoids +allocating the whole LV with zeroes on thin-provisioned backing storage before +the space can be reclaimed again. `saferemove-stepsize`:: -Wipe step size in MiB (`blkdiscard -p` parameter value), capped to the maximum -step size supported by the underlying storage. Up to 32 MiB (maximum) by -default. +Wipe step size in MiB, capped to the maximum step size supported by the +underlying storage. Up to 32 MiB (maximum) by default. `saferemove_throughput`:: -Wipe throughput (`cstream -t` parameter value), up to 10 MiB/s by default. +Wipe throughput, unlimited by default. `snapshot-as-volume-chain`:: -- 2.47.3