Subject: Re: Segfault with newfs on IBM0662S12
To: None <port-sparc@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 02/26/1997 10:05:25
> BTW: While booting the IBM 0662S12 is announced with 4119 cyl., 5
> heads and 99 sectors.

These are the numbers the drive advertises on its mode sense page 4 (or
5, as the case may be).  The head and cylinder count are probably
accurate; the sector count may or may not be - see below.

> The IBM application sheet for SunOS and the /etc/disktab.shadow
> mentions the geometry with 3803/5/108.  I'm confused about this.

These are probably lies, designed to keep SunOS happy and be not too
far wrong.  When I called iomega to get similar information for my zip
drive, they gave me numbers that were obvious gibberish, clearly the
person on the phone was just reading them off a sheet without any real
understanding.

Many disks, especially the more modern ones, use variable geometry,
whereby the sectors-per-track value varies depending on cylinder
number.  (Such disks can be detected because the total disk size in
sectors generally will not equal the product of the other three
numbers.  I have a patch to sd.c to print out the exact size in sectors
if anyone wants it.)  There is no way to accurately describe such disks
with a single geometry triple; anything you choose will be wrong for at
least part of the disk.  Given modern disks (megabytes of buffering
on-drive, read-ahead and write-behind, under-the-hood sector
replacement, etc), the reason for telling the kernel the geometry is
becoming less and less important anyway; I say just stick whatever
values you find convenient in there.

> sectors/track: 108
> tracks/cylinder: 5
> sectors/cylinder: 540
> cylinders: 3803
> total sectors: 2053620

I note that 108 * 5 * 3803 = 2053620, so this may not be a
variable-geometry disk at all (though I'm not sure where disklabel gets
the "total sectors" value from).

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B