RAID management interface
RAID device drivers which support management functionality can
register their services with the
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:
- Control the RAID card's alarm functionality, if supported.
alarm-function may be one of:
- Disable the alarm on the RAID controller.
- Enable the alarm on the RAID controller.
- Retrieve the current alarm state (enabled or disabled).
- Silence the alarm if it is currently beeping.
The alarm-function may be specified as given above, or by the first letter only (e.g. -a e).
- Instruct the device at channel:target[.lun] to start blinking, if there is ses(4) or safte(4) support in the enclosure.
- If the device at channel:target[.lun] is currently marked “Unused”, promote it to being a “Hot Spare”.
- Where necessary, produce “human-readable” output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte, Exabyte in order to reduce the number of digits to four or less.
- Enumerate the selected RAID devices. This is the default if no other option is given.
- Show vendor, product, revision, and serial number for the given disk.
-Rdevice | channel:target[.lun]
- Manually kick off a rebuild of a degraded RAID volume, using device or channel:target[.lun] as a new chunk (with softraid(4), a partition of fstype “RAID”), replacing the offline chunk in the volume; it is not possible to change the number of chunks. device must be specified as a full path to the chunk device file (e.g. /dev/wd0d). A RAID volume rather than a RAID controller is expected as the final argument.
- Control the RAID card's patrol functionality, if supported.
patrol-function may be one of:
- Stop the patrol on the RAID controller.
- Start the patrol on the RAID controller.
- Retrieve the current patrol configuration.
- Disable the patrol functionality.
- Enable the patrol functionality to start/stop manually.
- Enable the patrol functionality to start/stop automatically in every interval seconds, starting the first iteration after start seconds.
- Instruct the device at channel:target[.lun] to cease blinking, if there is ses(4) or safte(4) support in the enclosure.
- Be more verbose in output.
In addition to the relevant options listed above, the options for softraid(4) devices are as follows:
- Pass flag to
bioctl. May be one of:
- Force the operation; for example, force the creation of volumes with unclean data in the metadata areas.
- Do not automatically assemble this volume at boot time.
- Create a new
softraid(4) volume of level raidlevel. The
device must be “softraid0”; it supports multiple volumes.
Valid 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
- Detach volume specified by device.
- Use special device keydisk as a key disk for a crypto volume.
- Use the chunk device list to create a new volume
softraid(4) framework. Requires
-Ochunk | channel:target[.lun]
- Set the state of chunk or channel:target[.lun] to offline. The state of the RAID volume will change in the same way that it would if the disk physically went offline. chunk must be specified as a full path to the chunk device file (e.g. /dev/wd0d). A RAID volume rather than a RAID controller is expected as the device argument.
- Change the passphrase on the selected crypto volume.
- Passphrase file used when crypto volumes are brought up. This file must be root owned and have 0600 permissions.
- The number of iterations for the KDF algorithm to use when converting a passphrase into a key, in order to create a new encrypted volume or change the passphrase of an existing encrypted volume. A larger number of iterations takes more time, but offers increased resistance against passphrase guessing attacks. If rounds is specified as "auto", the number of rounds will be automatically determined based on system performance. Otherwise the minimum is 4 rounds and the default is 16.
- Read the passphrase for the selected crypto volume from /dev/stdin rather than /dev/tty. This option cannot be used during the initial creation of the crypto volume.
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
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
bio(4), scsi(4), softraid(4)
bioctl command first appeared in
bioctl interface was written by