Subject: Fixing a corrupt disklabel
To: None <port-pmax@netbsd.org>
From: Philip Tait <Philip.Tait@phxase.allied.com>
List: port-pmax
Date: 05/07/1999 09:54:31
A net booted installation of 1.3.3 on a 5000/200 went well, until I
tried to redo the disklabel on the second disk (a DEC DSP5350S).  The
system had previously been using 1.3_BETA, and I wanted to start clean.

I used the 'sysinst' trick, to disklabel and newfs the second disk.
Unfortunately, somewhere during this process, the disk now has a
disklabel for a 70Gbyte disk.  When I try to write a correct disklabel,
I can't seem to get around the infamous 'disklabel: ioctl DIOCWDINFO:
Open partition would move or shrink' message.

I have tried making a disktab entry, then using it to write (in turn) to
/dev/rrz2a, /dev/rrz2c, etc, as suggested in previous discussions on
this list.

Any suggestions would be welcome.

Here is the dmesg entry for the disk:

rz2 at asc0 drive 2 slave 0 DEC DSP5350S rev 427B
rz2: 3406MB, 3055 cyl, 25 head, 91 sec, 512 bytes/sect x 6976375 sectors

And here is the output of 'disklabel rz2':

type: unknown

disk: mydisk2
label:
flags:
bytes/sector: 512
sectors/track: 91
tracks/cylinder: 520
sectors/cylinder: 47320
cylinders: 3055
total sectors: 144562600
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    94640        0      4.2BSD     1024  8192     0   # (Cyl.    0 -
1)
  b:   189280    94640        swap                        # (Cyl.    2 -
5)
  c: 144562600        0      unused        0     0         # (Cyl.    0
- 3054)
  d: 144278680   283920      4.2BSD     1024  8192     0   # (Cyl.    6
- 3054)

Here is my disktab entry:

DSP5350S|DEC DSP5350S:\
        :dt=SCSI:ty=winchester:\
        :nc#3055:nt#25:ns#91:\
        :su#6976375:\
        :se#512:\
        :pa#65536:oa#0:ta=4.2BSD:ba#8192:fa#1024\
        :pb#131072:ob#65536:tb=swap:\
        :pc#6976375:oc#0:tc=unused:\
        :pd#6779767:od#196608:td=4.2BSD:bd#8192:fd#1024\
        :pe#0:oe#0:te=unused:\
        :pf#0:of#0:tf=unused:\
        :pg#0:og#0:tg=unused:\
        :ph#0:oh#0:th=unused:


--

Philip J. Tait.....AlliedSignal Engines, Phoenix, Az.....pjt@phxase.allied.com