How to read bad blocks error message & marking of same

Doug White dwhite at gumbysoft.com
Mon Aug 9 19:03:41 PDT 2004


On Tue, 3 Aug 2004, DH wrote:

> I've begun rec'ing these error messages:
>  ad0s1a: hard error reading fsbn 141935 of 70848 - 71103 (ad0s1 bn
> 141935; cn 8 tn 212 sn 59 ) status=59 error=40
>
> Got about 7 of these with varying values.

Yay disk errors.  The interesting number is the 'fsbn' which is the block
number.

> I ran Seagate's diag utility and it reported only 1 bad block.
> Unfortunately ad0s1a happens to my / dir so allowing the utility to
> write zeros to that block hasn't sat well with me.

Odd it only found one when the fsbn changes.  Unfortunately you don't have
much choice in the matter; you either get the bad block errors and
"Input/Output error" messages when accessing the file, or if you zero it,
the block will be remapped but whatever file is there is corrupted.  That
file is already corrupted is zeroing part of it is probably an
improvement. :)

A backup is recommended, if you can get one.  That may identify where
the faulty file is.  If its non-critical, then zero the block with the
Seagate tool, then delete the file afterward.

I stronly suggest a full fsck afterwards on the affected volume after any
repair operation. Boot single user and use fsck -y. If it is / thats
affected you may need to boot off a CD so you can write the root volume
for the fsck.

>  ad0s1 bn 141935  ?

This is the device and offset into the device. In this case ATA disk 0,
slice 1.  The stuff after this is mostly interesting to developers.

> cn 8 ?
>
> tn 212 ?
>
> sn 59 ?

Cylinder, track, and sector, I think.

> status = 59 ?
> error = 40 ?

ATA status and error registers.

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite at gumbysoft.com          |  www.FreeBSD.org


More information about the freebsd-fs mailing list