[1135] in linux-scsi channel archive
Re: medium error, what next?
daemon@ATHENA.MIT.EDU (Stefan Esser)
Fri Dec 20 09:29:57 1996
Date: Fri, 20 Dec 1996 15:19:46 +0100
From: se@freebsd.org (Stefan Esser)
To: srb@cuci.nl (Stephen R. van den Berg)
Cc: linux-scsi@vger.rutgers.edu, ncr53c810@colorado.edu
In-Reply-To: <199612201118.MAA06113@hera.cuci.nl>; from Stephen R. van den Berg on Dec 20, 1996 12:18:21 +0100
On Dec 20, srb@cuci.nl (Stephen R. van den Berg) wrote:
> This is what I found in the logs (I had deliberately done a
> dd bs=1024 if=/dev/sdd of=/dev/null):
>
> Dec 20 12:05:41 dionysus kernel: scsi0: MEDIUM ERROR on channel 0, id 3, lun 0, CDB: 0x08 07 f8 78 78 00
> Dec 20 12:05:41 dionysus kernel: Current error sd08:30: sns = f0 3
> Dec 20 12:05:41 dionysus kernel: ASC=11 ASCQ= 0
> Dec 20 12:05:41 dionysus kernel: Raw sense data:0xf0 0x00 0x03 0x00 0x07 0xf8 0x7f 0x18 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x80
> Dec 20 12:05:41 dionysus kernel: scsidisk I/O error: dev 08:30, sector 522366
>
> This is on a 2.0.27 machine, under ELF, using the BSD-ncr driver.
>
> What should I do at this point (beside panic :-)?
> How do I tell the drive to remap this particular sector? Or, alternately,
> maybe I should make Linux skip it?
>
> Anyone who can spare some words of wisdom here?
Set the AWRE and ARRE bits in the drive's SCSI mode page 1.
Then repeat the "dd ..." to scan the drive for bad blocks.
It is possible, that the bad block does persist, until it
is written to the next time. If you can read and write the
RAW device, you can easily accomplish that. Else you may
need to make a backup, recreate the file system and restore
the backup.
Mode page 1 can be edited with the command
scsi -e -m 1 -f /dev/rsd0
under FreeBSD.
If there is no such tool to do this under Linux, you'll have
to resort to one of the public domain DOS tools. (Sorry, can't
help finding such a thing, since I don't run DOS. But I do
know, that they exist ...)
Regards, STefan