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

# bio(4)

block I/O ioctl tunnel pseudo-device

## NAME

**bio** – block I/O ioctl tunnel pseudo-device

## SYNOPSIS

**pseudo-device bio** \[*count*\]

## DESCRIPTION

The **bio** driver provides userland applications [ioctl(2)](/ioctl/2.md) 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)](/ami/4.md)

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

- [arc(4)](/arc/4.md)

  Areca Technology Corporation SAS/SATA RAID controller

- [cac(4)](/cac/4.md)

  Compaq Smart Array 2/3/4 SCSI RAID controller

- [ciss(4)](/ciss/4.md)

  Compaq Smart Array SAS/SATA/SCSI RAID controller

- [gdt(4)](/gdt/4.md)

  ICP-Vortex and Intel GDT SATA/SCSI RAID controller

- [ips(4)](/ips/4.md)

  IBM SATA/SCSI ServeRAID controller

- [mfi(4)](/mfi/4.md)

  LSI Logic & Dell MegaRAID SAS RAID controller

- [mfii(4)](/mfii/4.md)

  LSI Logic MegaRAID SAS Fusion RAID controller

- [mpi(4)](/mpi/4.md)

  LSI Logic Fusion-MPT Message Passing Interface

- [mpii(4)](/mpii/4.md)

  LSI Logic Fusion-MPT Message Passing Interface II

- [nvme(4)](/nvme/4.md)

  NVMe storage controllers

- [softraid(4)](/softraid/4.md)

  Software RAID

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

- [ses(4)](/ses/4.md)

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

- BIOCDISCIPLINE *struct bioc\_discipline \**

  Dispatch a discipline specific ioctl.

- BIOCINSTALLBOOT *struct bioc\_installboot \**

  Install a boot loader.

## FILES

- */dev/bio*

  ioctl tunnel device

## SEE ALSO

[ioctl(2)](/ioctl/2.md), [softraid(4)](/softraid/4.md), [bioctl(8)](/bioctl/8.md)

## HISTORY

The **bio** driver first appeared in OpenBSD 3.2.

## AUTHORS

The **bio** driver was written by Niklas Hallqvist ⟨*niklas@openbsd.org*⟩. The API was written by Marco Peereboom ⟨*marco@openbsd.org*⟩.
