BIO(4)

πŸ“¦
version 11.0 Β· 2 versions
, in nixpkgs unstable

πŸ’– bio(4) β€” Block IO ioctl tunnel pseudo-device πŸ’–

okay so bestie, we're in the Kernel Interfaces Manual and this is the whole tea on bio(4) β€” the little pseudo-device that tunnels ioctl(2) calls so userland can vibe with devices that don't show up as /dev nodes. it's giving backstage pass energy πŸ’…


🌸 NAME 🌸

bio β€” Block IO ioctl tunnel pseudo-device

✨ SYNOPSIS ✨

pseudo-device bio

#include <dev/biovar.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

The bio driver gives userland applications ioctl(2) access to devices that otherwise aren't found as /dev nodes. The /dev/bio device node works by delegating ioctl calls to whichever device driver you requested. Only drivers that have registered with the bio device can be accessed through this interface.

The following device drivers register with bio for volume management:

  • arcmsr(4) β€” Areca Technology Corporation SATA RAID controller
  • ataraid(4) β€” Software BIOS RAID
  • cac(4) β€” Compaq RAID array controller
  • ciss(4) β€” Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controller
  • mfi(4) β€” LSI Logic & Dell MegaRAID SAS RAID controller
  • mfii(4) β€” LSI Logic MegaRAID SAS Fusion RAID controller
  • mpii(4) β€” LSI Logic Fusion-MPT Message Passing Interface II
  • mpt(4) β€” LSI Fusion-MPT RAID controller

The following ioctl calls apply to the bio device:

  • BIOCLOCATE β€” 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 β€” Retrieve the number of volumes and physical disks for a specific device.
  • BIOCDISK β€” Retrieve detailed information for the specified physical disk. The information returned can include status, size, channel, target, lun, vendor name, serial number, and processor device (ses).
  • BIOCDISK_NOVOL β€” Is just the same as BIOCDISK but doesn't require the disks to be in volume sets, so this applies to any physical disk connected to the controller.
Note: this ioctl might not be supported on all hardware. It is a NetBSD extension of bio. It is supported by arcmsr(4), ciss(4), and mpt(4). It is also supported by cac(4), but handled exactly the same as BIOCDISK.
  • BIOCVOL β€” Retrieve detailed information for the specified volume. The information returned can include status, size, RAID level, number of disks, device name association (sd?) and vendor name.
  • BIOCALARM β€” 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. It is supported by arcmsr(4), mfi(4), and mfii(4).
  • BIOCBLINK β€” 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. It is supported by ciss(4), mfi(4), and mfii(4).
  • BIOCSETSTATE β€” Alter the state of the specified physical disk. Supported states are: create/remove hot-spare, create/remove pass through disk, start/stop consistency check in a volume, online disk and offline disk, and a manual rebuild kick-off designation.
Note: These options might not be supported on all hardware. Some of these options are supported by arcmsr(4), mfi(4), and mfii(4).

Online, offline and hotspare designations are supported by mfi(4) and mfii(4), plus a rebuild designation is supported by mfii(4); all four of these state options are the original states from OpenBSD, the other options, including hotspare unmarking, being NetBSD extensions of bio.

Hotspare, pass through and consistency check options are supported by arcmsr(4).

  • BIOCVOLOPS β€” For operations in volume sets. It's able to create and remove a volume set in a supported RAID controller.
Note: this ioctl might not be supported on all hardware. It is a NetBSD extension of bio, and is supported by arcmsr(4).

The bioctl(8) utility can be used to perform the above controls from the userland. Additionally, since BIOCVOL volume status is normally duplicated into sysmon_envsys(9) sensors of ENVSYS_DRIVE type, it is also available through envsys(4), and can be monitored with envstat(8) and powerd(8).

πŸŽ€ FILES πŸŽ€

  • /dev/bio β€” ioctl tunnel device
  • /etc/powerd/scripts/sensor_drive β€” powerd script for drive sensors

⭐ SEE ALSO ⭐

ioctl(2), envsys(4), bioctl(8), envstat(8), powerd(8), sysmon_envsys(9)

🌈 HISTORY 🌈

The bio driver first appeared in OpenBSD 3.2 and NetBSD 4.0.

πŸ‘‘ AUTHORS πŸ‘‘

The bio driver was written by Niklas Hallqvist <niklas@openbsd.org>. The API was written by Marco Peereboom <marco@openbsd.org> and was extended even more for NetBSD by Juan Romero Pardines <xtraeme@netbsd.org>.


okay that's the whole page β€” footer check: Debian, May 9, 2019, and the page is BIO(4). mwah πŸ’‹

πŸ“¦ where this page comes from