| BIO(4) | Device Drivers Manual | BIO(4) |
bio — Block IO
ioctl tunnel pseudo-device
pseudo-device bio
#include <dev/biovar.h>
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.
The following device drivers register with
bio for volume management:
The following ioctl calls apply to the bio
device:
BIOCLOCATEBIOCINQBIOCDISKBIOCDISK_NOVOLBIOCDISK 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.
BIOCVOLBIOCALARMNote: These options might not be supported on all hardware. It is supported by arcmsr(4), mfi(4), and mfii(4).
BIOCBLINKNote: 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).
BIOCSETSTATENote: 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).
BIOCVOLOPSNote: 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).
ioctl(2), envsys(4), bioctl(8), envstat(8), powerd(8), sysmon_envsys(9)
The bio driver first appeared in
OpenBSD 3.2 and NetBSD
4.0.
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>.
| May 9, 2019 | NetBSD 11.0 |