BIOCTL(8) | System Manager's Manual | BIOCTL(8) |
bioctl
— RAID
management interface
bioctl |
[-hiqv ] [-a
alarm-function] [-b
channel:target[.lun]]
[-H
channel:target[.lun]]
[-R chunk |
channel:target[.lun]]
[-t patrol-function]
[-u
channel:target[.lun]]
device |
bioctl |
[-dhiPqsv ] [-C
flag[,flag[,...]]]
[-c raidlevel]
[-k keydisk]
[-l
chunk[,chunk[,...]]]
[-O chunk |
channel:target[.lun]]
[-p passfile]
[-R chunk |
channel:target[.lun]]
[-r rounds]
device |
RAID device drivers which support management functionality can
register their services with the bio(4)
driver. bioctl
then can be used to maintain RAID
volumes.
In the first synopsis, RAID controllers are managed. device specifies either a drive (e.g. sd0) or a RAID controller (e.g. ami0). For operations which will be performed against ses(4) or safte(4) enclosures, it is also possible to directly specify the enclosure name (e.g. safte0).
In the second synopsis, softraid(4) volumes are managed. device specifies either a volume (e.g. sd0) or the softraid(4) controller (always softraid0).
The options for RAID controllers are as follows:
-a
alarm-functiondisable
enable
get
silence
|
quiet
The alarm-function may be specified as given above, or by the first letter only (e.g. -a e).
-b
channel:target[.lun]-H
channel:target[.lun]-h
-i
-q
-R
chunk |
channel:target[.lun]-t
patrol-functionstop
start
get
disable
manual
auto
[.interval[.start]]-u
channel:target[.lun]-v
In addition to the relevant options listed above, the options for softraid(4) devices are as follows:
-C
flag[,flag[,...]]bioctl
. May be
one of:
-c
raidlevelValid raidlevels are:
The CONCAT discipline requires a minimum of one chunk, RAID 0
and RAID 1 disciplines require a minimum of two chunks, RAID 5 requires
a minimum of three chunks and the CRYPTO discipline requires exactly one
chunk to be provided via -l
.
-d
-k
keydisk-l
chunk[,chunk[,...]]-c
.-O
chunk |
channel:target[.lun]-P
-p
passfile-r
rounds-s
Configure a new softraid(4) volume with four chunks (/dev/sd2e, /dev/sd3e, /dev/sd4e, /dev/sd5e) and a RAID level of 1:
# bioctl -c 1 -l /dev/sd2e,/dev/sd3e,/dev/sd4e,/dev/sd5e softraid0
Configure a new softraid(4) volume with one chunk (/dev/sd2e) and an encrypting discipline:
# bioctl -c C -l /dev/sd2e softraid0
bioctl
will ask for a passphrase, which
will be needed to unlock the encrypted disk. After creating a newly
encrypted disk, the first megabyte of it should be zeroed, so tools like
fdisk(8) or
disklabel(8) don't get confused by the
random data that appears on the new disk:
# dd if=/dev/zero of=/dev/rsd3c bs=1m count=1
Detaching a softraid volume requires the exact volume name. For example:
# bioctl -d sd2
Start a rebuild of the degraded softraid volume sd0 using a new chunk on wd0d:
# bioctl -R /dev/wd0d sd0
The bioctl
command first appeared in
OpenBSD 3.8.
The bioctl
interface was written by
Marco Peereboom
<marco@openbsd.org>.
October 30, 2020 | OpenBSD-current |