Fwd: How to read bad blocks error message & marking of same

Dan Nelson dnelson at allantgroup.com
Fri Aug 6 12:38:46 PDT 2004


In the last episode (Aug 06), Gary Corcoran said:
> Mike Meyer wrote:
> 
> >Modern drives deal with bad block substitution all by themselves.
> 
> Umm - not quite, right?  That is, if a block "goes bad" and you get a
> read error, the drive isn't going to do any "substituting" at that
> point.  You'll just continue to get the read error if you try to
> access (read) that block.  It's only when you allow another *write*
> to that block (e.g. by deleting the original file and writing new
> files) that the drive will automatically substitute a spare block for
> the one that went bad.

SCSI drives, at least, may do automatic reallocation on both reads and
writes ( camcontrol mode da0 -m 1, the ARRE and AWRE flags ).  If the
drive had to reread the block or had to use ECC to recover data, AND
the entire block was recovered, it will relocate the data if ARRE is
set.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list