---
name: "bioctl"
section: "8"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/bioctl/8"
---

# bioctl(8)

storage management interface

## NAME

**bioctl** – storage management interface

## SYNOPSIS

**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*

## DESCRIPTION

**bioctl** is used to interact with device drivers that register with [bio(4)](/bio/4.md).

The **-h**, **-i**, **-q**, and **-v** options are used to display information about the specified *device*:

- **-h**

  Where appropriate, 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.

- **-i**

  Display default information for the specified device. For example, for hardware RAID controllers enumerate attached devices. This is the default if no options are specified.

- **-q**

  If *device* is an [sd(4)](/sd/4.md), display its vendor, product, revision, and serial number.

- **-v**

  Be more verbose in output.

The 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)](/ses/4.md) enclosure.

The second synopsis shows options used to manage [softraid(4)](/softraid/4.md) volumes (e.g. sd0) or the softraid controller itself (always softraid0).

The options for hardware RAID controllers are as follows:

- **-a** *alarm-function*

  Control the RAID card's alarm functionality, if supported. *alarm-function* may be one of:

  - **disable**

    Disable the alarm on the RAID controller.

  - **enable**

    Enable the alarm on the RAID controller.

  - **get**

    Retrieve the current alarm state (enabled or disabled).

  - **silence** \| **quiet**

    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).

- **-b** *channel*:*target*\[.*lun*\]

  Instruct the device at *channel*:*target*\[.*lun*\] to start blinking, if there is [ses(4)](/ses/4.md) support in the enclosure.

- **-H** *channel*:*target*\[.*lun*\]

  If the device at *channel*:*target*\[.*lun*\] is currently marked “Unused”, promote it to being a “Hot Spare”.

- **-R** *chunk* \| *channel*:*target*\[.*lun*\]

  Manually kick off a rebuild of a degraded RAID volume, using *chunk* or *channel*:*target*\[.*lun*\] as a new chunk replacing the offline chunk in the volume. It is not possible to change the number of chunks. The *chunk* must be specified as a full path to a device file (e.g. /dev/wd0d). A RAID volume rather than a RAID controller is expected as the final argument.

- **-t** *patrol-function*

  Control the RAID card's patrol functionality, if supported. *patrol-function* may be one of:

  - **stop**

    Stop the patrol on the RAID controller.

  - **start**

    Start the patrol on the RAID controller.

  - **get**

    Retrieve the current patrol configuration.

  - **disable**

    Disable the patrol functionality.

  - **manual**

    Enable the patrol functionality to start/stop manually.

  - **auto**\[.*interval*\[.*start*\]\]

    Enable the patrol functionality to start/stop automatically in every *interval* seconds, starting the first iteration after *start* seconds.

- **-u** *channel*:*target*\[.*lun*\]

  Instruct the device at *channel*:*target*\[.*lun*\] to cease blinking, if there is [ses(4)](/ses/4.md) support in the enclosure.

The options for [softraid(4)](/softraid/4.md) devices are as follows:

- **-C** *flag*\[,*...*\]

  Pass *flag* to **bioctl**. May be one of:

  - **force**

    Force the operation; for example, force the creation of volumes with unclean data in the metadata areas.

  - **noauto**

    Do not automatically assemble this volume at boot time.

- **-c** *raidlevel*

  Create a new [softraid(4)](/softraid/4.md) volume of level *raidlevel*. The *device* must be “softraid0”; it supports multiple volumes.

  Valid raidlevels are:

  - **0**

    RAID 0: A striping discipline.

  - **1**

    RAID 1: A mirroring discipline.

  - **5**

    RAID 5: A striping discipline with floating parity chunk.

  - **C**

    CRYPTO: An encrypting discipline.

  - **c**

    CONCAT: A concatenating discipline.

  - **1C**

    RAID 1 + CRYPTO: An encrypting and mirroring discipline.

    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**

  Detach volume specified by *device*.

- **-k** *keydisk*

  Use special device *keydisk* as a key disk for a crypto volume.

- **-l** *chunk*\[,*...*\]

  Use the *chunk* device list to create a new volume within the [softraid(4)](/softraid/4.md) framework. Requires **-c**.

- **-O** *chunk* \| *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. The *chunk* must be specified as a full path to a device file (e.g. /dev/wd0d). A RAID volume rather than a RAID controller is expected as the *device* argument.

- **-P**

  Change the passphrase on the selected crypto volume.

- **-p** *passfile*

  Passphrase file used when crypto volumes are brought up. This file must be root owned and have 0600 permissions.

- **-R** *chunk* \| *channel*:*target*\[.*lun*\]

  Manually kick off a rebuild of a degraded volume, using *chunk* or *channel*:*target*\[.*lun*\] as a new chunk, replacing the offline chunk in the volume. It is not possible to change the number of chunks. The *chunk* must be specified as a full path to a device file (e.g. /dev/sd0d) which refers to a partition of fstype RAID. A [softraid(4)](/softraid/4.md) volume rather than softraid0 is expected as the final argument.

- **-r** *rounds*

  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. By default, or if *rounds* is specified as **auto**, the number of rounds will automatically be based on system performance. The minimum is 16 rounds.

- **-s**

  Read passphrases from */dev/stdin* rather than */dev/tty*, without prompts, confirmation or retry on mismatch.

## EXAMPLES

Configure a new [softraid(4)](/softraid/4.md) 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)](/softraid/4.md) 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)](/fdisk/8.md) or [disklabel(8)](/disklabel/8.md) 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
```

## SEE ALSO

[bio(4)](/bio/4.md), [scsi(4)](/scsi/4.md), [softraid(4)](/softraid/4.md)

## HISTORY

The **bioctl** command first appeared in OpenBSD 3.8.

## AUTHORS

The **bioctl** interface was written by Marco Peereboom ⟨*marco@openbsd.org*⟩.
