>> >> On Monday 04 May 2009 17:56:43 L. V. Lammert wrote:
>> >> > What is the best way to do a surface analysis on a disk?

>> 2009/5/5 Tony Abernethy <t...@servacorp.com>:
>> > There is, in the e2fsprogs package, something called badblocks.

> On Thu, May 07, 2009 at 01:10:56AM +0200, ropers wrote:
>> I also would recommend badblocks(8), but I would recommend
>>   badblocks -svn
>> instead of badblocks -sw.
>>
>> badblocks -svn also (s)hows its progress as it goes along, but does a
>> (v)erbose (n)on-destructive read/write test (as opposed to either the
>> default read-only test or the destructive read/write test). You can
>> check an entire device with badblocks, or a partition, or a file. The
>> great thing about using badblocks to check a partition is that it's
>> filesystem-agnostic. It will dutifully check every bit of its target
>> partition regardless of what's actually on it. And if you give
>> badblocks -svn an entire storage device to test, it will not even care
>> about the actual partition scheme used. Because this read/write test
>> can trigger the disk's own built-in bad sector relocation, this means
>> you can even have a disk that you can't read the partition table from,
>> and running badblocks -svn over it may at least temporarily fix
>> things. And I've used badblocks -svn e.g. to check old Macintosh
>> floppies. Who cares that OpenBSD doesn't know much about the
>> filesystem on those? badblocks does the job anyway.

>> Oh, and of course it would probably be prudent to do a backup before
>> read/write tests, even though badblocks is well-established and (with
>> -n) supposed to be non-destructive. Supposed to... ;-) I've never been
>> disappointed but YMMV.

2009/5/7 Marco Peereboom <sl...@peereboom.us>:
> You people crack me up.  I have been trying to ignore this post for a
> while but can't anymore.  Garbage like badblock are from the era that
> you still could low level format a drive.  Remember those fun days?
> When you were all excited about your 10MB hard disk?
>
> Use dd to read it; if it is somewhat broken the drive will reallocate
> it.  If it is badly broken the IO will fail and it is time to toss the
> disk.  Those are about all the flavors you have available.  Running
> vendor diags is basically a fancier dd.

Why do you consider badblocks garbage?

I remember now that we talked about this before over a year ago, when
I first asked about using badblocks on OpenBSD. Back then I eventually
surmised that using dd to do the same thing as badblocks -svn would be
possible but a lot more cumbersome, cf.:
http://kerneltrap.org/mailarchive/openbsd-misc/2008/4/19/1499524

Am I/was I mistaken, and if so, where?

Thanks and regards,
--ropers

Reply via email to