Re: Marking sectors on IDE drives as bad

Andreas Dilger (adilger@turbolinux.com)
Tue, 23 Jan 2001 08:28:37 -0700 (MST)


You write:
> I'm experiencing some fscking problems due to a defective IDE drive.
>
> exerpt from /var/log/messages:
> Jan 22 09:31:29 evil kernel: hda: read_intr: status=0x59 { DriveReady
> SeekComplete DataRequest Error }
> Jan 22 09:31:29 evil kernel: hda: read_intr: error=0x01 { AddrMarkNotFound
> }, LBAsect=10262250, sector=1311147
> Jan 22 09:31:29 evil kernel: ide0: reset: success
> Jan 22 09:31:29 evil kernel: hda: read_intr: status=0x59 { DriveReady
> SeekComplete DataRequest Error }
> Jan 22 09:31:29 evil kernel: hda: read_intr: error=0x40 { UncorrectableError
> }, LBAsect=10262250, sector=1311147
> Jan 22 09:31:29 evil kernel: end_request: I/O error, dev 03:05 (hda), sector
> 1311147
>
> Is it possible to somehow mark the above sector as bad (in ll_rw_block.c or
> similar) to circumvent the problem?

Chances are, you should replace the drive, because this sort of problem
usually gets worse as time goes on.

That said, it is possible for ext2 to mark the sectors bad (assuming you
use ext2 and not reiserfs), and then they will never be used. You can
use the "badblocks" program in conjunction with e2fsck or mke2fs to mark
the blocks bad in the filesystem.

I would suggest keeping good backups after that.

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/