The bio(4)
pseudo-device
In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow ...
driver and the bioctl(8) utility implement a generic
RAID
Raid, RAID or Raids may refer to:
Attack
* Raid (military), a sudden attack behind the enemy's lines without the intention of holding ground
* Corporate raid, a type of hostile takeover in business
* Panty raid, a prankish raid by male colleg ...
volume management interface in
OpenBSD
OpenBSD is a security-focused operating system, security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by fork (software development), forking N ...
and
NetBSD
NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
.
[ The idea behind this software is similar to ]ifconfig
ifconfig (short for ''interface config'') is a system administration utility in Unix-like operating systems for network interface configuration.
The utility is a command-line interface tool and is also used in the system startup scripts of ma ...
, where a single utility from the operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
can be used to control any RAID controller using a generic interface
Interface or interfacing may refer to:
Academic journals
* ''Interface'' (journal), by the Electrochemical Society
* '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics''
* '' Int ...
, instead of having to rely on many proprietary and custom RAID management utilities specific for each given hardware RAID manufacturer.[ Features include monitoring of the health status of the arrays, controlling identification through blinking the ]LED
A light-emitting diode (LED) is a semiconductor device that emits light when current flows through it. Electrons in the semiconductor recombine with electron holes, releasing energy in the form of photons. The color of the light (cor ...
s and managing of sound alarms, and specifying hot spare disks. Additionally, the softraid
configuration in OpenBSD is delegated to bioctl as well; whereas the initial creation of volumes and configuration of hardware RAID is left to card BIOS
In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the ...
as non-essential after the operating system has already been booted.[ Interfacing between the kernel and userland is performed through the ]ioctl
In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; th ...
system call through the /dev/bio
pseudo-device
In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow ...
.
Overview
The bio/bioctl subsystem is deemed to be an important part in OpenBSD's advocacy for open hardware documentation, and the 3.8 release title and the titular song were dedicated to the topic — ''Hackers of the Lost RAID''.[
The development took place during a time of controversy where ]Adaptec
Adaptec was a computer storage company and remains a brand for computer storage products. The company was an independent firm from 1981 to 2010, at which point it was acquired by PMC-Sierra, which itself was later acquired by Microsemi, which its ...
refused to release appropriate hardware documentation that was necessary in order for the make the aac(4) driver work reliably, which followed with OpenBSD disabling support for the driver.
In the commentary to the 3.8 release, the developers express the irony of hardware RAID controllers' supposed purpose of providing reliability, through redundancy and repair, whereas in reality many vendors expect system administrator
A system administrator, or sysadmin, or admin is a person who is responsible for the upkeep, configuration, and reliable operation of computer systems, especially multi-user computers, such as servers. The system administrator seeks to en ...
s to install and depend on huge binary blob
In the context of free and open-source software, proprietary software only available as a binary executable is referred to as a blob or binary blob. The term usually refers to a device driver module loaded into the kernel of an open-source ...
s in order to be assess volume health and service their disk arrays.
Specifically, OpenBSD is making a reference to the modus operandi
A ''modus operandi'' (often shortened to M.O.) is someone's habits of working, particularly in the context of business or criminal investigations, but also more generally. It is a Latin phrase, approximately translated as "mode (or manner) of o ...
of FreeBSD
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
, where the documentation of the aac(4) driver for Adaptec specifically suggests enabling Linux compatibility layer in order to use the management utilities (where the documentation even fails to explain where exactly these utilities must be obtained from, or which versions would be compatible, evidently because the proprietary tools may have expired).
Likewise, OpenBSD developers intentionally chose to concentrate on supporting only the most basic features of each controller which are uniform across all the brands and variations; specifically, the fact that initial configuration of each controller must still be made through card BIOS
In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the ...
was never kept secret from any bio/bioctl announcement.
This can be contrasted with the approach taken by FreeBSD, for example, where individual utilities exist for several independent RAID drivers, and the interface of each utility is independent of one another; specifically, , FreeBSD includes separate device-specific utilities called mfiutil
, mptutil
, mpsutil
/mprutil
and sesutil
,, each of which provides many options with at least subtle differences in the interface for configuration and management of the controllers, contributes to code bloat, not to mention any additional drivers for which no such tool even exists as open-source software
Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Ope ...
at all.
In OpenBSD 6.4 (2018), a dozen of drivers register with the bio framework.
The drive
sensors
Monitoring of the state of each logical drive is also duplicated into the hardware monitoring frameworks and their corresponding utilities on both systems where bioctl is available — hw.sensors with sensorsd in OpenBSD[ and sysmon ]envsys
The envsys framework is a kernel-level hardware monitoring sensors framework in NetBSD. , the framework is used by close to 85 device drivers to export various environmental monitoring sensors, as evidenced by references of the sysmon_envsys_ ...
with envstat and powerd in NetBSD
NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
.[ For example, on OpenBSD since 4.2 release, the status of the drive sensors could be automatically monitored simply by starting sensorsd without any specific configuration being required.][ More drivers are being converted to use the bio and sensors frameworks with each release.][
]
SES/SAF-TE
In OpenBSD, both SCSI Enclosure Services (SES)[ and SAF-TE][ are supported since OpenBSD 3.8 (2005) as well, both of which feature ]LED
A light-emitting diode (LED) is a semiconductor device that emits light when current flows through it. Electrons in the semiconductor recombine with electron holes, releasing energy in the form of photons. The color of the light (cor ...
blinking through bio and bioctl (by implementing the BIOCBLINK
ioctl
In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; th ...
), helping system administrator
A system administrator, or sysadmin, or admin is a person who is responsible for the upkeep, configuration, and reliable operation of computer systems, especially multi-user computers, such as servers. The system administrator seeks to en ...
s identify devices within the enclosures to service. Additionally, both the SES and SAF-TE drivers in OpenBSD feature support for a combination of temperature and fan sensors, PSU, doorlock and alarm indicators; all of this auxiliary sensor data is exported into the hw.sensors framework in OpenBSD,[ and can be monitored through familiar tools like ]sysctl
sysctl is a software utility of some Unix-like operating systems that reads and modifies the attributes of the system kernel such as its version number, maximum limits, and security settings. It is available both as a system call for compiled ...
, SNMP
Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behaviour. Devices that typically ...
and sensorsd.
, in NetBSD
NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
, an older SES/SAF-TE driver from NASA
The National Aeronautics and Space Administration (NASA ) is an independent agency of the US federal government responsible for the civil space program, aeronautics research, and space research.
NASA was established in 1958, succeedi ...
from 2000 is still in place, which is not integrated with bio or envsys
The envsys framework is a kernel-level hardware monitoring sensors framework in NetBSD. , the framework is used by close to 85 device drivers to export various environmental monitoring sensors, as evidenced by references of the sysmon_envsys_ ...
, but has its own device file
In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow ...
s with a unique ioctl
In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; th ...
interface, featuring its own custom SCSI-specific userland tooling;[ this older implementation was also available in OpenBSD between 2000 and 2005, and was removed 2005 (together with its userland tools) just before the new leaner bio- and hw.sensors-based alternative drivers were introduced; SES and SAF-TE are now kept as two separate drivers in OpenBSD, but don't require any separate custom userland utilities anymore, reducing the code bloat and the number of ]source lines of code
Source lines of code (SLOC), also known as lines of code (LOC), is a software metric used to measure the size of a computer program by counting the number of lines in the text of the program's source code. SLOC is typically used to predict the am ...
.
References
{{Portal bar, Free and open-source software
2005 software
2007 software
BSD software
Computer data storage
Computer hardware tuning
Computer performance
Free software programmed in C
Free system software
Motherboard
NetBSD
OpenBSD
RAID
SCSI
Storage software
System administration
System monitors
Volume manager