[Tfug] badblocks

Adrian choprboy at dakotacom.net
Sun Nov 5 11:07:44 MST 2006


On Sunday 05 November 2006 08:38, Earl wrote:
> I ran badblocks for the first time this morning on a 10 GB hard drive 
> formatted in FAT32. I used:
> 
> badblocks b 512 /dev/hdb1
> 
> Is this the right syntax? I'm curious as it did a 10 GB drive in well 
> under 10 minutes. Scandisk would take about 10 times that long. No 
> output but Scandisk didn't find any problem on this disk either.
> 
> Is one pass a good test with the default?
> 

By default, badblocks does a read-only test so it goes fairly quickly. Any 
badblocks found should appear as a list of block numbers as badblocks runs. 
You don't really need the "b 512" option, that is only really useful when 
combining with mke2fs to make sure your using the same block size in checks 
vs. partition formats (mke2fs does this automatically if you do a "mke2fs 
-c").

One pass is sufficent, in my experience, though a read-write test is more 
intensive and likely to tease out any small defect. You can do "safe"-ish 
non-destructive read-write test using the "badblocks -n" option, or an 
extremely thurough (but destructive) multi-pattern read-write test using the 
"badblocks -w" option. Both will take far longer to run.

Adrian




More information about the tfug mailing list