On Fri, Feb 09, 2024 at 07:50:18AM -0500, Stefan Monnier wrote:
> > BTW2, there is a program for that, "badblocks", part of e2fsprograms, so
> > chances are it's installed. I'd look into that man page.
> 
> `badblocks` sadly writes the same pattern on every block, AFAIK, so if
> the drive just remaps new logical blocks to already used physical
> blocks, `badblocks` may be convinced that the drive works fine even when
> it doesn't.

Absolutely right. And most probably it checks a block right after writing,
and doesn't try to fill up the disk first.

> So, if you want to use `badblocks`, you may want to do it on an
> encrypted partition (that covers the whole device) rather than on the
> raw device.

This is an interesting idea. I haven't wrapped my head around "what if
the controller maps several block addresses to the same physical block"?

Perhaps you'd have to fill the disk and check afterwards?

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to