bio(4)

bio4

Block i/o ioctl tunnel pseudo-device

Usage

pseudo-device bio [count]

Overview

The bio driver provides userland applications ioctl(2) access to devices otherwise not found as /dev nodes. The /dev/bio device node operates by delegating ioctl calls to a requested device driver. Only drivers which have registered with the bio device can be accessed via this interface.

If count is given in the specification, and is greater than 0, a maximum of one bio device is created.

The following device drivers register with bio for volume management:

ami(4)

American Megatrends Inc. MegaRAID PATA/SATA/SCSI RAID controller

arc(4)

Areca Technology Corporation SAS/SATA RAID controller

cac(4)

Compaq Smart Array 2/3/4 SCSI RAID controller

ciss(4)

Compaq Smart Array SAS/SATA/SCSI RAID controller

gdt(4)

ICP-Vortex and Intel GDT SATA/SCSI RAID controller

ips(4)

IBM SATA/SCSI ServeRAID controller

mfi(4)

LSI Logic & Dell MegaRAID SAS RAID controller

mfii(4)

LSI Logic MegaRAID SAS Fusion RAID controller

mpi(4)

LSI Logic Fusion-MPT Message Passing Interface

mpii(4)

LSI Logic Fusion-MPT Message Passing Interface II

nvme(4)

NVMe storage controllers

softraid(4)

Software RAID

The following device drivers register with bio to provide enclosure management:

ses(4)

SCSI Enclosure Services

The following ioctl calls apply to the bio device:

BIOCLOCATE struct bio_locate *

Locate a named device and give back a cookie to the application for subsequent ioctl calls. The cookie is used to tunnel further ioctls to the right device.

BIOCINQ struct bioc_inq *

Retrieve number of volumes and physical disks for a specific device.

BIOCDISK struct bioc_disk *

Retrieve detailed information for the specified physical disk. Information returned can include status, size, channel, target, lun, vendor name, serial number and processor device (ses).

BIOCVOL struct bioc_vol *

Retrieve detailed information for the specified volume. Information returned can include status, size, RAID level, number of disks, device name association (sd?) and vendor name.

BIOCALARM struct bioc_alarm *

Control the alarm beeper on the device. Supported states are: disable alarm, enable alarm, silence alarm, status and test alarm.

Note: These options might not be supported on all hardware.

BIOCBLINK struct bioc_blink *

Blink an LED of the specified physical disk. Supported blink states are: blink LED, unblink LED and blink alarm LED.

Note: This option is only supported if the disk is governed by ses(4) and the hardware supports hardware blinking.

BIOCSETSTATE struct bioc_setstate *

Alter the state of specified physical disk. Supported states are: create hot-spare, online disk and offline disk.

The following ioctl calls apply to the bio device only when talking to a softraid(4) device:

BIOCCREATERAID struct bioc_createraid *

Create a new volume or assemble an existing volume. The volume will be attached as a system disk, if this capability is supported by the volume discipline.

BIOCDELETERAID struct bioc_deleteraid *

Remove system disk (if present) and disassemble the softraid(4) volume.

BIOCDISCIPLINE struct bioc_discipline *

Dispatch a discipline specific ioctl.

BIOCINSTALLBOOT struct bioc_installboot *

Install a boot loader.

Files

/dev/bio

ioctl tunnel device

Releases

50 releases since OpenBSD 3.2; the text changed 19 times.

  1. 3.2
  2. 3.3–3.4
  3. 3.5
  4. 3.6–3.7
  5. 3.8
  6. 3.9
  7. 4.0
  8. 4.1
  9. 4.2
  10. 4.3–4.4
  11. 4.5–4.6
  12. 4.7
  13. 4.8
  14. 4.9–5.3
  15. 5.4–5.5
  16. 5.6–5.7
  17. 5.8–6.0
  18. 6.1–7.5
  19. 7.6–8.0
  20. 8.0

History

The bio driver first appeared in OpenBSD 3.2.

Authors

The bio driver was written by Niklas Hallqvist ⟨[email protected]⟩. The API was written by Marco Peereboom ⟨[email protected]⟩.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.