| BIOCTL(8) | System Manager's Manual | BIOCTL(8) |
bioctl — storage
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[,...]]
[-c raidlevel]
[-k keydisk]
[-l
chunk[,...]]
[-O chunk |
channel:target[.lun]]
[-p passfile]
[-R chunk |
channel:target[.lun]]
[-r rounds]
device |
bioctl is used to interact with device
drivers that register with
bio(4).
The -h, -i,
-q, and -v options are used
to display information about the specified device:
-h-i-q-vThe first synopsis shows options used to manage hardware RAID controllers. device specifies either a drive (e.g. sd1), a hardware RAID controller (e.g. ami0) or a ses(4) or safte(4) enclosure.
The second synopsis shows options used to manage softraid(4) volumes (e.g. sd0) or the softraid controller itself (always softraid0).
The options for hardware RAID controllers are as follows:
-a
alarm-functiondisableenablegetsilence
|
quietThe 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]-R
chunk |
channel:target[.lun]-t
patrol-functionstopstartgetdisablemanualauto[.interval[.start]]-u
channel:target[.lun]The options for softraid(4) devices are as follows:
-C
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.
The RAID 1C discipline requires a minimum of two chunks when a new volume is created, and a minimum of one chunk when an existing volume is assembled. Missing RAID 1C chunks will be marked as offline and must be rebuilt before they become part of the array again.
-d-k
keydisk-l
chunk[,...]-c.-O
chunk |
channel:target[.lun]-P-p
passfile-R
chunk |
channel:target[.lun]-r
roundsauto,
the number of rounds will automatically be based on system performance.
The minimum is 16 rounds.-sConfigure 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
Show detailed information about the nvme0 controller:
# bioctl -v nvme0
The bioctl command first appeared in
OpenBSD 3.8.
The bioctl interface was written by
Marco Peereboom
<marco@openbsd.org>.
| July 15, 2024 | openbsd |