Subject: Re: anybody know how to use scsictl reassign?
To: John Refling <johnr@imageworks.com>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 05/20/2000 01:49:06
[ On Friday, May 19, 2000 at 15:22:02 (-0700), John Refling wrote: ]
> Subject: anybody know how to use scsictl reassign?
>
> My disk occasionally has problems, and I get the following
> log message

Your disk probably doesn't have the AWRE (Auto Write Reallocation
Enabled) and ARRE (Auto Read Reallocation Enabled) bits in mode page #1
turned on.  For some reason I've never found any explanation for there
are lots of drives that arrive from the factory with these bits turned
off in their default configuration; and even worse most disk drivers (at
least in unix) don't seem to care to forcibly turn them on whenever
possible.

With automatic reallocation enabled you should never have to manually
re-assign a block on any kind of drive that's less than 6-8 years old.

You will still get messages logged saying that sectors have been
recovered and reassigned (or just reassigned if recovery fails) so you
can still tell when it's time to order a new drive.

This happened on one of my disks recently (in such a way that fsck
wouldn't complete) so I extracted Julian ELischer and Peter Dufault's
"scsi" tool and its associated library and headers, etc., from the Attic
of FreeBSD's repository (it first appeared in 386BSD 0.1.2.4 actually),
compiled it (on NetBSD i386/1.4V) without much trouble and few changes,
and used it to turn on AWRE and ARRE on my disks and I've had no trouble
with them since.  I don't know for sure that "scsi" (or rather the
scsi_lib.c library) will work without hacking on NetBSD/sparc (which may
be one reason why it was never imported into the tree), but it probably
wouldn't hurt to try.

(I think I first tried "scsictl reassign" too and it didn't work for me
either.)

Someone who has the time really should pull all the "scsi" mode-page
handling into "scsictl".  It would be cool to have support for freezing
the bus and adjusting the kernel SCSI debug level too.

(I haven't acquired a new drive to replace my failing one yet ...  :-)

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>