Subject: /etc/disktab entries
To: None <port-pmax@NetBSD.ORG>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 11/27/1996 14:58:59
Executive-Summary: try adding an su# entry to the disktab.

Quoting Robert Rusek <ruske@alpha.fdu.edu>:

>I am haveing the same problem with trying to label my RZ25.  Has a 
>solution been found to this problem?

>After calculating the proper size of the RZ25 of 823608, because the 
>distributed /etc/disktab is wrong.  
>
>I receive error message:
>
>disklabel: ioctl DIOCSDINFO: Open partition would move or shrink

AFAIK, the disktab entries are derived, unchanged, from 4.4bsd/pmax.
Perhaps the NetBSD disklabel is doing more error checking than the
4.4BSD  disklabel did.

In any case, the generic problem seems to be that the DEC disks have
a variable number of sectors per cylinder (ZBR).  The disktab
entries are therefore just a useful approximation of the true
geometry.    The comment for the rz58 mentions that.  What it
_doesn't_  mention is that disklabel now  checks that all partitions
fit in the `total' size of the disk,  and reject a disklabel
containing partitions that go beyond the end of the disk.

When multiplied out, he rounded, approximate geometry often results
in fewer sectors than the disk really has.   This causes disklabel
to reject the disktab entry, because it has ``goes beyond the end of
the disk'' partitions.

I _think_ that what you need to do is to find the true total size of
the disk (e.g., from the boot message from an rz driver), and add that
to the disktab as an su# entry.  (see disktab(5)).

Here' a similar hack that I did locally for an old Fujitsy drive.
Without the su# entry, disklabel rejected this disktab entry,
as  ns * nt * nc it multiples out to only 1230660, or significantly
smaller than the 'c' partition.

fu2263sa|FU2263SA|Fujitsu 2263SA:\
        :dt=SCSI:ty=winchester:ns#53:nt#15:nc#1648:\
        :su#1312344:\
        :pa#32768:ba#8192:fa#1024:\
        :pb#131072:bb#8192:fb#1024:\
        :pc#1312344:oc#0:bc#8192:fc#1024:ta=4.2bsd:\
        :pd#0:bd#8192:fd#1024:\
        :pe#0:be#8192:fe#1024:\
        :pf#0:bf#8192:ff#1024:\
        :pg#1148504:bg#8192:fg#1024:\
        :ph#1148504:bh#8192:fh#1024:

If someone has fixes for the existing pmax disktab entries,
__PLEASE__ either e-mail them to me, to the list, or send them as PRs.

thanks

--Jonathan