From a4d828bd4e64b433c7212fb1491303e4442bc501 Mon Sep 17 00:00:00 2001 From: oster Date: Sat, 26 Feb 2000 01:14:16 +0000 Subject: [PATCH] Note auto-detection and auto-configuration, as well as the ability to auto-configure even if the components are rearranged. --- share/man/man4/raid.4 | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/share/man/man4/raid.4 b/share/man/man4/raid.4 index e5a016bbad5b..9f70cf52ce07 100644 --- a/share/man/man4/raid.4 +++ b/share/man/man4/raid.4 @@ -1,4 +1,4 @@ -.\" $NetBSD: raid.4,v 1.10 2000/01/23 02:04:10 oster Exp $ +.\" $NetBSD: raid.4,v 1.11 2000/02/26 01:14:16 oster Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -112,8 +112,8 @@ The RAID driver supports and enforces the use of A .Sq component label contains important information about the component, including a -user-specified serial number, the row and column of that component in the RAID -set, and whether the data (and parity) on the component is +user-specified serial number, the row and column of that component in +the RAID set, and whether the data (and parity) on the component is .Sq clean . If the driver determines that the labels are very inconsistent with respect to each other (e.g. two or more serial numbers do not match) @@ -130,6 +130,17 @@ and the RAID set will begin operation in degraded mode. If all of the components are consistent among themselves, the RAID set will configure normally. .Pp +Component labels are also used to support the auto-detection and +auto-configuration of RAID sets. A RAID set can be flagged as +auto-configurable, in which case it will be configured automatically +during the kernel boot process. RAID filesystems which are +automatically configured are also eligible to be the root filesystem. +While there is no support for booting directly from a RAID set, it is +possible to boot from a small partition which contains a kernel, and +have the root filesystem on a RAID set. See +.Xr raidctl 8 +for more information on auto-configuration of RAID sets. +.Pp The driver supports .Sq hot spares , disks which are on-line, but are not @@ -151,17 +162,23 @@ The user-land utility for doing all configuration and other operations is .Xr raidctl 8 . -For any of the RAID flavours which have parity data, +Most importantly, .Xr raidctl 8 must be used with the .Fl i -option to re-write the data when either a) a new RAID device is +option to initialize all RAID sets. In particular, this +initialization includes re-building the parity data. This rebuilding +of parity data is also required when either a) a new RAID device is brought up for the first time or b) after an un-clean shutdown of a -RAID device. By performing this on-demand recomputation of all parity +RAID device. By using the +.Fl P +option to +.Xr raidctl 8 , +and performing this on-demand recomputation of all parity before doing a .Xr fsck 8 or a -.Xr newfs 8 +.Xr newfs 8 , filesystem integrity and parity integrity can be ensured. It bears repeating again that parity recomputation is .Ar required @@ -197,7 +214,11 @@ system reboots, the old /dev/sd2e will show up as /dev/sd1e. The RAID driver is able to detect that component positions have changed, and will not allow normal configuration. If the device addresses are hard coded, however, the RAID driver would detect that the middle component -is unavailable, and bring the RAID 5 set up in degraded mode. +is unavailable, and bring the RAID 5 set up in degraded mode. Note +that the auto-detection and auto-configuration code does not care +about where the components live. The auto-configuration code will +correctly configure a device even after any number of the components +have been re-arranged. .Pp The first step to using the .Nm @@ -225,7 +246,10 @@ disklabel for the device. As well, all component partitions must be of the type .Dv FS_BSDFFS -(e.g. 4.2BSD). +(e.g. 4.2BSD) or +.Dv FS_RAID . +The use of the latter is strongly encouraged, and is required if +auto-configuration of the RAID set is desired. .Pp A more detailed treatment of actually using a .Nm