1.\" $NetBSD: bio.4,v 1.12 2014/09/27 16:16:28 jmcneill Exp $ 2.\" $OpenBSD: bio.4,v 1.19 2006/09/20 22:22:37 jmc Exp $ 3.\" 4.\" Copyright (c) 2002 Niklas Hallqvist 5.\" Copyright (c) 2006 Marco Peereboom 6.\" All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. The name of the author may not be used to endorse or promote products 17.\" derived from this software without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 23.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd Sep 27, 2014 32.Dt BIO 4 33.Os 34.Sh NAME 35.Nm bio 36.Nd Block IO ioctl tunnel pseudo-device 37.Sh SYNOPSIS 38.Cd "pseudo-device bio" 39.Sh DESCRIPTION 40The 41.Nm 42driver provides userland applications 43.Xr ioctl 2 44access to devices otherwise not found as 45.Pa /dev 46nodes. 47The 48.Pa /dev/bio 49device node operates by delegating ioctl 50calls to a requested device driver. 51Only drivers which have registered with the 52.Nm 53device can be accessed via this interface. 54.Pp 55The following device drivers register with 56.Nm 57for volume management: 58.Pp 59.Bl -tag -width ciss(4)XX -offset indent -compact 60.\" .It Xr ami 4 61.\" American Megatrends Inc. MegaRAID PATA/SATA/SCSI RAID controller 62.It Xr arcmsr 4 63Areca Technology Corporation SATA RAID controller 64.It Xr cac 4 65Compaq RAID array controller 66.It Xr ciss 4 67Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controller 68.It Xr mfi 4 69LSI Logic \*[Am] Dell MegaRAID SAS RAID controller 70.It Xr mpt 4 71LSI Fusion-MPT RAID controller 72.El 73.Pp 74The following ioctl calls apply to the 75.Nm bio 76device: 77.Bl -tag -width BIOCCAPABILITIES 78.It Dv BIOCLOCATE 79Locate a named device and give back a cookie to the application 80for subsequent ioctl calls. 81The cookie is used to tunnel further ioctls to the right device. 82.It Dv BIOCINQ 83Retrieve number of volumes and physical disks for a specific device. 84.It Dv BIOCDISK 85Retrieve detailed information for the specified physical disk. 86Information returned can include status, size, channel, target, lun, 87vendor name, serial number, and processor device (ses). 88.\" or safte 89.It Dv BIOCDISK_NOVOL 90Is just the same as 91.Em BIOCDISK 92but doesn't require the disks to be in volume sets, so this 93applies to any physical disk connected to the controller. 94.Pp 95Note: this ioctl might not be supported on all hardware. 96.It Dv BIOCVOL 97Retrieve detailed information for the specified volume. 98Information returned can include status, size, RAID level, number of disks, 99device name association (sd?) and vendor name. 100.It Dv BIOCALARM 101Control the alarm beeper on the device. 102Supported states are: disable alarm, enable alarm, silence alarm, status and 103test alarm. 104.Pp 105Note: These options might not be supported on all hardware. 106.It Dv BIOCBLINK 107Blink an LED of the specified physical disk. 108Supported blink states are: blink LED, unblink LED and blink alarm LED. 109.Pp 110Note: This option is only supported if the disk is governed by 111.Xr ses 4 112.\" or 113.\" .Xr safte 4 114and the hardware supports hardware blinking. 115.It Dv BIOCSETSTATE 116Alter the state of specified physical disk. 117Supported states are: create/remove hot-spare, create/remove pass through 118disk, start/stop consistency check in a volume, online disk and offline disk. 119.Pp 120Note: These options might not be supported on all hardware. 121.It Dv BIOCVOLOPS 122For operations in volume sets. 123It's able to create and remove a volume 124set in a supported RAID controller. 125.Pp 126Note: this ioctl might not be supported on all hardware. 127.El 128.Sh FILES 129.Bl -tag -width /dev/bio -compact 130.It Pa /dev/bio 131ioctl tunnel device 132.El 133.Sh SEE ALSO 134.Xr ioctl 2 , 135.Xr bioctl 8 136.Sh HISTORY 137The 138.Nm 139driver first appeared in 140.Ox 3.2 141and 142.Nx 4.0 . 143.Sh AUTHORS 144.An -nosplit 145The 146.Nm 147driver was written by 148.An Niklas Hallqvist Aq Mt niklas@openbsd.org . 149The API was written by 150.An Marco Peereboom Aq Mt marco@openbsd.org 151and was extended even more for 152.Nx 153by 154.An Juan Romero Pardines Aq Mt xtraeme@netbsd.org . 155