Subject: Re: Is it really the disk drive or something else?
To: Paul F. Wells <paul@wellserv.com>
From: Greg A. Woods <woods@most.weird.com>
List: port-sparc
Date: 09/22/1998 01:12:32
[ On , September 21, 1998 at 23:38:22 (-0400), Paul F. Wells wrote: ]
> Subject: Re: Is it really the disk drive or something else?
>
> Paul Mauriks <pmauriks@ue.com.au> writes:
>
> > I remember seeing something about this a while ago - I think it had to
> > do with the geometry of the disk for the installation (when putting on a
> > disklabel) - I think it was something like that the geometry that was
> > detected was used - but if the information was altered in disklabel
> > incorrectly the machine would not boot afterwards and would require a
> > re-install.
Under SunOS-4 you often get errors from the "format" command, and
sometimes from the OS (the latter are generated by the changes "format"
is making to the label, and usually have something to do with the fact
there is no valid label and so the driver complains).
These are not "SCSI" errors though.
Which reminds me. It seemed as though the "new" NetBSD/sparc 1.3.2
GENERIC kernel (i.e. the one in the default install) had SCSIVERBOSE
turned on (despite the fact it's turned off in the example config file
in the source distribution). This makes it fairly obvious when you've
seen a SCSI error vs. when its something else entirely. Here's an
example error from my tape drive (triggered by "mt status" because the
drive is empty [this should not be an error! but it is from a stupid
old Exabyte 8200]):
st0(esp0:4:0): Check Condition on opcode 0x0
SENSE KEY: Not Ready
INFO FIELD: 16777215
ASC/ASCQ: Logical Unit Not Ready, Cause Not Reportable
Anything remotely resembling this format is a SCSI error. I think
you'll only see this format of SCSI error if your kernel has the
SCSIVERBOSE compile-time option enabled.
> The only catch as I recall it, is that the partitions must be on cylinder
> boundaries:
I'm not even sure that matters for NetBSD, though "disklabel" may
complain if things don't round off properly.
Most SCSI disks don't have "cylinders" per se. Most (all?) modern disks
have variable numbers of sectors per track, and so there is no concept
of track/head addressing for SCSI disks. They're just a vector of
blocks, though the actual layout of those blocks on the multiple
platters in most disks will depend on the head movement algorithms
implemented by the disk's firmware (there are several common patterns,
but not all manufacturers give details for individual disks). Most
manufacturers will supply a "sectors/track" number which is an average
over the whole platter. This number is useful for keeping "disklabel"
and friends happy.
As a result it's just an issue of how the driver and the filesystems
interact, and what the disk partitioning and labeling utilities might
do, since the filesystems are still usually allocated in terms of
cylinders.
(Unfortunately the Berkely Fast File System still has some idea of how
it thinks disks with fixed size cylinders work, and depending on the
actual SCSI disk firmware, the FFS algorithms may work against those of
the disk in terms of optimizing head movement. Of course the effect of
this mis-match depends greatly on many factors that may often be hidden
in real-world circumstances.)
--
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>