Subject: 1.1 netbsd disklabel evilness
To: None <port-hp300@NetBSD.ORG>
From: Paul <>
List: port-hp300
Date: 07/01/1999 23:35:09
Dear Anyone;

	Ive had netbsd on my 340 for years, and havent upgraded since 1.1 came
  Anyway, I just got a couple of scsi disks, and decided to
play with them.
	It wasnt labeled, so I put this label on there, and newfs'd the
/dev/sd2c (like you see below)

type: SCSI
flags: hp-97548s
bytes/sector: 512
sectors/track: 56
tracks/cylinder: 16
sectors/cylinder: 896
cylinders: 1447
rpm: 4002
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

3 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  c:  1296512        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 1446)


	I mounted this and played with it a bit, then decided to put a 'real'
disklabel on there with a: and b:, etc.
	Only it wont let me. disklabel either crashes and dumps core (if, for example,
I edit the text I saved of the label and do: disklabel -Rr sd2 mylabel.txt,
or try disklabel -er sd2)
   It gives me this:
disklabel: ioctl DIOCSDINFO: Open partition would move or shrink
	If I just try to shrink c: or use a 'close' entry from /etc/disktab.
	I managed to change the fstype to 'ununsed', but it still wont let me
change things.
	Ive tried dd'ing zeros over /dev/[r]sd0c, to no avail. (my disklabel doesnt
have the -z option, which I gather some do...)
	Any advice? (reboot, and try then?)
	(What is the real meaning of 'open partition'?)


ps. please CC me, as I am not on this list now.