Re: SCSI Sector Size Problem

Philip Blundell (
Sat, 2 Nov 1996 00:58:19 +0000 (GMT)

On Fri, 1 Nov 1996, Nicholas J. Leon wrote:

> # mke2fs will do bad-block checking if you use the -c option. This, like
> # MS-DOS reads the entire disk drive during its high-level format. The
> # problem is that this doesn't catch all errors.
> #
> It doesn't even catch the errors it reports. I have to disagree,
> mke2fs (with the -c option) doesn't do anything about the bad blocks.
> Example: I was reformatting a drive the other day and had a HOST of
> errors. In one window I had a "tail -f /var/log/kernel" running,
> watching the errors appear:
> hdb: read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
> hdb: read_intr: error=0x40 { UncorrectableError }, LBAsect=306946, sector=306945
> end_request: I/O error, dev 03:41, sector 306945
> Then after all is said and done, I do a "dd if=/dev/zero of=/dev/hdb"
> and sure enough, I get errors in the exact same locations.
> If mke2fs was mapping (or marking) those blocks away, I wouldn't get
> the error again, would I? Or am I missing something vital here?

You're missing the point. mke2fs doesn't remap the sectors, because
there's no generic way to do it (and many drives can't). Nor can it make
them magically go away. All it does is mark them as bad in the
_filesystem_ so that no data will be stored there. If you do "dd
if=/dev/hdb" you bypass the filesystem layer altogether, and so any bad
blocks marked there will be ignored.