Salyzyn, Mark wrote:
An unrecoverable medium error is typically `corrected' when a write to
the block occurs. RAID cards will use the redundancy to calculate the
data and write it back to the offending drive for instance.

Otherwise, for none-redundant stores, bad media is as good as anything
to remind one that the data is gone ;->

Sincerely -- Mark Salyzyn

All may not be lost. If a medium error occurs and the ASC and ASCQ imply the sector could be read but failed ECC then the READ LONG SCSI command should fetch the block (plus ECC and other data). For example a Fujitsu MAM3184 returns 576 bytes. It is probably too much to expect that all the damage will be in the last 64 bytes.

As Mark pointed out, if /dev/sda is a virtual disk then it is
unlikely that the READ LONG SCSI command will be supported.

sg3_utils has a sg_read_long utility. "Long" blocks can
be written to the media with the sg_write_long utility
which was introduced mainly for testing (e.g. creating
"artificial" medium errors).


BTW I noticed that the block layer reads "around" a medium error. Say 8 KB is being read and a medium error occurs (and the info field is set to the lba of the first failure) then several small reads are done to reconstruct as much of the original 8 KB as possible (probably with a block of zeroes corresponding to the medium error).

Doug Gilbert

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bryan Henderson
Sent: Tuesday, February 01, 2005 1:01 PM
To: [EMAIL PROTECTED]
Cc: Kit Gerrits; linux-scsi@vger.kernel.org
Subject: Re: Disk Errors


So there are two situations in which damaged blocks remain
accessible:
  1) unrecoverable medium errors
...


What's the rationale behind leaving a damaged block accessible in the
case of an unrecoverable medium error? A possibility that someone might actually be able to recover the data?
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html



- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Reply via email to