Mon May 4 20:37:07 2009 UTC ()
New sentence, new line. Sort SEE ALSO.


(wiz)
diff -r1.35 -r1.36 src/share/man/man4/raid.4

cvs diff -r1.35 -r1.36 src/share/man/man4/raid.4 (expand / switch to unified diff)

--- src/share/man/man4/raid.4 2008/05/02 18:11:05 1.35
+++ src/share/man/man4/raid.4 2009/05/04 20:37:07 1.36
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: raid.4,v 1.35 2008/05/02 18:11:05 martin Exp $ 1.\" $NetBSD: raid.4,v 1.36 2009/05/04 20:37:07 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1998 The NetBSD Foundation, Inc. 3.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Greg Oster 7.\" by Greg Oster
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -77,194 +77,215 @@ @@ -77,194 +77,215 @@
77.Cd options RF_INCLUDE_PARITY_DECLUSTERING=n 77.Cd options RF_INCLUDE_PARITY_DECLUSTERING=n
78.Cd options RF_INCLUDE_PARITY_DECLUSTERING_DS=n 78.Cd options RF_INCLUDE_PARITY_DECLUSTERING_DS=n
79.Cd options RF_INCLUDE_PARITYLOGGING=n 79.Cd options RF_INCLUDE_PARITYLOGGING=n
80.Cd options RF_INCLUDE_RAID5_RS=n 80.Cd options RF_INCLUDE_RAID5_RS=n
81.Pp 81.Pp
82.Cd "pseudo-device raid" Op Ar count 82.Cd "pseudo-device raid" Op Ar count
83.Sh DESCRIPTION 83.Sh DESCRIPTION
84The 84The
85.Nm 85.Nm
86driver provides RAID 0, 1, 4, and 5 (and more!) capabilities to 86driver provides RAID 0, 1, 4, and 5 (and more!) capabilities to
87.Nx . 87.Nx .
88This 88This
89document assumes that the reader has at least some familiarity with RAID 89document assumes that the reader has at least some familiarity with RAID
90and RAID concepts. The reader is also assumed to know how to configure 90and RAID concepts.
 91The reader is also assumed to know how to configure
91disks and pseudo-devices into kernels, how to generate kernels, and how 92disks and pseudo-devices into kernels, how to generate kernels, and how
92to partition disks. 93to partition disks.
93.Pp 94.Pp
94RAIDframe provides a number of different RAID levels including: 95RAIDframe provides a number of different RAID levels including:
95.Bl -tag -width indent 96.Bl -tag -width indent
96.It RAID 0 97.It RAID 0
97provides simple data striping across the components. 98provides simple data striping across the components.
98.It RAID 1 99.It RAID 1
99provides mirroring. 100provides mirroring.
100.It RAID 4 101.It RAID 4
101provides data striping across the components, with parity 102provides data striping across the components, with parity
102stored on a dedicated drive (in this case, the last component). 103stored on a dedicated drive (in this case, the last component).
103.It RAID 5 104.It RAID 5
104provides data striping across the components, with parity 105provides data striping across the components, with parity
105distributed across all the components. 106distributed across all the components.
106.El 107.El
107.Pp 108.Pp
108There are a wide variety of other RAID levels supported by RAIDframe. 109There are a wide variety of other RAID levels supported by RAIDframe.
109The configuration file options to enable them are briefly outlined 110The configuration file options to enable them are briefly outlined
110at the end of this section. 111at the end of this section.
111.Pp 112.Pp
112Depending on the parity level configured, the device driver can 113Depending on the parity level configured, the device driver can
113support the failure of component drives. The number of failures 114support the failure of component drives.
114allowed depends on the parity level selected. If the driver is able 115The number of failures
 116allowed depends on the parity level selected.
 117If the driver is able
115to handle drive failures, and a drive does fail, then the system is 118to handle drive failures, and a drive does fail, then the system is
116operating in "degraded mode". In this mode, all missing data must be 119operating in "degraded mode".
 120In this mode, all missing data must be
117reconstructed from the data and parity present on the other 121reconstructed from the data and parity present on the other
118components. This results in much slower data accesses, but 122components.
 123This results in much slower data accesses, but
119does mean that a failure need not bring the system to a complete halt. 124does mean that a failure need not bring the system to a complete halt.
120.Pp 125.Pp
121The RAID driver supports and enforces the use of 126The RAID driver supports and enforces the use of
122.Sq component labels . 127.Sq component labels .
123A 128A
124.Sq component label 129.Sq component label
125contains important information about the component, including a 130contains important information about the component, including a
126user-specified serial number, the row and column of that component in 131user-specified serial number, the row and column of that component in
127the RAID set, and whether the data (and parity) on the component is 132the RAID set, and whether the data (and parity) on the component is
128.Sq clean . 133.Sq clean .
129The component label currently lives at the half-way point of the 134The component label currently lives at the half-way point of the
130.Sq reserved section 135.Sq reserved section
131located at the beginning of each component. 136located at the beginning of each component.
132This 137This
133.Sq reserved section 138.Sq reserved section
134is RF_PROTECTED_SECTORS in length (64 blocks or 32Kbytes) and the 139is RF_PROTECTED_SECTORS in length (64 blocks or 32Kbytes) and the
135component label is currently 1Kbyte in size. 140component label is currently 1Kbyte in size.
136.Pp 141.Pp
137If the driver determines that the component labels are very inconsistent with 142If the driver determines that the component labels are very inconsistent with
138respect to each other (e.g. two or more serial numbers do not match) 143respect to each other (e.g. two or more serial numbers do not match)
139or that the component label is not consistent with its assigned place 144or that the component label is not consistent with its assigned place
140in the set (e.g. the component label claims the component should be 145in the set (e.g. the component label claims the component should be
141the 3rd one in a 6-disk set, but the RAID set has it as the 3rd component 146the 3rd one in a 6-disk set, but the RAID set has it as the 3rd component
142in a 5-disk set) then the device will fail to configure. If the 147in a 5-disk set) then the device will fail to configure.
 148If the
143driver determines that exactly one component label seems to be 149driver determines that exactly one component label seems to be
144incorrect, and the RAID set is being configured as a set that supports 150incorrect, and the RAID set is being configured as a set that supports
145a single failure, then the RAID set will be allowed to configure, but 151a single failure, then the RAID set will be allowed to configure, but
146the incorrectly labeled component will be marked as 152the incorrectly labeled component will be marked as
147.Sq failed , 153.Sq failed ,
148and the RAID set will begin operation in degraded mode. 154and the RAID set will begin operation in degraded mode.
149If all of the components are consistent among themselves, the RAID set 155If all of the components are consistent among themselves, the RAID set
150will configure normally. 156will configure normally.
151.Pp 157.Pp
152Component labels are also used to support the auto-detection and 158Component labels are also used to support the auto-detection and
153autoconfiguration of RAID sets. A RAID set can be flagged as 159autoconfiguration of RAID sets.
 160A RAID set can be flagged as
154autoconfigurable, in which case it will be configured automatically 161autoconfigurable, in which case it will be configured automatically
155during the kernel boot process. RAID file systems which are 162during the kernel boot process.
 163RAID file systems which are
156automatically configured are also eligible to be the root file system. 164automatically configured are also eligible to be the root file system.
157There is currently only limited support (alpha, amd64, i386, pmax, 165There is currently only limited support (alpha, amd64, i386, pmax,
158sparc, sparc64, and vax architectures) 166sparc, sparc64, and vax architectures)
159for booting a kernel directly from a RAID 1 set, and no support for 167for booting a kernel directly from a RAID 1 set, and no support for
160booting from any other RAID sets. To use a RAID set as the root 168booting from any other RAID sets.
 169To use a RAID set as the root
161file system, a kernel is usually obtained from a small non-RAID 170file system, a kernel is usually obtained from a small non-RAID
162partition, after which any autoconfiguring RAID set can be used for the 171partition, after which any autoconfiguring RAID set can be used for the
163root file system. See 172root file system.
 173See
164.Xr raidctl 8 174.Xr raidctl 8
165for more information on autoconfiguration of RAID sets. 175for more information on autoconfiguration of RAID sets.
166Note that with autoconfiguration of RAID sets, it is no longer 176Note that with autoconfiguration of RAID sets, it is no longer
167necessary to hard-code SCSI IDs of drives. 177necessary to hard-code SCSI IDs of drives.
168The autoconfiguration code will 178The autoconfiguration code will
169correctly configure a device even after any number of the components 179correctly configure a device even after any number of the components
170have had their device IDs changed or device names changed. 180have had their device IDs changed or device names changed.
171.Pp 181.Pp
172The driver supports 182The driver supports
173.Sq hot spares , 183.Sq hot spares ,
174disks which are on-line, but are not 184disks which are on-line, but are not
175actively used in an existing file system. Should a disk fail, the 185actively used in an existing file system.
 186Should a disk fail, the
176driver is capable of reconstructing the failed disk onto a hot spare 187driver is capable of reconstructing the failed disk onto a hot spare
177or back onto a replacement drive. 188or back onto a replacement drive.
178If the components are hot swappable, the failed disk can then be 189If the components are hot swappable, the failed disk can then be
179removed, a new disk put in its place, and a copyback operation 190removed, a new disk put in its place, and a copyback operation
180performed. The copyback operation, as its name indicates, will copy 191performed.
 192The copyback operation, as its name indicates, will copy
181the reconstructed data from the hot spare to the previously failed 193the reconstructed data from the hot spare to the previously failed
182(and now replaced) disk. Hot spares can also be hot-added using 194(and now replaced) disk.
 195Hot spares can also be hot-added using
183.Xr raidctl 8 . 196.Xr raidctl 8 .
184.Pp 197.Pp
185If a component cannot be detected when the RAID device is configured, 198If a component cannot be detected when the RAID device is configured,
186that component will be simply marked as 'failed'. 199that component will be simply marked as 'failed'.
187.Pp 200.Pp
188The user-land utility for doing all 201The user-land utility for doing all
189.Nm 202.Nm
190configuration and other operations 203configuration and other operations
191is 204is
192.Xr raidctl 8 . 205.Xr raidctl 8 .
193Most importantly, 206Most importantly,
194.Xr raidctl 8 207.Xr raidctl 8
195must be used with the 208must be used with the
196.Fl i 209.Fl i
197option to initialize all RAID sets. In particular, this 210option to initialize all RAID sets.
198initialization includes re-building the parity data. This rebuilding 211In particular, this
 212initialization includes re-building the parity data.
 213This rebuilding
199of parity data is also required when either a) a new RAID device is 214of parity data is also required when either a) a new RAID device is
200brought up for the first time or b) after an un-clean shutdown of a 215brought up for the first time or b) after an un-clean shutdown of a
201RAID device. By using the 216RAID device.
 217By using the
202.Fl P 218.Fl P
203option to 219option to
204.Xr raidctl 8 , 220.Xr raidctl 8 ,
205and performing this on-demand recomputation of all parity 221and performing this on-demand recomputation of all parity
206before doing a 222before doing a
207.Xr fsck 8 223.Xr fsck 8
208or a 224or a
209.Xr newfs 8 , 225.Xr newfs 8 ,
210file system integrity and parity integrity can be ensured. It bears 226file system integrity and parity integrity can be ensured.
211repeating again that parity recomputation is 227It bears repeating again that parity recomputation is
212.Ar required 228.Ar required
213before any file systems are created or used on the RAID device. If the 229before any file systems are created or used on the RAID device.
 230If the
214parity is not correct, then missing data cannot be correctly recovered. 231parity is not correct, then missing data cannot be correctly recovered.
215.Pp 232.Pp
216RAID levels may be combined in a hierarchical fashion. For example, a RAID 0 233RAID levels may be combined in a hierarchical fashion.
 234For example, a RAID 0
217device can be constructed out of a number of RAID 5 devices (which, in turn, 235device can be constructed out of a number of RAID 5 devices (which, in turn,
218may be constructed out of the physical disks, or of other RAID devices). 236may be constructed out of the physical disks, or of other RAID devices).
219.Pp 237.Pp
220The first step to using the 238The first step to using the
221.Nm 239.Nm
222driver is to ensure that it is suitably configured in the kernel. This is 240driver is to ensure that it is suitably configured in the kernel.
223done by adding a line similar to: 241This is done by adding a line similar to:
224.Bd -unfilled -offset indent 242.Bd -unfilled -offset indent
225pseudo-device raid 4 # RAIDframe disk device 243pseudo-device raid 4 # RAIDframe disk device
226.Ed 244.Ed
227.Pp 245.Pp
228to the kernel configuration file. The 246to the kernel configuration file.
 247The
229.Sq count 248.Sq count
230argument ( 249argument
231.Sq 4 , 250.Sq ( 4 ,
232in this case), specifies the number of RAIDframe drivers to configure. 251in this case), specifies the number of RAIDframe drivers to configure.
233To turn on component auto-detection and autoconfiguration of RAID 252To turn on component auto-detection and autoconfiguration of RAID
234sets, simply add: 253sets, simply add:
235.Bd -unfilled -offset indent 254.Bd -unfilled -offset indent
236options RAID_AUTOCONFIG 255options RAID_AUTOCONFIG
237.Ed 256.Ed
238.Pp 257.Pp
239to the kernel configuration file. 258to the kernel configuration file.
240.Pp 259.Pp
241All component partitions must be of the type 260All component partitions must be of the type
242.Dv FS_BSDFFS 261.Dv FS_BSDFFS
243(e.g. 4.2BSD) or 262(e.g. 4.2BSD) or
244.Dv FS_RAID . 263.Dv FS_RAID .
245The use of the latter is strongly encouraged, and is required if 264The use of the latter is strongly encouraged, and is required if
246autoconfiguration of the RAID set is desired. Since RAIDframe leaves 265autoconfiguration of the RAID set is desired.
 266Since RAIDframe leaves
247room for disklabels, RAID components can be simply raw disks, or 267room for disklabels, RAID components can be simply raw disks, or
248partitions which use an entire disk. 268partitions which use an entire disk.
249.Pp 269.Pp
250A more detailed treatment of actually using a 270A more detailed treatment of actually using a
251.Nm 271.Nm
252device is found in 272device is found in
253.Xr raidctl 8 . 273.Xr raidctl 8 .
254It is highly recommended that the steps to reconstruct, copyback, and 274It is highly recommended that the steps to reconstruct, copyback, and
255re-compute parity are well understood by the system administrator(s) 275re-compute parity are well understood by the system administrator(s)
256.Ar before 276.Ar before
257a component failure. Doing the wrong thing when a component fails may 277a component failure.
 278Doing the wrong thing when a component fails may
258result in data loss. 279result in data loss.
259.Pp 280.Pp
260Additional internal consistency checking can be enabled by specifying: 281Additional internal consistency checking can be enabled by specifying:
261.Bd -unfilled -offset indent 282.Bd -unfilled -offset indent
262options RAID_DIAGNOSTIC 283options RAID_DIAGNOSTIC
263.Ed 284.Ed
264.Pp 285.Pp
265These assertions are disabled by default in order to improve 286These assertions are disabled by default in order to improve
266performance. 287performance.
267.Pp 288.Pp
268RAIDframe supports an access tracing facility for tracking both 289RAIDframe supports an access tracing facility for tracking both
269requests made and performance of various parts of the RAID systems 290requests made and performance of various parts of the RAID systems
270as the request is processed. 291as the request is processed.
@@ -362,68 +383,74 @@ For Parity Declustering: @@ -362,68 +383,74 @@ For Parity Declustering:
362options RF_INCLUDE_PARITY_DECLUSTERING=1 383options RF_INCLUDE_PARITY_DECLUSTERING=1
363.Ed 384.Ed
364.Pp 385.Pp
365For Parity Declustering with Distributed Spares: 386For Parity Declustering with Distributed Spares:
366.Bd -unfilled -offset indent 387.Bd -unfilled -offset indent
367options RF_INCLUDE_PARITY_DECLUSTERING_DS=1 388options RF_INCLUDE_PARITY_DECLUSTERING_DS=1
368.Ed 389.Ed
369.Pp 390.Pp
370The reader is referred to the RAIDframe documentation mentioned in the 391The reader is referred to the RAIDframe documentation mentioned in the
371.Sx HISTORY 392.Sx HISTORY
372section for more detail on these various RAID configurations. 393section for more detail on these various RAID configurations.
373.Sh WARNINGS 394.Sh WARNINGS
374Certain RAID levels (1, 4, 5, 6, and others) can protect against some 395Certain RAID levels (1, 4, 5, 6, and others) can protect against some
375data loss due to component failure. However the loss of two 396data loss due to component failure.
 397However the loss of two
376components of a RAID 4 or 5 system, or the loss of a single component 398components of a RAID 4 or 5 system, or the loss of a single component
377of a RAID 0 system, will result in the entire file systems on that RAID 399of a RAID 0 system, will result in the entire file systems on that RAID
378device being lost. 400device being lost.
379RAID is 401RAID is
380.Ar NOT 402.Ar NOT
381a substitute for good backup practices. 403a substitute for good backup practices.
382.Pp 404.Pp
383Recomputation of parity 405Recomputation of parity
384.Ar MUST 406.Ar MUST
385be performed whenever there is a chance that it may have been 407be performed whenever there is a chance that it may have been
386compromised. This includes after system crashes, or before a RAID 408compromised.
387device has been used for the first time. Failure to keep parity 409This includes after system crashes, or before a RAID
 410device has been used for the first time.
 411Failure to keep parity
388correct will be catastrophic should a component ever fail -- it is 412correct will be catastrophic should a component ever fail -- it is
389better to use RAID 0 and get the additional space and speed, than it 413better to use RAID 0 and get the additional space and speed, than it
390is to use parity, but not keep the parity correct. At least with RAID 414is to use parity, but not keep the parity correct.
 415At least with RAID
3910 there is no perception of increased data security. 4160 there is no perception of increased data security.
392.Sh FILES 417.Sh FILES
393.Bl -tag -width /dev/XXrXraidX -compact 418.Bl -tag -width /dev/XXrXraidX -compact
394.It Pa /dev/{,r}raid* 419.It Pa /dev/{,r}raid*
395.Nm 420.Nm
396device special files. 421device special files.
397.El 422.El
398.Sh SEE ALSO 423.Sh SEE ALSO
399.Xr config 1 , 424.Xr config 1 ,
400.Xr sd 4 , 425.Xr sd 4 ,
401.Xr MAKEDEV 8 , 
402.Xr fsck 8 , 426.Xr fsck 8 ,
 427.Xr MAKEDEV 8 ,
403.Xr mount 8 , 428.Xr mount 8 ,
404.Xr newfs 8 , 429.Xr newfs 8 ,
405.Xr raidctl 8 430.Xr raidctl 8
406.Sh HISTORY 431.Sh HISTORY
407The 432The
408.Nm 433.Nm
409driver in 434driver in
410.Nx 435.Nx
411is a port of RAIDframe, a framework for rapid prototyping of RAID 436is a port of RAIDframe, a framework for rapid prototyping of RAID
412structures developed by the folks at the Parallel Data Laboratory at 437structures developed by the folks at the Parallel Data Laboratory at
413Carnegie Mellon University (CMU). RAIDframe, as originally distributed 438Carnegie Mellon University (CMU).
 439RAIDframe, as originally distributed
414by CMU, provides a RAID simulator for a number of different 440by CMU, provides a RAID simulator for a number of different
415architectures, and a user-level device driver and a kernel device 441architectures, and a user-level device driver and a kernel device
416driver for Digital Unix. The 442driver for Digital Unix.
 443The
417.Nm 444.Nm
418driver is a kernelized version of RAIDframe v1.1. 445driver is a kernelized version of RAIDframe v1.1.
419.Pp 446.Pp
420A more complete description of the internals and functionality of 447A more complete description of the internals and functionality of
421RAIDframe is found in the paper "RAIDframe: A Rapid Prototyping Tool 448RAIDframe is found in the paper "RAIDframe: A Rapid Prototyping Tool
422for RAID Systems", by William V. Courtright II, Garth Gibson, Mark 449for RAID Systems", by William V. Courtright II, Garth Gibson, Mark
423Holland, LeAnn Neal Reilly, and Jim Zelenka, and published by the 450Holland, LeAnn Neal Reilly, and Jim Zelenka, and published by the
424Parallel Data Laboratory of Carnegie Mellon University. 451Parallel Data Laboratory of Carnegie Mellon University.
425The 452The
426.Nm 453.Nm
427driver first appeared in 454driver first appeared in
428.Nx 1.4 . 455.Nx 1.4 .
429.Sh COPYRIGHT 456.Sh COPYRIGHT