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