1.\" $NetBSD: bio.4,v 1.9 2009/05/18 14:07:09 wiz 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 May 25, 2008 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.El 71.Pp 72The following ioctl calls apply to the 73.Nm bio 74device: 75.Bl -tag -width BIOCCAPABILITIES 76.It Dv BIOCLOCATE 77Locate a named device and give back a cookie to the application 78for subsequent ioctl calls. 79The cookie is used to tunnel further ioctls to the right device. 80.It Dv BIOCINQ 81Retrieve number of volumes and physical disks for a specific device. 82.It Dv BIOCDISK 83Retrieve detailed information for the specified physical disk. 84Information returned can include status, size, channel, target, lun, 85vendor name, serial number, and processor device (ses). 86.\" or safte 87.It Dv BIOCDISK_NOVOL 88Is just the same as 89.Em BIOCDISK 90but doesn't require the disks to be in volume sets, so this 91applies to any physical disk connected to the controller. 92.Pp 93Note: this ioctl might not be supported on all hardware. 94.It Dv BIOCVOL 95Retrieve detailed information for the specified volume. 96Information returned can include status, size, RAID level, number of disks, 97device name association (sd?) and vendor name. 98.It Dv BIOCALARM 99Control the alarm beeper on the device. 100Supported states are: disable alarm, enable alarm, silence alarm, status and 101test alarm. 102.Pp 103Note: These options might not be supported on all hardware. 104.It Dv BIOCBLINK 105Blink an LED of the specified physical disk. 106Supported blink states are: blink LED, unblink LED and blink alarm LED. 107.Pp 108Note: This option is only supported if the disk is governed by 109.Xr ses 4 110.\" or 111.\" .Xr safte 4 112and the hardware supports hardware blinking. 113.It Dv BIOCSETSTATE 114Alter the state of specified physical disk. 115Supported states are: create/remove hot-spare, create/remove pass through 116disk, start/stop consistency check in a volume, online disk and offline disk. 117.Pp 118Note: These options might not be supported on all hardware. 119.It Dv BIOCVOLOPS 120For operations in volume sets. 121It's able to create and remove a volume 122set in a supported RAID controller. 123.Pp 124Note: this ioctl might not be supported on all hardware. 125.El 126.Sh FILES 127.Bl -tag -width /dev/bio -compact 128.It Pa /dev/bio 129ioctl tunnel device 130.El 131.Sh SEE ALSO 132.Xr ioctl 2 , 133.Xr bioctl 8 134.Sh HISTORY 135The 136.Nm 137driver first appeared in 138.Ox 3.2 139and 140.Nx 4.0 . 141.Sh AUTHORS 142.An -nosplit 143The 144.Nm 145driver was written by 146.An Niklas Hallqvist Aq niklas@openbsd.org . 147The API was written by 148.An Marco Peereboom Aq marco@openbsd.org 149and was extended even more for 150.Nx 151by 152.An Juan Romero Pardines Aq xtraeme@netbsd.org . 153