how to check for bad blocks on IDE

Scott Mitchell scott+freebsd at fishballoon.org
Wed Jul 16 13:34:59 PDT 2003


On Wed, Jul 16, 2003 at 02:55:51PM -0400, akanwar at digitarchy.com wrote:
> Hi all,
>  
> Is there a way in freebsd to check for bad blocks. Linux can do this via a
> -c flag to mkfs; but newfs for FreeBSD does not seem to have this
> functionality.
> 
> The issue is that I have a IDE disk that I suspect to be bad )but there
> have been no ATA resets or logged errors so far). I either need to do a bad
> block check while creating a filesystem or some other diagnostic tool that
> can do a low level check on the disk.
> 
> Thanks,
> -ansh

Hi,

Probably the best thing to do is download the disk manufacturer's diagnostic
program (usually some kind of bootable floppy image) and run that against
the drive.  Modern drives do bad block mapping internally, so you won't see
any errors until the drive has run out of spare blocks -- at this point you
replace the drive and hope your backups are in good shape :-)

My understanding is that SMART is supposed to help you out here by giving
you some advance warning of drive problems, before the thing completely stops
working.  I've never actually seen this happen with any drive on any OS,
however.  Anyone know of any FreeBSD-friendly SMART diagnostic tools?

	Scott



More information about the freebsd-questions mailing list