Any way to lock down disk errors?

Lowell Gilbert freebsd-questions-local at
Wed Nov 12 06:08:31 PST 2003

Jim Hatfield <subscriber at> writes:

> Strictly speaking OT but the machine is running FreeBSD.
> While copying a file I got I/O errors. The console shows:
> >ad0: hard error cmd=read fsbn 31891359 of 31891359-31891486 status=59 error=40
> >ad0: hard error cmd=read fsbn 31891231 of 31891231-31891486 status=59 error=40
> Given that the disk is just under three months old, is it worth doing
> anything other than getting it replaced? I have no other disk big
> enough to old the data on it so unless the supplier sends me a
> replacement ahead of me returning the faulty one it will be a pain.
> I have enough space to empty the partition with the error in, but I
> couldn't find anything in newfs or fsck which would let me map out
> selected blocks or to do a full write test of each block and map out
> bad ones. Is there such a beast?

Unfortunately, this doesn't really do any good any more.  Disks will
do this internally before even reporting errors back to you, so if
you're getting a lot of problems, then it's possible (but rare) that a
manufacturer's maintenance tool will straighten out the trouble, but
even then you'd need to backup everything off of it first...

If you want to try badsect(8), you can, but it isn't for the

More information about the freebsd-questions mailing list