.\" $NetBSD: bioctl.8,v 1.10 2008/02/02 03:21:47 xtraeme Exp $ .\" $OpenBSD: bioctl.8,v 1.43 2007/03/20 06:12:11 jmc Exp $ .\" .\" Copyright (c) 2007, 2008 Juan Romero Pardines .\" Copyright (c) 2004, 2005 Marco Peereboom .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd February 2, 2008 .Dt BIOCTL 8 .Os .Sh NAME .Nm bioctl .Nd RAID management interface .Sh SYNOPSIS .Nm bioctl .Ar device .Ar command .Op Ar arg Op ... .Sh DESCRIPTION RAID device drivers which support management functionality can register their services with the .Xr bio 4 driver. .Nm bioctl then can be used to manage RAID controller's properties. .Sh COMMANDS The following commands are supported: .Bl -tag -width XXstrategyXXnameXX .It Ic show Op Ar disks | volumes Without any argument by default it will show information about all volumes and the logical disks used on them. If .Ar disks is specified, only information will be shown about physical disks. If .Ar volumes is specified, only information will be shown about the volumes. .It Ic alarm Op Ar enable | disable | silence | test Control the RAID card's alarm functionality, if supported. By default its state will be shown if no argument is specified. Optionally the .Ar enable , .Ar disable , .Ar silence or .Ar test argument may be specified to enable, disable, silence or test the RAID card's alarm. .It Ic blink Ar start | stop Op Ar channel:target.lun Instruct the device at .Ar channel:target.lun to start or cease blinking, if there's .Xr ses 4 support in the enclosure. .It Ic hotspare Ar add | remove Ar channel:target.lun Create or remove a hot-spare drive at location .Ar channel:target.lun . .It Ic passthru Ar add DISKID | remove Ar channel:target.lun Create or remove a .Ar pass-through device. The .Ar DISKID argument specifies the disk that will be used for the new device, and it will be created at .Ar channel:target.lun location. .Em NOTE : removing a pass-through device that has a mounted filesystem will lead to undefined behaviour. .It Ic check Ar start | stop VOLID Start or stop consistency volume check in the volume with index .Ar VOLID . .Em NOTE : not many RAID controllers will support this feature. .It Ic create volume Ar VOLID DISKIDs Oo Ar SIZE Oc Ar STRIPE RAID_LEVEL channel:target.lun Create a volume at index .Ar VOLID . The .Ar DISKIDs argument will specify the first and last disk, i.e: .Em 0-3 will use the disks 0, 1, 2 and 3. The .Ar SIZE argument is optional and may be specified if not all available disk space is wanted (dependent of the .Ar RAID_LEVEL too). The volume will have a stripe size defined in the .Ar STRIPE argument and it will be located at .Ar channel:target.lun . .It Ic remove volume Ar VOLID channel:target.lun Remove a volume at index .Ar VOLID and located at .Ar channel:target.lun . .Em NOTE: removing a RAID volume that has a mounted filesystem will lead to undefined behaviour. .El .Sh EXAMPLES The following command, executed from the command line, shows the status of the volumes and its logical disks on the RAID controller: .Bd -literal $ bioctl show arcmsr0 Volume Status Size Device/Label RAID Level Stripe ================================================================= 0 Building 468G sd0 ARC-1210-VOL#00 RAID 6 128KB 0% done 0:0 Online 234G 0:0.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] 0:1 Online 234G 0:1.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] 0:2 Online 234G 0:2.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] 0:3 Online 234G 0:3.0 noencl \*[Lt]WDC WD2500YS-01SHB1 20.06C06\*[Gt] .Ed .Pp To create a RAID 5 volume on the SCSI 15:0.0 location on the disks 0, 1, 2 and 3, with stripe size of 64Kb on the first volume ID, using all available free space on the disks: .Pp .Dl $ bioctl arcmsr0 create volume 0 0-3 64 5 15:0.0 .Pp To remove the volume 0 previously created at the SCSI 15:0.0 location: .Pp .Dl $ bioctl arcmsr0 remove volume 0 15:0.0 .Pp .Sh SEE ALSO .Xr arcmsr 4 , .Xr bio 4 , .Xr mfi 4 .Sh HISTORY The .Nm command first appeared in .Ox 3.8 , it was rewritten for .Nx 5.0 . .Sh AUTHORS The .Nm interface was written by .An Marco Peereboom Aq marco@openbsd.org and was rewritten with multiple features by .An Juan Romero Pardines Aq xtraeme@netbsd.org .