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 03E181FF13A for ; Wed, 08 Jul 2026 18:27:04 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BD0602145A; Wed, 08 Jul 2026 18:27:03 +0200 (CEST) Content-Type: text/plain; charset=UTF-8 Date: Wed, 08 Jul 2026 18:26:29 +0200 Message-Id: Subject: Re: [PATCH storage v8 2/5] lvm: saferemove: zero out volumes range by range 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> <20260707143252.101757-3-l.sichert@proxmox.com> In-Reply-To: <20260707143252.101757-3-l.sichert@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783527980880 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: RHQTGKNPUT25WE4DHKTRANRMKNHOQ5V2 X-Message-ID-Hash: RHQTGKNPUT25WE4DHKTRANRMKNHOQ5V2 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 > - my $cmd =3D [ > - '/usr/bin/cstream', > - '-i', > - '/dev/zero', > - '-o', > - $lvmpath, > - '-T', > - '10', > - '-v', > - '1', > - '-b', > - '1048576', > - '-t', > - "$throughput", Since this is not used anymore, the schema description for saferemove_throughput should probably be adapted as well, since it says "Wipe throughput (cstream -t parameter value)". You adapted the documentation accordingly, but the schema is still the same. I unfortunately also missed this in the previous versions. > - ]; > - run_command( > - $cmd, > - errmsg =3D> "zero out finished (note: 'No space left on = device' is ok here)", > - ); > - } else { > - # If the storage supports write_zeroes but stepsize is too b= ig, reduce the stepsize to > - # the maximum supported by the storage. > - if ($write_zeroes_max_bytes > 0 && $stepsize > $write_zeroes= _max_bytes) { > - print "reduce stepsize to the maximum supported by the s= torage:" > - . " $write_zeroes_max_bytes bytes\n"; > + # eval block, so filehandle is closed even if something fails be= low > + eval { > + my $start =3D time(); > + my $written_total =3D 0; > + my $lastprint =3D -1; > + my $written; > + [snip]