1.\" $NetBSD: bioctl.8,v 1.10 2008/02/02 03:21:47 xtraeme Exp $ 2.\" $OpenBSD: bioctl.8,v 1.43 2007/03/20 06:12:11 jmc Exp $ 3.\" 4.\" Copyright (c) 2007, 2008 Juan Romero Pardines 5.\" Copyright (c) 2004, 2005 Marco Peereboom 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.\" 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 26.\" SUCH DAMAGE. 27.\" 28.Dd February 2, 2008 29.Dt BIOCTL 8 30.Os 31.Sh NAME 32.Nm bioctl 33.Nd RAID management interface 34.Sh SYNOPSIS 35.Nm bioctl 36.Ar device 37.Ar command 38.Op Ar arg Op ... 39.Sh DESCRIPTION 40RAID device drivers which support management functionality can 41register their services with the 42.Xr bio 4 43driver. 44.Nm bioctl 45then can be used to manage RAID controller's properties. 46.Sh COMMANDS 47The following commands are supported: 48.Bl -tag -width XXstrategyXXnameXX 49.It Ic show Op Ar disks | volumes 50Without any argument by default it will show information about 51all volumes and the logical disks used on them. If 52.Ar disks 53is specified, only information will be shown about physical disks. 54If 55.Ar volumes 56is specified, only information will be shown about the volumes. 57.It Ic alarm Op Ar enable | disable | silence | test 58Control the RAID card's alarm functionality, if supported. By default 59its state will be shown if no argument is specified. Optionally the 60.Ar enable , 61.Ar disable , 62.Ar silence 63or 64.Ar test 65argument may be specified to enable, disable, silence or test the 66RAID card's alarm. 67.It Ic blink Ar start | stop Op Ar channel:target.lun 68Instruct the device at 69.Ar channel:target.lun 70to start or cease blinking, if there's 71.Xr ses 4 72support in the enclosure. 73.It Ic hotspare Ar add | remove Ar channel:target.lun 74Create or remove a hot-spare drive at location 75.Ar channel:target.lun . 76.It Ic passthru Ar add DISKID | remove Ar channel:target.lun 77Create or remove a 78.Ar pass-through 79device. The 80.Ar DISKID 81argument specifies the disk that will be used for the new device, and 82it will be created at 83.Ar channel:target.lun 84location. 85.Em NOTE : 86removing a pass-through device that has a mounted filesystem will lead to 87undefined behaviour. 88.It Ic check Ar start | stop VOLID 89Start or stop consistency volume check in the volume with index 90.Ar VOLID . 91.Em NOTE : 92not many RAID controllers will support this feature. 93.It Ic create volume Ar VOLID DISKIDs Oo Ar SIZE Oc Ar STRIPE RAID_LEVEL channel:target.lun 94Create a volume at index 95.Ar VOLID . 96The 97.Ar DISKIDs 98argument will specify the first and last disk, i.e: 99.Em 0-3 100will use the disks 0, 1, 2 and 3. The 101.Ar SIZE 102argument is optional and may be specified if not all available disk space is 103wanted (dependent of the 104.Ar RAID_LEVEL 105too). The volume will have a stripe size defined in the 106.Ar STRIPE 107argument and it will be located at 108.Ar channel:target.lun . 109.It Ic remove volume Ar VOLID channel:target.lun 110Remove a volume at index 111.Ar VOLID 112and located at 113.Ar channel:target.lun . 114.Em NOTE: 115removing a RAID volume that has a mounted filesystem will lead to 116undefined behaviour. 117.El 118.Sh EXAMPLES 119The following command, executed from the command line, shows the status of 120the volumes and its logical disks on the RAID controller: 121.Bd -literal 122$ bioctl show arcmsr0 123Volume Status Size Device/Label RAID Level Stripe 124================================================================= 125 0 Building 468G sd0 ARC-1210-VOL#00 RAID 6 128KB 0% done 126 0:0 Online 234G 0:0.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] 127 0:1 Online 234G 0:1.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] 128 0:2 Online 234G 0:2.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] 129 0:3 Online 234G 0:3.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] 130.Ed 131.Pp 132To create a RAID 5 volume on the SCSI 15:0.0 location on the disks 0, 1, 2 and 3, 133with stripe size of 64Kb on the first volume ID, using all available free space on 134the disks: 135.Pp 136.Dl $ bioctl arcmsr0 create volume 0 0-3 64 5 15:0.0 137.Pp 138To remove the volume 0 previously created at the SCSI 15:0.0 location: 139.Pp 140.Dl $ bioctl arcmsr0 remove volume 0 15:0.0 141.Pp 142.Sh SEE ALSO 143.Xr arcmsr 4 , 144.Xr bio 4 , 145.Xr mfi 4 146.Sh HISTORY 147The 148.Nm 149command first appeared in 150.Ox 3.8 , 151it was rewritten for 152.Nx 5.0 . 153.Sh AUTHORS 154The 155.Nm 156interface was written by 157.An Marco Peereboom Aq marco@openbsd.org 158and was rewritten with multiple features by 159.An Juan Romero Pardines Aq xtraeme@netbsd.org . 160