1 .\" $NetBSD: bioctl.8,v 1.15 2008/03/16 11:07:23 wiz Exp $
2 .\" $OpenBSD: bioctl.8,v 1.43 2007/03/20 06:12:11 jmc Exp $
4 .\" Copyright (c) 2007, 2008 Juan Romero Pardines
5 .\" Copyright (c) 2004, 2005 Marco Peereboom
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
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.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
20 .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd RAID management interface
40 RAID device drivers which support management functionality can
41 register their services with the
45 then can be used to manage the RAID controller's properties.
47 The following commands are supported:
48 .Bl -tag -width XXstrategyXXnameXX
49 .It Ic show Op Ar disks | volumes
50 Without any argument by default
52 will show information about all volumes and the logical disks used
56 is specified, only information about physical disks will be shown.
59 is specified, only information about the volumes will be shown.
60 .It Ic alarm Op Ar disable | enable | silence | test
61 Control the RAID card's alarm functionality, if supported.
62 By default if no argument is specified, its current state will be
70 arguments may be specified to enable, disable, silence, or test
71 the RAID card's alarm.
72 .It Ic blink Ar start channel:target.lun | stop channel:target.lun
73 Instruct the device at
74 .Ar channel:target.lun
75 to start or cease blinking, if there's
77 support in the enclosure.
78 .It Ic hotspare Ar add channel:target.lun | remove channel:target.lun
79 Create or remove a hot-spare drive at location
80 .Ar channel:target.lun .
81 .It Ic passthru Ar add DISKID channel:target.lun | remove Ar channel:target.lun
87 argument specifies the disk that will be used for the new device, and
88 it will be created at the location
89 .Ar channel:target.lun .
91 Removing a pass-through device that has a mounted filesystem will
92 lead to undefined behaviour.
93 .It Ic check Ar start VOLID | stop VOLID
94 Start or stop consistency volume check in the volume with index
97 Not many RAID controllers support this feature.
98 .It Ic create volume Ar VOLID DISKIDs Oo Ar SIZE Oc Ar STRIPE RAID_LEVEL channel:target.lun
99 Create a volume at index
103 argument will specify the first and last disk, i.e.:
105 will use the disks 0, 1, 2, and 3.
108 argument is optional and may be specified if not all available disk
109 space is wanted (also dependent of the
111 The volume will have a stripe size defined in the
113 argument and it will be located at
114 .Ar channel:target.lun .
115 .It Ic remove volume Ar VOLID channel:target.lun
116 Remove a volume at index
119 .Ar channel:target.lun .
121 Removing a RAID volume that has a mounted filesystem will lead to
125 The following command, executed from the command line, shows the
126 status of the volumes and its logical disks on the RAID controller:
128 $ bioctl arcmsr0 show
129 Volume Status Size Device/Label RAID Level Stripe
130 =================================================================
131 0 Building 468G sd0 ARC-1210-VOL#00 RAID 6 128KB 0% done
132 0:0 Online 234G 0:0.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt]
133 0:1 Online 234G 0:1.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt]
134 0:2 Online 234G 0:2.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt]
135 0:3 Online 234G 0:3.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt]
138 To create a RAID 5 volume on the SCSI 0:15.0 location on the disks
139 0, 1, 2 and 3, with stripe size of 64Kb on the first volume ID,
140 using all available free space on the disks:
142 .Dl $ bioctl arcmsr0 create volume 0 0-3 64 5 0:15.0
144 To remove the volume 0 previously created at the SCSI 0:15.0 location:
146 .Dl $ bioctl arcmsr0 remove volume 0 0:15.0
156 command first appeared in
163 interface was written by
164 .An Marco Peereboom Aq marco@openbsd.org
165 and was rewritten with multiple features by
166 .An Juan Romero Pardines Aq xtraeme@NetBSD.org .