Subject: Re: Soft error on disk write corrupted drive
To: John Nemeth <jnemeth@victoria.tc.ca>
From: Daniel Carosone <dan@geek.com.au>
List: port-i386
Date: 08/31/2007 14:36:40
--QxN5xOWGsmh5a4wb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Aug 30, 2007 at 01:42:47PM -0700, John Nemeth wrote:
> The "id not found" is a dead giveaway.  The disk electronics are
> having trouble reading the disk.  The disk is toast.  Replace it.

Not necessarily, though perhaps.  It may be just that sector that
needs remapping, and that can happen often on drives that still have
many years of life left.

I've found, however, that drives don't seem to remap on write unless
one of two circumstances is true:
 - write cache is off
 - the sector has previously been found bad on read, and marked as
   "offline uncorrectable".

The best way to make sure the latter is true and avoid the penalty of
the former, is to make sure the drive is doing regular background
surface scans and offline test. As a significant bonus, this hopefully
will allow marginal sectors to be detected and recovered and remapped
on read, well before they become unrecoverable.  Use the smartmontools
pkg, and:

# smartctl --smart=on --offlineauto=on --saveauto=on -d ata /dev/rwd0d

Many drives only seem to actually mark sectors "offline uncorrectable"
if the problem is found in the background test, rather than in normal
read operations. Possibly, this is because our drivers are resetting
the drive too soon in their own attempt at error recovery, before the
drive firmware has given up and flagged the sector for remap on next
write.

Of course, replacing the drive and then doing this might be an even
better option.  It's especially important on a new drive to make sure
the surface has been scanned like this before you start filling it
with data.

--
Dan.
--QxN5xOWGsmh5a4wb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFG15rYEAVxvV4N66cRAvvCAJsGjiRZE1GMT3+A4yPBLL1Ymp+n2gCgxBTg
WyVdk+5iOjfd+OnS1/Us4SM=
=gPG7
-----END PGP SIGNATURE-----

--QxN5xOWGsmh5a4wb--