xref: /openbsd-src/share/man/man4/bio.4 (revision a28daedfc357b214be5c701aa8ba8adb29a7f1c2)
1.\"	$OpenBSD: bio.4,v 1.24 2009/02/09 20:39:56 grange 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: February 9 2009 $
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 ciss(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.El
78.Pp
79The following device drivers register with
80.Nm
81to provide enclosure management:
82.Pp
83.Bl -tag -width safte($)XX -offset indent -compact
84.It Xr safte 4
85SCSI Accessed Fault-Tolerant Enclosure
86.It Xr ses 4
87SCSI Enclosure Services
88.El
89.Pp
90The following ioctl calls apply to the
91.Nm bio
92device:
93.Bl -tag -width BIOCCAPABILITIES
94.It Dv BIOCLOCATE
95Locate a named device and give back a cookie to the application
96for subsequent ioctl calls.
97The cookie is used to tunnel further ioctls to the right device.
98.It Dv BIOCINQ
99Retrieve number of volumes and physical disks for a specific device.
100.It Dv BIOCDISK
101Retrieve detailed information for the specified physical disk.
102Information returned can include status, size, channel, target, lun,
103vendor name, serial number and processor device (ses or safte).
104.It Dv BIOCVOL
105Retrieve detailed information for the specified volume.
106Information returned can include status, size, RAID level, number of disks,
107device name association (sd?) and vendor name.
108.It Dv BIOCALARM
109Control the alarm beeper on the device.
110Supported states are: disable alarm, enable alarm, silence alarm, status and
111test alarm.
112.Pp
113Note:  These options might not be supported on all hardware.
114.It Dv BIOCBLINK
115Blink an LED of the specified physical disk.
116Supported blink states are: blink LED, unblink LED and blink alarm LED.
117.Pp
118Note:  This option is only supported if the disk is governed by ses(4) or
119safte(4) and the hardware supports hardware blinking.
120.It Dv BIOCSETSTATE
121Alter the state of specified physical disk.
122Supported states are: create hot-spare, online disk and offline disk.
123.El
124.Sh FILES
125.Bl -tag -width /dev/bio -compact
126.It Pa /dev/bio
127ioctl tunnel device
128.El
129.Sh SEE ALSO
130.Xr ioctl 2 ,
131.Xr bioctl 8
132.Sh HISTORY
133The
134.Nm
135driver first appeared in
136.Ox 3.2 .
137.Sh AUTHORS
138.An -nosplit
139The
140.Nm
141driver was written by
142.An Niklas Hallqvist Aq niklas@openbsd.org .
143The API was written by
144.An Marco Peereboom Aq marco@openbsd.org .
145