Subject: Re: disklabel revisted
To: None <port-hp300@NetBSD.ORG>
From: David Jones <dej@inode.org>
List: port-hp300
Date: 06/23/1997 17:57:21
Nathan Gelbard wrote:
| disklabel -R -r rd2 image (where image is a text file holding the above)
| disklabel: ioctl DIOCSDINFO: Open partition would move or shrink.
| 
| Now, rd2-3 aren't mounted. They are exactly the same disk (rd7959B).
| 
| Whats happening here? 

They may not be mounted, but they are open.  Disklabel needs to open the
c partition to write the new label.  And if the "default" label cooked
up by the kernel makes this partition larger than what you want it to be,
you get this message.

This is arguably broken; disklabel should let you do this anyway (perhaps
with a warning).  If users want to shoot themselves in the foot, let them.

The quick solution is to note the size of the c partition in the kernel's
label, and adjust the size of your c partition to match.