OpenBSD: Destroy a Softraid Partition
Posted on September 14, 2016
Booting an OpenBSD’s installation media and trying to remove previously created softraid
partitions may end up with the following error:
disklabel: ioctl DIOCWDINFO: Open partition would move or shrink
disklabel: unable to write label
Here is how to resolve this issue…
The Issue
The problem is that the device nodes (in the /dev
directory) are not created automatically by default after the installation media boots.
The Solution
Here is how to create the device nodes manually:
$ cd /dev
$ sh MAKEDEV sd0
$ sh MAKEDEV sd1
…continue for as many nodes as necessary.
Now, it is possible to detach an sdX
softraid0
partition (will destroy data):
$ bioctl -d sdX
And finally, to edit the disklabel
of disk sdY
(will destroy data):
$ disklabel -E sdY
d a
d b
… and continue for as many partitions as necessary.