From: jsing Date: Sat, 11 Apr 2015 16:37:34 +0000 (+0000) Subject: Re-enable the RAID 5 discipline for softraid(4). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=74dd158f2d1a9ed7a2702a5bf45f589943528f6e;p=openbsd Re-enable the RAID 5 discipline for softraid(4). The RAID 5 implementation has been largely rewritten during the last two hackathons in Dunedin - it now needs further testing and usage. --- diff --git a/sbin/bioctl/bioctl.8 b/sbin/bioctl/bioctl.8 index 8cb965eaa25..2eb5bcba00c 100644 --- a/sbin/bioctl/bioctl.8 +++ b/sbin/bioctl/bioctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bioctl.8,v 1.94 2015/02/28 21:51:57 bentley Exp $ +.\" $OpenBSD: bioctl.8,v 1.95 2015/04/11 16:37:34 jsing Exp $ .\" .\" Copyright (c) 2004, 2005 Marco Peereboom .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: February 28 2015 $ +.Dd $Mdocdate: April 11 2015 $ .Dt BIOCTL 8 .Os .Sh NAME @@ -194,9 +194,9 @@ A striping discipline. .It 1 RAID 1: A mirroring discipline. -.\" .It 5 -.\" RAID 5: -.\" A striping discipline with floating parity chunk. +.It 5 +RAID 5: +A striping discipline with floating parity chunk. .It C CRYPTO: An encrypting discipline. @@ -207,8 +207,8 @@ A concatenating discipline. .Pp The RAID 0, RAID 1 and CONCAT disciplines require a minimum of two devices to be provided via -.Fl l -.\" RAID 5 requires at least three devices, +.Fl l . +RAID 5 requires at least three devices and the CRYPTO discipline requires exactly one. .It Fl d Delete volume specified by device. diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c index e823581c832..393f1d54942 100644 --- a/sbin/bioctl/bioctl.c +++ b/sbin/bioctl/bioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bioctl.c,v 1.124 2015/03/18 07:42:13 uebayasi Exp $ */ +/* $OpenBSD: bioctl.c,v 1.125 2015/04/11 16:37:34 jsing Exp $ */ /* * Copyright (c) 2004, 2005 Marco Peereboom @@ -785,11 +785,9 @@ bio_createraid(u_int16_t level, char *dev_list, char *key_disk) case 1: min_disks = 2; break; -#ifdef RAID5 case 5: min_disks = 3; break; -#endif /* RAID5 */ case 'C': min_disks = 1; break; diff --git a/share/man/man4/softraid.4 b/share/man/man4/softraid.4 index 9979102009f..d815bb0b95d 100644 --- a/share/man/man4/softraid.4 +++ b/share/man/man4/softraid.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: softraid.4,v 1.39 2015/02/16 16:38:54 naddy Exp $ +.\" $OpenBSD: softraid.4,v 1.40 2015/04/11 16:37:34 jsing Exp $ .\" .\" Copyright (c) 2007 Todd T. Fries .\" Copyright (c) 2007 Marco Peereboom @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: February 16 2015 $ +.Dd $Mdocdate: April 11 2015 $ .Dt SOFTRAID 4 .Os .Sh NAME @@ -78,14 +78,14 @@ though at the cost of write speed. Unlike traditional RAID 1, .Nm supports the use of more than two chunks in a RAID 1 setup. -.\" .It RAID 5 -.\" A striping discipline with -.\" .Em floating parity -.\" across all chunks. -.\" It stripes data across chunks and provides parity to prevent data loss of -.\" a single chunk failure. -.\" Read performance is increased; -.\" write performance does incur additional overhead. +.It RAID 5 +A striping discipline with +.Em floating parity +across all chunks. +It stripes data across chunks and provides parity to prevent data loss of +a single chunk failure. +Read performance is increased; +write performance does incur additional overhead. .It CRYPTO An .Em encrypting @@ -198,9 +198,9 @@ The RAID 1 discipline does not initialize the mirror upon creation. This is by design because all sectors that are read are written first. There is no point in wasting a lot of time syncing random data. .Pp -.\" The RAID 5 discipline do not initialize the parity upon creation. -.\" This is due to the scrub functionality not being currently implemented. -.\" .Pp +The RAID 5 discipline does not initialize parity upon creation, instead parity +is only updated upon write. +.Pp Currently there is no automated mechanism to recover from failed disks. .Pp Sparc hardware needs to use fstype