From 42d17403ce6a69ec53f2a227324c0c8f80751d26 Mon Sep 17 00:00:00 2001 From: kn Date: Sun, 4 Sep 2022 08:06:40 +0000 Subject: [PATCH] Document disklabel(8) -T's new RAID template OK jmc --- sbin/disklabel/disklabel.8 | 20 +++++++++++++++----- share/man/man4/softraid.4 | 11 ++++++----- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/sbin/disklabel/disklabel.8 b/sbin/disklabel/disklabel.8 index ec864a7cbd1..b9ca7ec3b3b 100644 --- a/sbin/disklabel/disklabel.8 +++ b/sbin/disklabel/disklabel.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: disklabel.8,v 1.148 2022/07/31 14:29:19 krw Exp $ +.\" $OpenBSD: disklabel.8,v 1.149 2022/09/04 08:06:40 kn Exp $ .\" $NetBSD: disklabel.8,v 1.9 1995/03/18 14:54:38 cgd Exp $ .\" .\" Copyright (c) 1987, 1988, 1991, 1993 @@ -33,7 +33,7 @@ .\" .\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94 .\" -.Dd $Mdocdate: July 31 2022 $ +.Dd $Mdocdate: September 4 2022 $ .Dt DISKLABEL 8 .Os .Sh NAME @@ -538,11 +538,11 @@ A template for the automatic allocation can be passed to disklabel using the .Fl T option. -The template consists of one line per partition, with each line giving +The template consists of one line per partition, each giving partition type or mount point, min-max size range, and percentage of disk, space-separated. Max can be unlimited by specifying '*'. -If only mount point and min size are given, the partition is created with that -exact size. +If max size and percentage of disk are omitted, the partition is +created with the exact min size. .Bd -literal -offset indent / 250M swap 80M-256M 10% @@ -555,6 +555,15 @@ swap 80M-256M 10% /usr/obj 1.3G-2G 4% /home 1G-* 45% .Ed +.Pp +The partition type +.Dq RAID +denotes partitions suitable as +.Xr softraid 4 +chunks. +.Bd -literal -offset indent +RAID 1M-* 100% +.Ed .Sh FILES .Bl -tag -width Pa -compact .It Pa /etc/disktab @@ -597,6 +606,7 @@ setting the label on the new partition while shrinking the .Sq a partition. .Sh SEE ALSO +.Xr softraid 4 , .Xr disklabel 5 , .Xr disktab 5 , .Xr installboot 8 , diff --git a/share/man/man4/softraid.4 b/share/man/man4/softraid.4 index a15f9692aaa..99c435f6ef5 100644 --- a/share/man/man4/softraid.4 +++ b/share/man/man4/softraid.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: softraid.4,v 1.48 2022/08/13 11:13:17 jmc Exp $ +.\" $OpenBSD: softraid.4,v 1.49 2022/09/04 08:06:40 kn 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: August 13 2022 $ +.Dd $Mdocdate: September 4 2022 $ .Dt SOFTRAID 4 .Os .Sh NAME @@ -183,9 +183,10 @@ Initialize the partition tables of all disks: .Pp Now create RAID partitions on all disks: .Bd -literal -offset indent -# printf "a\en\en\en\enRAID\enw\enq\en" | disklabel -E wd1 -# printf "a\en\en\en\enRAID\enw\enq\en" | disklabel -E wd2 -# printf "a\en\en\en\enRAID\enw\enq\en" | disklabel -E wd3 +$ echo 'RAID 1M-* 100%' > template +# disklabel -wAT template wd1 +# disklabel -wAT template wd2 +# disklabel -wAT template wd3 .Ed .Pp Assemble the RAID volume: -- 2.20.1