BIO(4)
π 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 controllerataraid(4)β Software BIOS RAIDcac(4)β Compaq RAID array controllerciss(4)β Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controllermfi(4)β LSI Logic & Dell MegaRAID SAS RAID controllermfii(4)β LSI Logic MegaRAID SAS Fusion RAID controllermpii(4)β LSI Logic Fusion-MPT Message Passing Interface IImpt(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 asBIOCDISKbut 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 ofbio. It is supported byarcmsr(4),ciss(4), andmpt(4). It is also supported bycac(4), but handled exactly the same asBIOCDISK.
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 byarcmsr(4),mfi(4), andmfii(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 byses(4)and the hardware supports hardware blinking. It is supported byciss(4),mfi(4), andmfii(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 byarcmsr(4),mfi(4), andmfii(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 ofbio, and is supported byarcmsr(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
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2002 Niklas Hallqvist
- Copyright (c) 2006 Marco Peereboom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms