Subject: Re: SCSI device tuning tool
To: None <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 01/13/2001 15:56:23
[ On Saturday, January 13, 2001 at 15:31:34 (+0100), Manuel Bouyer wrote: ]
> Subject: Re: SCSI device tuning tool
> On Sat, Jan 13, 2001 at 12:57:29PM +0000, Martin J. Laubach wrote:
> > Having recently been bitten by a failing SCSI disk which obviously
> > has been set to silently remap any bad blocks, I noticed that we
> > don't have any tool to change that behaviour in-tree. Shouldn't
> > here be some utilitiy to change mode page bits, format drives etc.,
> > something like Digital Unix' "scu"?
> > So I'm committed to write such a thing -- has anybody pointers,
> > ideas, fragments that may be used as a starting point as not to
> > write everything from scratch?
> The rigth thing would be to add these features to the scsictl command.
Yeah, probably.... Unfortunately that's been said surprisingly more
often than anything's been done about it.
Meanwhile the last (not latest!) version of the 'scsi' command from
FreeBSD seems to work, at least for the most important mode-page query
and manipulation things one might want to do. I've used it on
everything i386-like from 1.3.3 through 1.5F, and I think it works OK on
sparc (I only tried 1.3.2 IIRC), to check the AWRE and ARRE bits, and to
set them "properly", on my disks.
It shouldn't take too much effort to munge their code or something like
it into scsictl, but meanwhile.... :-)
I just downloaded the latest revisions from the (now in the Attic) RCS
files in FreeBSD's CVS repository and manually compiled things together.
You need scsi.c, scsi.h, scsi_lib.c, scsi_modes, and maybe scsi.8 and
scsi.3. I think NetBSD's <sys/scsiio.h> works, though since I used
"-I." the last time I built it, and I have theirs in ./sys/scsiio.h, I
can't say for sure....
I've hacked on the scsi_modes file a bit to make it understand some of
the mode pages on various Exabyte devices, but the basic disk pages are
all described properly in the original.
I can shar up the files I've got if anyone would like a copy without
having to dig through the FreeBSD repo....
A surprising number of disks come from the manufacturer without
bad-sector reallocation enabled by default (even so-called "server
class" disks!) and I still think the NetBSD SCSI driver should always
force AWRE and ARRE to be on all of the time (except maybe for AWRE if
the device is only open read-only), especially since it itself isn't
prepared to do the bad sector reallocation....
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <robohack!woods>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>