xref: /netbsd-src/share/man/man4/bio.4 (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1.\"	$NetBSD: bio.4,v 1.3 2007/12/05 12:30:54 xtraeme 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 December 5, 2007
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 ciss 4
65.\" Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controller
66.It Xr mfi 4
67LSI Logic \*[Am] Dell MegaRAID SAS RAID controller
68.El
69.Pp
70The following ioctl calls apply to the
71.Nm bio
72device:
73.Bl -tag -width BIOCCAPABILITIES
74.It Dv BIOCLOCATE
75Locate a named device and give back a cookie to the application
76for subsequent ioctl calls.
77The cookie is used to tunnel further ioctls to the right device.
78.It Dv BIOCINQ
79Retrieve number of volumes and physical disks for a specific device.
80.It Dv BIOCDISK
81Retrieve detailed information for the specified physical disk.
82Information returned can include status, size, channel, target, lun,
83vendor name, serial number and processor device (ses or safte).
84.It Dv BIOCVOL
85Retrieve detailed information for the specified volume.
86Information returned can include status, size, RAID level, number of disks,
87device name association (sd?) and vendor name.
88.It Dv BIOCALARM
89Control the alarm beeper on the device.
90Supported states are: disable alarm, enable alarm, silence alarm, status and
91test alarm.
92.Pp
93Note:  These options might not be supported on all hardware.
94.It Dv BIOCBLINK
95Blink an LED of the specified physical disk.
96Supported blink states are: blink LED, unblink LED and blink alarm LED.
97.Pp
98Note:  This option is only supported if the disk is governed by ses(4) or
99safte(4) and the hardware supports hardware blinking.
100.It Dv BIOCSETSTATE
101Alter the state of specified physical disk.
102Supported states are: create hot-spare, online disk and offline disk.
103.El
104.Sh FILES
105.Bl -tag -width /dev/bio -compact
106.It Pa /dev/bio
107ioctl tunnel device
108.El
109.Sh SEE ALSO
110.Xr ioctl 2 ,
111.Xr bioctl 8
112.Sh HISTORY
113The
114.Nm
115driver first appeared in
116.Ox 3.2 .
117.Sh AUTHORS
118.An -nosplit
119The
120.Nm
121driver was written by
122.An Niklas Hallqvist Aq niklas@openbsd.org .
123The API was written by
124.An Marco Peereboom Aq marco@openbsd.org .
125