diff options
-rw-r--r-- | sbin/bioctl/bioctl.8 | 27 | ||||
-rw-r--r-- | sbin/bioctl/bioctl.c | 9 | ||||
-rw-r--r-- | share/man/man4/Makefile | 4 | ||||
-rw-r--r-- | share/man/man4/softraid.4 | 91 |
4 files changed, 124 insertions, 7 deletions
diff --git a/sbin/bioctl/bioctl.8 b/sbin/bioctl/bioctl.8 index 5779ce8511d..88df92324ab 100644 --- a/sbin/bioctl/bioctl.8 +++ b/sbin/bioctl/bioctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bioctl.8,v 1.41 2006/09/03 18:37:44 marco Exp $ +.\" $OpenBSD: bioctl.8,v 1.42 2007/03/20 03:40:38 todd Exp $ .\" .\" Copyright (c) 2004, 2005 Marco Peereboom .\" @@ -35,7 +35,9 @@ .Op Fl Dhiv .Op Fl a Ar alarm-function .Op Fl b Ar channel:target[.lun] +.Op Fl c Ar raidlevel .Op Fl H Ar channel:target[.lun] +.Op Fl l Ar special[,special[,...]] .Op Fl u Ar channel:target[.lun] .Ar device .Ek @@ -78,6 +80,12 @@ to start blinking, if there is or .Xr safte 4 support in the enclosure. +.It Fl c Ar raidlevel +Create a +.Xr softraid 4 +device of level +.Ar raidlevel . +The device must begin with 'softraid' followed by a number. .It Fl D Enable debug output. .It Fl H Ar channel:target[.lun] @@ -94,6 +102,12 @@ Gigabyte, Terabyte, Petabyte, Exabyte in order to reduce the number of digits to four or less. .It Fl i Enumerate the selected RAID devices. +.It Fl l Ar special[,special[,...]] +Use +.Ar special +device list to create within the +.Xr softraid 4 framework. Requires +.Fl -c . .It Fl u Ar channel:target[.lun] Instruct the device at .Ar channel:target[.lun] @@ -113,6 +127,14 @@ or enclosures, it is also possible to directly specify the enclosure name (e.g. safte0). .El +.Sh EXAMPLES +The following command, executed from the command line, would configure +the device softraid0 with 4 special devices +(/dev/sd2e, /dev/sd3e, /dev/sd4e, /dev/sd5e) and +a raid level of 1. +.Bd -literal -offset indent +# bioctl -c 1 -l /dev/sd2e,/dev/sd3e,/dev/sd4e,/dev/sd5e softraid0 +.Ed .Sh SEE ALSO .Xr ami 4 , .Xr arc 4 , @@ -121,7 +143,8 @@ enclosures, it is also possible to directly specify the enclosure name .Xr mfi 4 , .Xr safte 4 , .Xr scsi 4 , -.Xr ses 4 +.Xr ses 4 , +.Xr softraid 4 . .Sh HISTORY The .Nm diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c index f6813a9e32a..2ac639a784e 100644 --- a/sbin/bioctl/bioctl.c +++ b/sbin/bioctl/bioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bioctl.c,v 1.49 2007/03/19 03:02:09 marco Exp $ */ +/* $OpenBSD: bioctl.c,v 1.50 2007/03/20 03:40:38 todd Exp $ */ /* * Copyright (c) 2004, 2005 Marco Peereboom @@ -191,8 +191,11 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s [-Dhiv] [-a alarm-function]" - " [[-bHu] chan:targ[.lun]] device\n", __progname); + fprintf(stderr, "usage: %s\t[-Dhiv] [-a alarm-function]" + " [-b channel:target[.lun]] device\n", __progname); + fprintf(stderr, "\t\t[[-c raidlevel] [-H channel:target[.lun]]\n"); + fprintf(stderr, "\t\t[-l special[,special[,...]]] " + "[-u channel:target[.lun]] device\n"); exit(1); } diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 559de66ccb5..b71e14b7aba 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.409 2007/03/19 04:48:23 deraadt Exp $ +# $OpenBSD: Makefile,v 1.410 2007/03/20 03:40:38 todd Exp $ MAN= aac.4 ac97.4 acphy.4 \ acpi.4 acpiac.4 acpibat.4 acpibtn.4 acpicpu.4 acpidock.4 \ @@ -39,7 +39,7 @@ MAN= aac.4 ac97.4 acphy.4 \ rl.4 rln.4 rlphy.4 route.4 rt.4 rum.4 \ rtfps.4 rtii.4 rtw.4 safe.4 safte.4 san.4 sbus.4 scsi.4 sd.4 \ sdmmc.4 sdhc.4 ses.4 \ - sequencer.4 sf.4 sf2r.4 sfr.4 siop.4 sis.4 sk.4 sl.4 sm.4 \ + sequencer.4 sf.4 sf2r.4 sfr.4 siop.4 sis.4 sk.4 sl.4 sm.4 softraid.4 \ speaker.4 sppp.4 sqphy.4 ss.4 st.4 ste.4 stge.4 sti.4 stp.4 sv.4 \ systrace.4 tcic.4 tcp.4 termios.4 ti.4 tl.4 \ tlphy.4 tqphy.4 trm.4 trunk.4 tsl.4 tty.4 tun.4 twe.4 txp.4 \ diff --git a/share/man/man4/softraid.4 b/share/man/man4/softraid.4 new file mode 100644 index 00000000000..e2bf48f8337 --- /dev/null +++ b/share/man/man4/softraid.4 @@ -0,0 +1,91 @@ +.\" $OpenBSD: softraid.4,v 1.1 2007/03/20 03:40:38 todd Exp $ +.\" +.\" Copyright (c) 2007 Todd T. Fries <todd@OpenBSD.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd March 19, 2007 +.Dt SOFTRAID 4 +.Os +.Sh NAME +.Nm softraid +.Nd Software RAID +.Sh SYNOPSIS +.Cd "softraid0 at root" +.Cd "scsibus* at softraid?" +.Sh DESCRIPTION +The +.Nm +driver provides RAID 1 capabilities to +.Ox . +.Pp +It provides a single RAID level: +.Bl -tag -width indent -offset indent +.\" .It RAID 0 +.\" provides simple data striping across the components. +.It RAID 1 +provides mirroring. +.\" .It RAID 5 +.\" provides data striping across the components, with parity +.\" distributed across all the components. +.El +.Pp +See +.Xr bioctl 8 +for more information on configuration of RAID sets. +.Pp +The first step to using the +.Nm +driver is to ensure that it is suitably configured in the kernel. +This is done by adding the following lines +to the kernel configuration file: +.Bd -literal -offset indent +softraid0 at root # Software RAID +scsibus* at softraid? +.Ed +.Pp +All component partitions must be of type +.Dv RAID . +Some platforms, such as SUN, are not capable of using the +.Dv RAID +partition type. The +.Dv 4.2BSD +partition type should be used on such platforms. +.Sh SEE ALSO +.Xr sd 4 , +.Xr wd 4 , +.Xr bioctl 8 , +.Xr config 8 , +.Xr fsck 8 , +.Xr MAKEDEV 8 , +.Xr mount 8 , +.Xr newfs 8 +.Sh HISTORY +The +.Nm +driver in +.Ox +is an original work by Marco Peereboom. +It first appeared in +.Ox 4.2 . +.Sh CAVEATS +RAID level 1 can protect against some +data loss due to component failure. +However the loss of all components of a RAID 0 system +will result in the entire filesystems on that RAID device +being lost. +RAID is +.Em not +a substitute for good backup practices. +.Sh BUGS +The driver is currently unable to handle drive failures. |