Subject: Re: Scsi disk bad, any suggestions?
To: Tobias Weingartner <weingart@austin.brandonu.ca>
From: Volker Brandt <volker@iam.uni-bonn.de>
List: netbsd-help
Date: 04/12/1995 12:41:47
Hello Tobias!

> aha0 at isa0 port 0x330-0x333 irq 11 drq 5
> scsibus0 at aha0
> aha0 targ 0 lun 0: <FUJITSU M2694S-512      0124> SCSI2 direct fixed
> sd0 at scsibus0: 1033MB, 1819 cyl, 15 head, 77 sec, 512 bytes/sec
> aha0 targ 2 lun 0: <TOSHIBA CD-ROM XM-3401TA0283> SCSI2 readonly removable
> cd0 at scsibus0: drive empty

I have the exact same combination [except for a few more devices :-)]

> /netbsd: sd0(aha0:0:0): non-media hardware failure, info = 55728 (decimal) 
> /netbsd: sd0(aha0:0:0): medium error, info = 55729 (decimal) 

This is an indication for a bad block on the disk, as you deduced correctly.
However, this should not be fixed within NetBSD, but rather with the SCSI 
firmware of the disk.

Here's how:  BACKUP EACH AND EVERYTHING FIRST!  You are going to lose the 
data that was in the damaged sector.  If that's a directory, the damage can
be extensive.  Boot your system and press Control-A when the prompt appears.
You are now in the 1542CF BIOS.  Go through the menu and select "SCSI 
utilities"  [sorry, this is all from memory].  Select the disk and start
"disk verify".  The BIOS will then tell you that any defective blocks will be
remapped -- this is what you want.  The process will take a while, sometimes
you have to run it several times until all defective blocks are caught.

Reboot, run an fsck and note the files that were affected.  Replace those, and
you're all set.


Hope this helps -- Volker

-- 
----------------------------------------------------------------------------
Die schoenste Nation ist die Resignation. 		Volker A. Brandt
Internet: volker@iam.uni-bonn.de			Angewandte Mathematik
Phone/FAX number available upon request			(Bonn, Germany)