xref: /openbsd/share/man/man4/bio.4 (revision 891d7ab6)
1.\"	$OpenBSD: bio.4,v 1.29 2010/08/23 00:58:49 dlg Exp $
2.\"
3.\" Copyright (c) 2002 Niklas Hallqvist
4.\" Copyright (c) 2006 Marco Peereboom
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. The name of the author may not be used to endorse or promote products
16.\"    derived from this software without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
22.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd $Mdocdate: August 23 2010 $
31.Dt BIO 4
32.Os
33.Sh NAME
34.Nm bio
35.Nd block I/O ioctl tunnel pseudo-device
36.Sh SYNOPSIS
37.Cd "pseudo-device bio" Op Ar count
38.Sh DESCRIPTION
39The
40.Nm
41driver provides userland applications
42.Xr ioctl 2
43access to devices otherwise not found as
44.Pa /dev
45nodes.
46The
47.Pa /dev/bio
48device node operates by delegating ioctl
49calls to a requested device driver.
50Only drivers which have registered with the
51.Nm
52device can be accessed via this interface.
53.Pp
54If
55.Ar count
56is given in the specification, and is greater than 0, a maximum of one
57.Nm bio
58device is created.
59.Pp
60The following device drivers register with
61.Nm
62for volume management:
63.Pp
64.Bl -tag -width softraid(4)XX -offset indent -compact
65.It Xr ami 4
66American Megatrends Inc. MegaRAID PATA/SATA/SCSI RAID controller
67.It Xr arc 4
68Areca Technology Corporation SAS/SATA RAID controller
69.It Xr cac 4
70Compaq Smart ARRAY 2/3/4 SCSI RAID controller
71.It Xr ciss 4
72Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controller
73.It Xr ips 4
74IBM SATA/SCSI ServeRAID controller
75.It Xr mfi 4
76LSI Logic & Dell MegaRAID SAS RAID controller
77.It Xr mpi 4
78LSI Logic Fusion-MPT Message Passing Interface
79.It Xr mpii 4
80LSI Logic Fusion-MPT Message Passing Interface II
81.It Xr softraid 4
82Software RAID
83.El
84.Pp
85The following device drivers register with
86.Nm
87to provide enclosure management:
88.Pp
89.Bl -tag -width safte($)XX -offset indent -compact
90.It Xr safte 4
91SCSI Accessed Fault-Tolerant Enclosure
92.It Xr ses 4
93SCSI Enclosure Services
94.El
95.Pp
96The following ioctl calls apply to the
97.Nm
98device:
99.Bl -tag -width BIOCCAPABILITIES
100.It Dv BIOCLOCATE
101Locate a named device and give back a cookie to the application
102for subsequent ioctl calls.
103The cookie is used to tunnel further ioctls to the right device.
104.It Dv BIOCINQ
105Retrieve number of volumes and physical disks for a specific device.
106.It Dv BIOCDISK
107Retrieve detailed information for the specified physical disk.
108Information returned can include status, size, channel, target, lun,
109vendor name, serial number and processor device (ses or safte).
110.It Dv BIOCVOL
111Retrieve detailed information for the specified volume.
112Information returned can include status, size, RAID level, number of disks,
113device name association (sd?) and vendor name.
114.It Dv BIOCALARM
115Control the alarm beeper on the device.
116Supported states are: disable alarm, enable alarm, silence alarm, status and
117test alarm.
118.Pp
119Note:  These options might not be supported on all hardware.
120.It Dv BIOCBLINK
121Blink an LED of the specified physical disk.
122Supported blink states are: blink LED, unblink LED and blink alarm LED.
123.Pp
124Note:  This option is only supported if the disk is governed by
125.Xr ses 4
126or
127.Xr safte 4
128and the hardware supports hardware blinking.
129.It Dv BIOCSETSTATE
130Alter the state of specified physical disk.
131Supported states are: create hot-spare, online disk and offline disk.
132.El
133.Pp
134The following ioctl calls apply to the
135.Nm
136device only when talking to a
137.Xr softraid 4
138device:
139.Bl -tag -width BIOCCREATERAID
140.It Dv BIOCCREATERAID
141Create a new volume or assemble an existing volume.
142The volume will be attached as a system disk, if this capability is supported
143by the volume discipline.
144.It Dv BIOCDELETERAID
145Remove system disk (if present) and disassemble the
146.Xr softraid 4
147volume.
148.It Dv BIOCDISCIPLINE
149Dispatch a discipline specific ioctl.
150.El
151.Sh FILES
152.Bl -tag -width /dev/bio -compact
153.It Pa /dev/bio
154ioctl tunnel device
155.El
156.Sh SEE ALSO
157.Xr ioctl 2 ,
158.Xr softraid 4 ,
159.Xr bioctl 8
160.Sh HISTORY
161The
162.Nm
163driver first appeared in
164.Ox 3.2 .
165.Sh AUTHORS
166.An -nosplit
167The
168.Nm
169driver was written by
170.An Niklas Hallqvist Aq niklas@openbsd.org .
171The API was written by
172.An Marco Peereboom Aq marco@openbsd.org .
173