Subject: Re: Rash of "sd0(aha0:0:0): medium error, info = NNNNNN (decimal)" errors
To: None <earle@isolar.tujunga.ca.us>
From: Luke Mewburn <lm@melb.cpr.itg.telecom.com.au>
List: port-i386
Date: 04/22/1995 22:38:41
> On practically every sync() now, I get a small rash of the error messages in
> the Subject: field; more specifically, the last few have been:

> ias-pc:1:30 [/var/log] % tail -5 messages
> Apr 21 23:29:01 /netbsd: sd0(aha0:0:0): medium error, info = 441482 (decimal)
> Apr 21 23:29:01 /netbsd: sd0(aha0:0:0): medium error, info = 441482 (decimal)
> Apr 21 23:29:22 /netbsd: sd0(aha0:0:0): medium error, info = 441494 (decimal)
> Apr 21 23:29:23 /netbsd: sd0(aha0:0:0): medium error, info = 441494 (decimal)
> Apr 21 23:29:29 /netbsd: sd0(aha0:0:0): medium error, info = 441496 (decimal)

> The machine has an Adaptec 1542CF SCSI controller and a Seagate ST31200N 1.06
> Gb disk drive:

> These messages have been happening for the last week or so, and all the "info"
> numbers (are these physical disk sector numbers?) are all around this 4414xx
> range.

> As I'm a SPARC person by nature and a NetBSD/i386 neophyte, any suggestions
> regarding how & what to do to deal with this would be appreciated.  My naive
> reading says that the disk is returning a hard media error at those blocks,
> and somehow I'll have to do a sort | uniq on those "info" numbers to glean a
> list of numbers that (I presume) will have to be fed to "badsect" or "bad144"
> or somesuch ... Yes?

I have had similar problems in the past. I interpret "medium errors"
to be when the disk has used up all of its 'bad block' allocation area
and there isn't any more space.

A couple of suggestions:
a) backup all of your data. Now.
b) reformat the drive with the AHA's format disk command. use the
   verify command with re-map blocks option (if such an option exists;
   it's been a while since I used that option and my AHA1542CF PC is
   1000 miles away.) This should pickup the error.
c) try the disk on another box (e.g, a sparc). format the disk.
   partition it into two partitiokns. Use a dd between the two raw
   partitions (dd if=/dev/rrz0e of=/dev/rrz0f bs=32k count=HUGENUM) and
   back again. This hammers the drive.
d) Try and get hold of the SCSI formatting software that does the
   multipass "certified" format (not the dinky kind that most formatting
   software does on various platforms; this is the stuff that the drive
   vendors use) Of course, this is probably hard to get.
c) if you get no luck, take the drive back under warranty. In fact,
   I'd probably do that if you get any problems in b) or c).


> Please reply to me directly as I'm not (yet) on the port-i386 list ...

(cc-ed to the list)


PS: sorry for any incoherency. It's been a long day, and it's the start of
a long night (at work).