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 2FE7D1FF13A for ; Wed, 08 Jul 2026 18:26:04 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BA96F21452; Wed, 08 Jul 2026 18:26:02 +0200 (CEST) Content-Type: text/plain; charset=UTF-8 Date: Wed, 08 Jul 2026 18:25:57 +0200 Message-Id: Subject: Re: [PATCH storage v8 1/5] lvm: saferemove: keep LVs where zero-out failed for manual zero-out From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Lukas Sichert" , Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: aerc 0.21.0 References: <20260707143252.101757-1-l.sichert@proxmox.com> <20260707143252.101757-2-l.sichert@proxmox.com> In-Reply-To: <20260707143252.101757-2-l.sichert@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783527949266 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.000 Adjusted score from AWL reputation of From: address 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: KML4WNVW5VMCGOLTBOXGEXUIEFDMLLS5 X-Message-ID-Hash: KML4WNVW5VMCGOLTBOXGEXUIEFDMLLS5 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 Tue Jul 7, 2026 at 4:32 PM CEST, Lukas Sichert wrote: [snip] > =20 > @@ -368,18 +365,51 @@ my sub free_lvm_volumes_locked { > errmsg =3D> "can't refresh LV '$lvmpath' to zero-out its= data", > ); > =20 > - $secure_delete_cmd->($lvmpath); > + eval { $secure_delete_cmd->($lvmpath); }; > + if (my $cleanup_err =3D $@) { > + my $failed_name; > + $class->cluster_lock_storage( > + $storeid, > + $scfg->{shared}, > + undef, > + sub { > + my $lvs =3D lvm_list_volumes(); You could pass $vg as a parameter here to limit the lvs command to that volume group, no? > + my $existing =3D $lvs->{$vg} // {}; > + > + my $prefix =3D 'failed-'; > + my $suffix =3D "-del-$name"; > + > + my $last_fail =3D max( > + 0, > + map { > + /^\Q$prefix\E(\d+)\Q$suffix\E$/ ? $1 : (= ) [snip]