| @@ -1,1601 +1,1613 @@ | | | @@ -1,1601 +1,1613 @@ |
1 | .\" $NetBSD: raidctl.8,v 1.61 2010/01/27 09:26:16 wiz Exp $ | | 1 | .\" $NetBSD: raidctl.8,v 1.62 2011/07/28 18:25:22 buhrow Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 1998, 2002 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 |
15 | .\" notice, this list of conditions and the following disclaimer in the | | 15 | .\" notice, this list of conditions and the following disclaimer in the |
16 | .\" documentation and/or other materials provided with the distribution. | | 16 | .\" documentation and/or other materials provided with the distribution. |
17 | .\" | | 17 | .\" |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | | 18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | .\" POSSIBILITY OF SUCH DAMAGE. | | 28 | .\" POSSIBILITY OF SUCH DAMAGE. |
29 | .\" | | 29 | .\" |
30 | .\" | | 30 | .\" |
31 | .\" Copyright (c) 1995 Carnegie-Mellon University. | | 31 | .\" Copyright (c) 1995 Carnegie-Mellon University. |
32 | .\" All rights reserved. | | 32 | .\" All rights reserved. |
33 | .\" | | 33 | .\" |
34 | .\" Author: Mark Holland | | 34 | .\" Author: Mark Holland |
35 | .\" | | 35 | .\" |
36 | .\" Permission to use, copy, modify and distribute this software and | | 36 | .\" Permission to use, copy, modify and distribute this software and |
37 | .\" its documentation is hereby granted, provided that both the copyright | | 37 | .\" its documentation is hereby granted, provided that both the copyright |
38 | .\" notice and this permission notice appear in all copies of the | | 38 | .\" notice and this permission notice appear in all copies of the |
39 | .\" software, derivative works or modified versions, and any portions | | 39 | .\" software, derivative works or modified versions, and any portions |
40 | .\" thereof, and that both notices appear in supporting documentation. | | 40 | .\" thereof, and that both notices appear in supporting documentation. |
41 | .\" | | 41 | .\" |
42 | .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | | 42 | .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" |
43 | .\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND | | 43 | .\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND |
44 | .\" FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | | 44 | .\" FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. |
45 | .\" | | 45 | .\" |
46 | .\" Carnegie Mellon requests users of this software to return to | | 46 | .\" Carnegie Mellon requests users of this software to return to |
47 | .\" | | 47 | .\" |
48 | .\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | | 48 | .\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU |
49 | .\" School of Computer Science | | 49 | .\" School of Computer Science |
50 | .\" Carnegie Mellon University | | 50 | .\" Carnegie Mellon University |
51 | .\" Pittsburgh PA 15213-3890 | | 51 | .\" Pittsburgh PA 15213-3890 |
52 | .\" | | 52 | .\" |
53 | .\" any improvements or extensions that they make and grant Carnegie the | | 53 | .\" any improvements or extensions that they make and grant Carnegie the |
54 | .\" rights to redistribute these changes. | | 54 | .\" rights to redistribute these changes. |
55 | .\" | | 55 | .\" |
56 | .Dd January 27, 2010 | | 56 | .Dd January 27, 2010 |
57 | .Dt RAIDCTL 8 | | 57 | .Dt RAIDCTL 8 |
58 | .Os | | 58 | .Os |
59 | .Sh NAME | | 59 | .Sh NAME |
60 | .Nm raidctl | | 60 | .Nm raidctl |
61 | .Nd configuration utility for the RAIDframe disk driver | | 61 | .Nd configuration utility for the RAIDframe disk driver |
62 | .Sh SYNOPSIS | | 62 | .Sh SYNOPSIS |
63 | .Nm | | 63 | .Nm |
64 | .Op Fl v | | 64 | .Op Fl v |
65 | .Fl a Ar component Ar dev | | 65 | .Fl a Ar component Ar dev |
66 | .Nm | | 66 | .Nm |
67 | .Op Fl v | | 67 | .Op Fl v |
68 | .Fl A Op yes | no | root | | 68 | .Fl A Op yes | no | root |
69 | .Ar dev | | 69 | .Ar dev |
70 | .Nm | | 70 | .Nm |
71 | .Op Fl v | | 71 | .Op Fl v |
72 | .Fl B Ar dev | | 72 | .Fl B Ar dev |
73 | .Nm | | 73 | .Nm |
74 | .Op Fl v | | 74 | .Op Fl v |
75 | .Fl c Ar config_file Ar dev | | 75 | .Fl c Ar config_file Ar dev |
76 | .Nm | | 76 | .Nm |
77 | .Op Fl v | | 77 | .Op Fl v |
78 | .Fl C Ar config_file Ar dev | | 78 | .Fl C Ar config_file Ar dev |
79 | .Nm | | 79 | .Nm |
80 | .Op Fl v | | 80 | .Op Fl v |
81 | .Fl f Ar component Ar dev | | 81 | .Fl f Ar component Ar dev |
82 | .Nm | | 82 | .Nm |
83 | .Op Fl v | | 83 | .Op Fl v |
84 | .Fl F Ar component Ar dev | | 84 | .Fl F Ar component Ar dev |
85 | .Nm | | 85 | .Nm |
86 | .Op Fl v | | 86 | .Op Fl v |
87 | .Fl g Ar component Ar dev | | 87 | .Fl g Ar component Ar dev |
88 | .Nm | | 88 | .Nm |
89 | .Op Fl v | | 89 | .Op Fl v |
90 | .Fl G Ar dev | | 90 | .Fl G Ar dev |
91 | .Nm | | 91 | .Nm |
92 | .Op Fl v | | 92 | .Op Fl v |
93 | .Fl i Ar dev | | 93 | .Fl i Ar dev |
94 | .Nm | | 94 | .Nm |
95 | .Op Fl v | | 95 | .Op Fl v |
96 | .Fl I Ar serial_number Ar dev | | 96 | .Fl I Ar serial_number Ar dev |
97 | .Nm | | 97 | .Nm |
98 | .Op Fl v | | 98 | .Op Fl v |
99 | .Fl m Ar dev | | 99 | .Fl m Ar dev |
100 | .Nm | | 100 | .Nm |
101 | .Op Fl v | | 101 | .Op Fl v |
102 | .Fl M | | 102 | .Fl M |
103 | .Oo yes | no | set | | 103 | .Oo yes | no | set |
104 | .Ar params | | 104 | .Ar params |
105 | .Oc | | 105 | .Oc |
106 | .Ar dev | | 106 | .Ar dev |
107 | .Nm | | 107 | .Nm |
108 | .Op Fl v | | 108 | .Op Fl v |
109 | .Fl p Ar dev | | 109 | .Fl p Ar dev |
110 | .Nm | | 110 | .Nm |
111 | .Op Fl v | | 111 | .Op Fl v |
112 | .Fl P Ar dev | | 112 | .Fl P Ar dev |
113 | .Nm | | 113 | .Nm |
114 | .Op Fl v | | 114 | .Op Fl v |
115 | .Fl r Ar component Ar dev | | 115 | .Fl r Ar component Ar dev |
116 | .Nm | | 116 | .Nm |
117 | .Op Fl v | | 117 | .Op Fl v |
118 | .Fl R Ar component Ar dev | | 118 | .Fl R Ar component Ar dev |
119 | .Nm | | 119 | .Nm |
120 | .Op Fl v | | 120 | .Op Fl v |
121 | .Fl s Ar dev | | 121 | .Fl s Ar dev |
122 | .Nm | | 122 | .Nm |
123 | .Op Fl v | | 123 | .Op Fl v |
124 | .Fl S Ar dev | | 124 | .Fl S Ar dev |
125 | .Nm | | 125 | .Nm |
126 | .Op Fl v | | 126 | .Op Fl v |
127 | .Fl u Ar dev | | 127 | .Fl u Ar dev |
128 | .Sh DESCRIPTION | | 128 | .Sh DESCRIPTION |
129 | .Nm | | 129 | .Nm |
130 | is the user-land control program for | | 130 | is the user-land control program for |
131 | .Xr raid 4 , | | 131 | .Xr raid 4 , |
132 | the RAIDframe disk device. | | 132 | the RAIDframe disk device. |
133 | .Nm | | 133 | .Nm |
134 | is primarily used to dynamically configure and unconfigure RAIDframe disk | | 134 | is primarily used to dynamically configure and unconfigure RAIDframe disk |
135 | devices. | | 135 | devices. |
136 | For more information about the RAIDframe disk device, see | | 136 | For more information about the RAIDframe disk device, see |
137 | .Xr raid 4 . | | 137 | .Xr raid 4 . |
138 | .Pp | | 138 | .Pp |
139 | This document assumes the reader has at least rudimentary knowledge of | | 139 | This document assumes the reader has at least rudimentary knowledge of |
140 | RAID and RAID concepts. | | 140 | RAID and RAID concepts. |
141 | .Pp | | 141 | .Pp |
142 | The command-line options for | | 142 | The command-line options for |
143 | .Nm | | 143 | .Nm |
144 | are as follows: | | 144 | are as follows: |
145 | .Bl -tag -width indent | | 145 | .Bl -tag -width indent |
146 | .It Fl a Ar component Ar dev | | 146 | .It Fl a Ar component Ar dev |
147 | Add | | 147 | Add |
148 | .Ar component | | 148 | .Ar component |
149 | as a hot spare for the device | | 149 | as a hot spare for the device |
150 | .Ar dev . | | 150 | .Ar dev . |
151 | Component labels (which identify the location of a given | | 151 | Component labels (which identify the location of a given |
152 | component within a particular RAID set) are automatically added to the | | 152 | component within a particular RAID set) are automatically added to the |
153 | hot spare after it has been used and are not required for | | 153 | hot spare after it has been used and are not required for |
154 | .Ar component | | 154 | .Ar component |
155 | before it is used. | | 155 | before it is used. |
156 | .It Fl A Ic yes Ar dev | | 156 | .It Fl A Ic yes Ar dev |
157 | Make the RAID set auto-configurable. | | 157 | Make the RAID set auto-configurable. |
158 | The RAID set will be automatically configured at boot | | 158 | The RAID set will be automatically configured at boot |
159 | .Ar before | | 159 | .Ar before |
160 | the root file system is mounted. | | 160 | the root file system is mounted. |
161 | Note that all components of the set must be of type | | 161 | Note that all components of the set must be of type |
162 | .Dv RAID | | 162 | .Dv RAID |
163 | in the disklabel. | | 163 | in the disklabel. |
164 | .It Fl A Ic no Ar dev | | 164 | .It Fl A Ic no Ar dev |
165 | Turn off auto-configuration for the RAID set. | | 165 | Turn off auto-configuration for the RAID set. |
166 | .It Fl A Ic root Ar dev | | 166 | .It Fl A Ic root Ar dev |
167 | Make the RAID set auto-configurable, and also mark the set as being | | 167 | Make the RAID set auto-configurable, and also mark the set as being |
168 | eligible to be the root partition. | | 168 | eligible to be the root partition. |
169 | A RAID set configured this way will | | 169 | A RAID set configured this way will |
170 | .Ar override | | 170 | .Ar override |
171 | the use of the boot disk as the root device. | | 171 | the use of the boot disk as the root device. |
172 | All components of the set must be of type | | 172 | All components of the set must be of type |
173 | .Dv RAID | | 173 | .Dv RAID |
174 | in the disklabel. | | 174 | in the disklabel. |
175 | Note that only certain architectures | | 175 | Note that only certain architectures |
176 | .Pq currently alpha, i386, pmax, sparc, sparc64, and vax | | 176 | .Pq currently alpha, i386, pmax, sparc, sparc64, and vax |
177 | support booting a kernel directly from a RAID set. | | 177 | support booting a kernel directly from a RAID set. |
178 | .It Fl B Ar dev | | 178 | .It Fl B Ar dev |
179 | Initiate a copyback of reconstructed data from a spare disk to | | 179 | Initiate a copyback of reconstructed data from a spare disk to |
180 | its original disk. | | 180 | its original disk. |
181 | This is performed after a component has failed, | | 181 | This is performed after a component has failed, |
182 | and the failed drive has been reconstructed onto a spare drive. | | 182 | and the failed drive has been reconstructed onto a spare drive. |
183 | .It Fl c Ar config_file Ar dev | | 183 | .It Fl c Ar config_file Ar dev |
184 | Configure the RAIDframe device | | 184 | Configure the RAIDframe device |
185 | .Ar dev | | 185 | .Ar dev |
186 | according to the configuration given in | | 186 | according to the configuration given in |
187 | .Ar config_file . | | 187 | .Ar config_file . |
188 | A description of the contents of | | 188 | A description of the contents of |
189 | .Ar config_file | | 189 | .Ar config_file |
190 | is given later. | | 190 | is given later. |
191 | .It Fl C Ar config_file Ar dev | | 191 | .It Fl C Ar config_file Ar dev |
192 | As for | | 192 | As for |
193 | .Fl c , | | 193 | .Fl c , |
194 | but forces the configuration to take place. | | 194 | but forces the configuration to take place. |
195 | Fatal errors due to uninitialized components are ignored. | | 195 | Fatal errors due to uninitialized components are ignored. |
196 | This is required the first time a RAID set is configured. | | 196 | This is required the first time a RAID set is configured. |
197 | .It Fl f Ar component Ar dev | | 197 | .It Fl f Ar component Ar dev |
198 | This marks the specified | | 198 | This marks the specified |
199 | .Ar component | | 199 | .Ar component |
200 | as having failed, but does not initiate a reconstruction of that component. | | 200 | as having failed, but does not initiate a reconstruction of that component. |
201 | .It Fl F Ar component Ar dev | | 201 | .It Fl F Ar component Ar dev |
202 | Fails the specified | | 202 | Fails the specified |
203 | .Ar component | | 203 | .Ar component |
204 | of the device, and immediately begin a reconstruction of the failed | | 204 | of the device, and immediately begin a reconstruction of the failed |
205 | disk onto an available hot spare. | | 205 | disk onto an available hot spare. |
206 | This is one of the mechanisms used to start | | 206 | This is one of the mechanisms used to start |
207 | the reconstruction process if a component does have a hardware failure. | | 207 | the reconstruction process if a component does have a hardware failure. |
208 | .It Fl g Ar component Ar dev | | 208 | .It Fl g Ar component Ar dev |
209 | Get the component label for the specified component. | | 209 | Get the component label for the specified component. |
210 | .It Fl G Ar dev | | 210 | .It Fl G Ar dev |
211 | Generate the configuration of the RAIDframe device in a format suitable for | | 211 | Generate the configuration of the RAIDframe device in a format suitable for |
212 | use with the | | 212 | use with the |
213 | .Fl c | | 213 | .Fl c |
214 | or | | 214 | or |
215 | .Fl C | | 215 | .Fl C |
216 | options. | | 216 | options. |
217 | .It Fl i Ar dev | | 217 | .It Fl i Ar dev |
218 | Initialize the RAID device. | | 218 | Initialize the RAID device. |
219 | In particular, (re-)write the parity on the selected device. | | 219 | In particular, (re-)write the parity on the selected device. |
220 | This | | 220 | This |
221 | .Em MUST | | 221 | .Em MUST |
222 | be done for | | 222 | be done for |
223 | .Em all | | 223 | .Em all |
224 | RAID sets before the RAID device is labeled and before | | 224 | RAID sets before the RAID device is labeled and before |
225 | file systems are created on the RAID device. | | 225 | file systems are created on the RAID device. |
226 | .It Fl I Ar serial_number Ar dev | | 226 | .It Fl I Ar serial_number Ar dev |
227 | Initialize the component labels on each component of the device. | | 227 | Initialize the component labels on each component of the device. |
228 | .Ar serial_number | | 228 | .Ar serial_number |
229 | is used as one of the keys in determining whether a | | 229 | is used as one of the keys in determining whether a |
230 | particular set of components belong to the same RAID set. | | 230 | particular set of components belong to the same RAID set. |
231 | While not strictly enforced, different serial numbers should be used for | | 231 | While not strictly enforced, different serial numbers should be used for |
232 | different RAID sets. | | 232 | different RAID sets. |
233 | This step | | 233 | This step |
234 | .Em MUST | | 234 | .Em MUST |
235 | be performed when a new RAID set is created. | | 235 | be performed when a new RAID set is created. |
236 | .It Fl m Ar dev | | 236 | .It Fl m Ar dev |
237 | Display status information about the parity map on the RAID set, if any. | | 237 | Display status information about the parity map on the RAID set, if any. |
238 | If used with | | 238 | If used with |
239 | .Fl v | | 239 | .Fl v |
240 | then the current contents of the parity map will be output (in | | 240 | then the current contents of the parity map will be output (in |
241 | hexadecimal format) as well. | | 241 | hexadecimal format) as well. |
242 | .It Fl M Ic yes Ar dev | | 242 | .It Fl M Ic yes Ar dev |
243 | .\"XXX should there be a section with more info on the parity map feature? | | 243 | .\"XXX should there be a section with more info on the parity map feature? |
244 | Enable the use of a parity map on the RAID set; this is the default, | | 244 | Enable the use of a parity map on the RAID set; this is the default, |
245 | and greatly reduces the time taken to check parity after unclean | | 245 | and greatly reduces the time taken to check parity after unclean |
246 | shutdowns at the cost of some very slight overhead during normal | | 246 | shutdowns at the cost of some very slight overhead during normal |
247 | operation. | | 247 | operation. |
248 | Changes to this setting will take effect the next time the set is | | 248 | Changes to this setting will take effect the next time the set is |
249 | configured. | | 249 | configured. |
250 | Note that RAID-0 sets, having no parity, will not use a parity map in | | 250 | Note that RAID-0 sets, having no parity, will not use a parity map in |
251 | any case. | | 251 | any case. |
252 | .It Fl M Ic no Ar dev | | 252 | .It Fl M Ic no Ar dev |
253 | Disable the use of a parity map on the RAID set; doing this is not | | 253 | Disable the use of a parity map on the RAID set; doing this is not |
254 | recommended. | | 254 | recommended. |
255 | This will take effect the next time the set is configured. | | 255 | This will take effect the next time the set is configured. |
256 | .It Fl M Ic set Ar cooldown Ar tickms Ar regions Ar dev | | 256 | .It Fl M Ic set Ar cooldown Ar tickms Ar regions Ar dev |
257 | Alter the parameters of the parity map; parameters to leave unchanged | | 257 | Alter the parameters of the parity map; parameters to leave unchanged |
258 | can be given as 0, and trailing zeroes may be omitted. | | 258 | can be given as 0, and trailing zeroes may be omitted. |
259 | .\"XXX should this explanation be deferred to another section as well? | | 259 | .\"XXX should this explanation be deferred to another section as well? |
260 | The RAID set is divided into | | 260 | The RAID set is divided into |
261 | .Ar regions | | 261 | .Ar regions |
262 | regions; each region is marked dirty for at most | | 262 | regions; each region is marked dirty for at most |
263 | .Ar cooldown | | 263 | .Ar cooldown |
264 | intervals of | | 264 | intervals of |
265 | .Ar tickms | | 265 | .Ar tickms |
266 | milliseconds each after a write to it, and at least | | 266 | milliseconds each after a write to it, and at least |
267 | .Ar cooldown | | 267 | .Ar cooldown |
268 | \- 1 such intervals. | | 268 | \- 1 such intervals. |
269 | Changes to | | 269 | Changes to |
270 | .Ar regions | | 270 | .Ar regions |
271 | take effect the next time is configured, while changes to the other | | 271 | take effect the next time is configured, while changes to the other |
272 | parameters are applied immediately. | | 272 | parameters are applied immediately. |
273 | The default parameters are expected to be reasonable for most workloads. | | 273 | The default parameters are expected to be reasonable for most workloads. |
274 | .It Fl p Ar dev | | 274 | .It Fl p Ar dev |
275 | Check the status of the parity on the RAID set. | | 275 | Check the status of the parity on the RAID set. |
276 | Displays a status message, | | 276 | Displays a status message, |
277 | and returns successfully if the parity is up-to-date. | | 277 | and returns successfully if the parity is up-to-date. |
278 | .It Fl P Ar dev | | 278 | .It Fl P Ar dev |
279 | Check the status of the parity on the RAID set, and initialize | | 279 | Check the status of the parity on the RAID set, and initialize |
280 | (re-write) the parity if the parity is not known to be up-to-date. | | 280 | (re-write) the parity if the parity is not known to be up-to-date. |
281 | This is normally used after a system crash (and before a | | 281 | This is normally used after a system crash (and before a |
282 | .Xr fsck 8 ) | | 282 | .Xr fsck 8 ) |
283 | to ensure the integrity of the parity. | | 283 | to ensure the integrity of the parity. |
284 | .It Fl r Ar component Ar dev | | 284 | .It Fl r Ar component Ar dev |
285 | Remove the spare disk specified by | | 285 | Remove the spare disk specified by |
286 | .Ar component | | 286 | .Ar component |
287 | from the set of available spare components. | | 287 | from the set of available spare components. |
288 | .It Fl R Ar component Ar dev | | 288 | .It Fl R Ar component Ar dev |
289 | Fails the specified | | 289 | Fails the specified |
290 | .Ar component , | | 290 | .Ar component , |
291 | if necessary, and immediately begins a reconstruction back to | | 291 | if necessary, and immediately begins a reconstruction back to |
292 | .Ar component . | | 292 | .Ar component . |
293 | This is useful for reconstructing back onto a component after | | 293 | This is useful for reconstructing back onto a component after |
294 | it has been replaced following a failure. | | 294 | it has been replaced following a failure. |
295 | .It Fl s Ar dev | | 295 | .It Fl s Ar dev |
296 | Display the status of the RAIDframe device for each of the components | | 296 | Display the status of the RAIDframe device for each of the components |
297 | and spares. | | 297 | and spares. |
298 | .It Fl S Ar dev | | 298 | .It Fl S Ar dev |
299 | Check the status of parity re-writing, component reconstruction, and | | 299 | Check the status of parity re-writing, component reconstruction, and |
300 | component copyback. | | 300 | component copyback. |
301 | The output indicates the amount of progress | | 301 | The output indicates the amount of progress |
302 | achieved in each of these areas. | | 302 | achieved in each of these areas. |
303 | .It Fl u Ar dev | | 303 | .It Fl u Ar dev |
304 | Unconfigure the RAIDframe device. | | 304 | Unconfigure the RAIDframe device. |
305 | This does not remove any component labels or change any configuration | | 305 | This does not remove any component labels or change any configuration |
306 | settings (e.g. auto-configuration settings) for the RAID set. | | 306 | settings (e.g. auto-configuration settings) for the RAID set. |
307 | .It Fl v | | 307 | .It Fl v |
308 | Be more verbose. | | 308 | Be more verbose. |
309 | For operations such as reconstructions, parity | | 309 | For operations such as reconstructions, parity |
310 | re-writing, and copybacks, provide a progress indicator. | | 310 | re-writing, and copybacks, provide a progress indicator. |
311 | .El | | 311 | .El |
312 | .Pp | | 312 | .Pp |
313 | The device used by | | 313 | The device used by |
314 | .Nm | | 314 | .Nm |
315 | is specified by | | 315 | is specified by |
316 | .Ar dev . | | 316 | .Ar dev . |
317 | .Ar dev | | 317 | .Ar dev |
318 | may be either the full name of the device, e.g., | | 318 | may be either the full name of the device, e.g., |
319 | .Pa /dev/rraid0d , | | 319 | .Pa /dev/rraid0d , |
320 | for the i386 architecture, or | | 320 | for the i386 architecture, or |
321 | .Pa /dev/rraid0c | | 321 | .Pa /dev/rraid0c |
322 | for many others, or just simply | | 322 | for many others, or just simply |
323 | .Pa raid0 | | 323 | .Pa raid0 |
324 | (for | | 324 | (for |
325 | .Pa /dev/rraid0[cd] ) . | | 325 | .Pa /dev/rraid0[cd] ) . |
326 | It is recommended that the partitions used to represent the | | 326 | It is recommended that the partitions used to represent the |
327 | RAID device are not used for file systems. | | 327 | RAID device are not used for file systems. |
328 | .Ss Configuration file | | 328 | .Ss Configuration file |
329 | The format of the configuration file is complex, and | | 329 | The format of the configuration file is complex, and |
330 | only an abbreviated treatment is given here. | | 330 | only an abbreviated treatment is given here. |
331 | In the configuration files, a | | 331 | In the configuration files, a |
332 | .Sq # | | 332 | .Sq # |
333 | indicates the beginning of a comment. | | 333 | indicates the beginning of a comment. |
334 | .Pp | | 334 | .Pp |
335 | There are 4 required sections of a configuration file, and 2 | | 335 | There are 4 required sections of a configuration file, and 2 |
336 | optional sections. | | 336 | optional sections. |
337 | Each section begins with a | | 337 | Each section begins with a |
338 | .Sq START , | | 338 | .Sq START , |
339 | followed by the section name, | | 339 | followed by the section name, |
340 | and the configuration parameters associated with that section. | | 340 | and the configuration parameters associated with that section. |
341 | The first section is the | | 341 | The first section is the |
342 | .Sq array | | 342 | .Sq array |
343 | section, and it specifies | | 343 | section, and it specifies |
344 | the number of rows, columns, and spare disks in the RAID set. | | 344 | the number of rows, columns, and spare disks in the RAID set. |
345 | For example: | | 345 | For example: |
346 | .Bd -literal -offset indent | | 346 | .Bd -literal -offset indent |
347 | START array | | 347 | START array |
348 | 1 3 0 | | 348 | 1 3 0 |
349 | .Ed | | 349 | .Ed |
350 | .Pp | | 350 | .Pp |
351 | indicates an array with 1 row, 3 columns, and 0 spare disks. | | 351 | indicates an array with 1 row, 3 columns, and 0 spare disks. |
352 | Note that although multi-dimensional arrays may be specified, they are | | 352 | Note that although multi-dimensional arrays may be specified, they are |
353 | .Em NOT | | 353 | .Em NOT |
354 | supported in the driver. | | 354 | supported in the driver. |
355 | .Pp | | 355 | .Pp |
356 | The second section, the | | 356 | The second section, the |
357 | .Sq disks | | 357 | .Sq disks |
358 | section, specifies the actual components of the device. | | 358 | section, specifies the actual components of the device. |
359 | For example: | | 359 | For example: |
360 | .Bd -literal -offset indent | | 360 | .Bd -literal -offset indent |
361 | START disks | | 361 | START disks |
362 | /dev/sd0e | | 362 | /dev/sd0e |
363 | /dev/sd1e | | 363 | /dev/sd1e |
364 | /dev/sd2e | | 364 | /dev/sd2e |
365 | .Ed | | 365 | .Ed |
366 | .Pp | | 366 | .Pp |
367 | specifies the three component disks to be used in the RAID device. | | 367 | specifies the three component disks to be used in the RAID device. |
368 | If any of the specified drives cannot be found when the RAID device is | | 368 | If any of the specified drives cannot be found when the RAID device is |
369 | configured, then they will be marked as | | 369 | configured, then they will be marked as |
370 | .Sq failed , | | 370 | .Sq failed , |
371 | and the system will operate in degraded mode. | | 371 | and the system will operate in degraded mode. |
372 | Note that it is | | 372 | Note that it is |
373 | .Em imperative | | 373 | .Em imperative |
374 | that the order of the components in the configuration file does not | | 374 | that the order of the components in the configuration file does not |
375 | change between configurations of a RAID device. | | 375 | change between configurations of a RAID device. |
376 | Changing the order of the components will result in data loss | | 376 | Changing the order of the components will result in data loss |
377 | if the set is configured with the | | 377 | if the set is configured with the |
378 | .Fl C | | 378 | .Fl C |
379 | option. | | 379 | option. |
380 | In normal circumstances, the RAID set will not configure if only | | 380 | In normal circumstances, the RAID set will not configure if only |
381 | .Fl c | | 381 | .Fl c |
382 | is specified, and the components are out-of-order. | | 382 | is specified, and the components are out-of-order. |
383 | .Pp | | 383 | .Pp |
384 | The next section, which is the | | 384 | The next section, which is the |
385 | .Sq spare | | 385 | .Sq spare |
386 | section, is optional, and, if present, specifies the devices to be used as | | 386 | section, is optional, and, if present, specifies the devices to be used as |
387 | .Sq hot spares | | 387 | .Sq hot spares |
388 | \(em devices which are on-line, | | 388 | \(em devices which are on-line, |
389 | but are not actively used by the RAID driver unless | | 389 | but are not actively used by the RAID driver unless |
390 | one of the main components fail. | | 390 | one of the main components fail. |
391 | A simple | | 391 | A simple |
392 | .Sq spare | | 392 | .Sq spare |
393 | section might be: | | 393 | section might be: |
394 | .Bd -literal -offset indent | | 394 | .Bd -literal -offset indent |
395 | START spare | | 395 | START spare |
396 | /dev/sd3e | | 396 | /dev/sd3e |
397 | .Ed | | 397 | .Ed |
398 | .Pp | | 398 | .Pp |
399 | for a configuration with a single spare component. | | 399 | for a configuration with a single spare component. |
400 | If no spare drives are to be used in the configuration, then the | | 400 | If no spare drives are to be used in the configuration, then the |
401 | .Sq spare | | 401 | .Sq spare |
402 | section may be omitted. | | 402 | section may be omitted. |
403 | .Pp | | 403 | .Pp |
404 | The next section is the | | 404 | The next section is the |
405 | .Sq layout | | 405 | .Sq layout |
406 | section. | | 406 | section. |
407 | This section describes the general layout parameters for the RAID device, | | 407 | This section describes the general layout parameters for the RAID device, |
408 | and provides such information as | | 408 | and provides such information as |
409 | sectors per stripe unit, | | 409 | sectors per stripe unit, |
410 | stripe units per parity unit, | | 410 | stripe units per parity unit, |
411 | stripe units per reconstruction unit, | | 411 | stripe units per reconstruction unit, |
412 | and the parity configuration to use. | | 412 | and the parity configuration to use. |
413 | This section might look like: | | 413 | This section might look like: |
414 | .Bd -literal -offset indent | | 414 | .Bd -literal -offset indent |
415 | START layout | | 415 | START layout |
416 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level | | 416 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level |
417 | 32 1 1 5 | | 417 | 32 1 1 5 |
418 | .Ed | | 418 | .Ed |
419 | .Pp | | 419 | .Pp |
420 | The sectors per stripe unit specifies, in blocks, the interleave | | 420 | The sectors per stripe unit specifies, in blocks, the interleave |
421 | factor; i.e., the number of contiguous sectors to be written to each | | 421 | factor; i.e., the number of contiguous sectors to be written to each |
422 | component for a single stripe. | | 422 | component for a single stripe. |
423 | Appropriate selection of this value (32 in this example) | | 423 | Appropriate selection of this value (32 in this example) |
424 | is the subject of much research in RAID architectures. | | 424 | is the subject of much research in RAID architectures. |
425 | The stripe units per parity unit and | | 425 | The stripe units per parity unit and |
426 | stripe units per reconstruction unit are normally each set to 1. | | 426 | stripe units per reconstruction unit are normally each set to 1. |
427 | While certain values above 1 are permitted, a discussion of valid | | 427 | While certain values above 1 are permitted, a discussion of valid |
428 | values and the consequences of using anything other than 1 are outside | | 428 | values and the consequences of using anything other than 1 are outside |
429 | the scope of this document. | | 429 | the scope of this document. |
430 | The last value in this section (5 in this example) | | 430 | The last value in this section (5 in this example) |
431 | indicates the parity configuration desired. | | 431 | indicates the parity configuration desired. |
432 | Valid entries include: | | 432 | Valid entries include: |
433 | .Bl -tag -width inde | | 433 | .Bl -tag -width inde |
434 | .It 0 | | 434 | .It 0 |
435 | RAID level 0. | | 435 | RAID level 0. |
436 | No parity, only simple striping. | | 436 | No parity, only simple striping. |
437 | .It 1 | | 437 | .It 1 |
438 | RAID level 1. | | 438 | RAID level 1. |
439 | Mirroring. | | 439 | Mirroring. |
440 | The parity is the mirror. | | 440 | The parity is the mirror. |
441 | .It 4 | | 441 | .It 4 |
442 | RAID level 4. | | 442 | RAID level 4. |
443 | Striping across components, with parity stored on the last component. | | 443 | Striping across components, with parity stored on the last component. |
444 | .It 5 | | 444 | .It 5 |
445 | RAID level 5. | | 445 | RAID level 5. |
446 | Striping across components, parity distributed across all components. | | 446 | Striping across components, parity distributed across all components. |
447 | .El | | 447 | .El |
448 | .Pp | | 448 | .Pp |
449 | There are other valid entries here, including those for Even-Odd | | 449 | There are other valid entries here, including those for Even-Odd |
450 | parity, RAID level 5 with rotated sparing, Chained declustering, | | 450 | parity, RAID level 5 with rotated sparing, Chained declustering, |
451 | and Interleaved declustering, but as of this writing the code for | | 451 | and Interleaved declustering, but as of this writing the code for |
452 | those parity operations has not been tested with | | 452 | those parity operations has not been tested with |
453 | .Nx . | | 453 | .Nx . |
454 | .Pp | | 454 | .Pp |
455 | The next required section is the | | 455 | The next required section is the |
456 | .Sq queue | | 456 | .Sq queue |
457 | section. | | 457 | section. |
458 | This is most often specified as: | | 458 | This is most often specified as: |
459 | .Bd -literal -offset indent | | 459 | .Bd -literal -offset indent |
460 | START queue | | 460 | START queue |
461 | fifo 100 | | 461 | fifo 100 |
462 | .Ed | | 462 | .Ed |
463 | .Pp | | 463 | .Pp |
464 | where the queuing method is specified as fifo (first-in, first-out), | | 464 | where the queuing method is specified as fifo (first-in, first-out), |
465 | and the size of the per-component queue is limited to 100 requests. | | 465 | and the size of the per-component queue is limited to 100 requests. |
466 | Other queuing methods may also be specified, but a discussion of them | | 466 | Other queuing methods may also be specified, but a discussion of them |
467 | is beyond the scope of this document. | | 467 | is beyond the scope of this document. |
468 | .Pp | | 468 | .Pp |
469 | The final section, the | | 469 | The final section, the |
470 | .Sq debug | | 470 | .Sq debug |
471 | section, is optional. | | 471 | section, is optional. |
472 | For more details on this the reader is referred to | | 472 | For more details on this the reader is referred to |
473 | the RAIDframe documentation discussed in the | | 473 | the RAIDframe documentation discussed in the |
474 | .Sx HISTORY | | 474 | .Sx HISTORY |
475 | section. | | 475 | section. |
476 | .Pp | | 476 | .Pp |
477 | See | | 477 | See |
478 | .Sx EXAMPLES | | 478 | .Sx EXAMPLES |
479 | for a more complete configuration file example. | | 479 | for a more complete configuration file example. |
480 | .Sh FILES | | 480 | .Sh FILES |
481 | .Bl -tag -width /dev/XXrXraidX -compact | | 481 | .Bl -tag -width /dev/XXrXraidX -compact |
482 | .It Pa /dev/{,r}raid* | | 482 | .It Pa /dev/{,r}raid* |
483 | .Cm raid | | 483 | .Cm raid |
484 | device special files. | | 484 | device special files. |
485 | .El | | 485 | .El |
486 | .Sh EXAMPLES | | 486 | .Sh EXAMPLES |
487 | It is highly recommended that before using the RAID driver for real | | 487 | It is highly recommended that before using the RAID driver for real |
488 | file systems that the system administrator(s) become quite familiar | | 488 | file systems that the system administrator(s) become quite familiar |
489 | with the use of | | 489 | with the use of |
490 | .Nm , | | 490 | .Nm , |
491 | and that they understand how the component reconstruction process works. | | 491 | and that they understand how the component reconstruction process works. |
492 | The examples in this section will focus on configuring a | | 492 | The examples in this section will focus on configuring a |
493 | number of different RAID sets of varying degrees of redundancy. | | 493 | number of different RAID sets of varying degrees of redundancy. |
494 | By working through these examples, administrators should be able to | | 494 | By working through these examples, administrators should be able to |
495 | develop a good feel for how to configure a RAID set, and how to | | 495 | develop a good feel for how to configure a RAID set, and how to |
496 | initiate reconstruction of failed components. | | 496 | initiate reconstruction of failed components. |
497 | .Pp | | 497 | .Pp |
498 | In the following examples | | 498 | In the following examples |
499 | .Sq raid0 | | 499 | .Sq raid0 |
500 | will be used to denote the RAID device. | | 500 | will be used to denote the RAID device. |
501 | Depending on the architecture, | | 501 | Depending on the architecture, |
502 | .Pa /dev/rraid0c | | 502 | .Pa /dev/rraid0c |
503 | or | | 503 | or |
504 | .Pa /dev/rraid0d | | 504 | .Pa /dev/rraid0d |
505 | may be used in place of | | 505 | may be used in place of |
506 | .Pa raid0 . | | 506 | .Pa raid0 . |
507 | .Ss Initialization and Configuration | | 507 | .Ss Initialization and Configuration |
508 | The initial step in configuring a RAID set is to identify the components | | 508 | The initial step in configuring a RAID set is to identify the components |
509 | that will be used in the RAID set. | | 509 | that will be used in the RAID set. |
510 | All components should be the same size. | | 510 | All components should be the same size. |
511 | Each component should have a disklabel type of | | 511 | Each component should have a disklabel type of |
512 | .Dv FS_RAID , | | 512 | .Dv FS_RAID , |
513 | and a typical disklabel entry for a RAID component might look like: | | 513 | and a typical disklabel entry for a RAID component might look like: |
514 | .Bd -literal -offset indent | | 514 | .Bd -literal -offset indent |
515 | f: 1800000 200495 RAID # (Cyl. 405*- 4041*) | | 515 | f: 1800000 200495 RAID # (Cyl. 405*- 4041*) |
516 | .Ed | | 516 | .Ed |
517 | .Pp | | 517 | .Pp |
518 | While | | 518 | While |
519 | .Dv FS_BSDFFS | | 519 | .Dv FS_BSDFFS |
520 | will also work as the component type, the type | | 520 | will also work as the component type, the type |
521 | .Dv FS_RAID | | 521 | .Dv FS_RAID |
522 | is preferred for RAIDframe use, as it is required for features such as | | 522 | is preferred for RAIDframe use, as it is required for features such as |
523 | auto-configuration. | | 523 | auto-configuration. |
524 | As part of the initial configuration of each RAID set, | | 524 | As part of the initial configuration of each RAID set, |
525 | each component will be given a | | 525 | each component will be given a |
526 | .Sq component label . | | 526 | .Sq component label . |
527 | A | | 527 | A |
528 | .Sq component label | | 528 | .Sq component label |
529 | contains important information about the component, including a | | 529 | contains important information about the component, including a |
530 | user-specified serial number, the row and column of that component in | | 530 | user-specified serial number, the row and column of that component in |
531 | the RAID set, the redundancy level of the RAID set, a | | 531 | the RAID set, the redundancy level of the RAID set, a |
532 | .Sq modification counter , | | 532 | .Sq modification counter , |
533 | and whether the parity information (if any) on that | | 533 | and whether the parity information (if any) on that |
534 | component is known to be correct. | | 534 | component is known to be correct. |
535 | Component labels are an integral part of the RAID set, | | 535 | Component labels are an integral part of the RAID set, |
536 | since they are used to ensure that components | | 536 | since they are used to ensure that components |
537 | are configured in the correct order, and used to keep track of other | | 537 | are configured in the correct order, and used to keep track of other |
538 | vital information about the RAID set. | | 538 | vital information about the RAID set. |
539 | Component labels are also required for the auto-detection | | 539 | Component labels are also required for the auto-detection |
540 | and auto-configuration of RAID sets at boot time. | | 540 | and auto-configuration of RAID sets at boot time. |
541 | For a component label to be considered valid, that | | 541 | For a component label to be considered valid, that |
542 | particular component label must be in agreement with the other | | 542 | particular component label must be in agreement with the other |
543 | component labels in the set. | | 543 | component labels in the set. |
544 | For example, the serial number, | | 544 | For example, the serial number, |
545 | .Sq modification counter , | | 545 | .Sq modification counter , |
546 | number of rows and number of columns must all be in agreement. | | 546 | number of rows and number of columns must all be in agreement. |
547 | If any of these are different, then the component is | | 547 | If any of these are different, then the component is |
548 | not considered to be part of the set. | | 548 | not considered to be part of the set. |
549 | See | | 549 | See |
550 | .Xr raid 4 | | 550 | .Xr raid 4 |
551 | for more information about component labels. | | 551 | for more information about component labels. |
552 | .Pp | | 552 | .Pp |
553 | Once the components have been identified, and the disks have | | 553 | Once the components have been identified, and the disks have |
554 | appropriate labels, | | 554 | appropriate labels, |
555 | .Nm | | 555 | .Nm |
556 | is then used to configure the | | 556 | is then used to configure the |
557 | .Xr raid 4 | | 557 | .Xr raid 4 |
558 | device. | | 558 | device. |
559 | To configure the device, a configuration file which looks something like: | | 559 | To configure the device, a configuration file which looks something like: |
560 | .Bd -literal -offset indent | | 560 | .Bd -literal -offset indent |
561 | START array | | 561 | START array |
562 | # numRow numCol numSpare | | 562 | # numRow numCol numSpare |
563 | 1 3 1 | | 563 | 1 3 1 |
564 | | | 564 | |
565 | START disks | | 565 | START disks |
566 | /dev/sd1e | | 566 | /dev/sd1e |
567 | /dev/sd2e | | 567 | /dev/sd2e |
568 | /dev/sd3e | | 568 | /dev/sd3e |
569 | | | 569 | |
570 | START spare | | 570 | START spare |
571 | /dev/sd4e | | 571 | /dev/sd4e |
572 | | | 572 | |
573 | START layout | | 573 | START layout |
574 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_5 | | 574 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_5 |
575 | 32 1 1 5 | | 575 | 32 1 1 5 |
576 | | | 576 | |
577 | START queue | | 577 | START queue |
578 | fifo 100 | | 578 | fifo 100 |
579 | .Ed | | 579 | .Ed |
580 | .Pp | | 580 | .Pp |
581 | is created in a file. | | 581 | is created in a file. |
582 | The above configuration file specifies a RAID 5 | | 582 | The above configuration file specifies a RAID 5 |
583 | set consisting of the components | | 583 | set consisting of the components |
584 | .Pa /dev/sd1e , | | 584 | .Pa /dev/sd1e , |
585 | .Pa /dev/sd2e , | | 585 | .Pa /dev/sd2e , |
586 | and | | 586 | and |
587 | .Pa /dev/sd3e , | | 587 | .Pa /dev/sd3e , |
588 | with | | 588 | with |
589 | .Pa /dev/sd4e | | 589 | .Pa /dev/sd4e |
590 | available as a | | 590 | available as a |
591 | .Sq hot spare | | 591 | .Sq hot spare |
592 | in case one of the three main drives should fail. | | 592 | in case one of the three main drives should fail. |
593 | A RAID 0 set would be specified in a similar way: | | 593 | A RAID 0 set would be specified in a similar way: |
594 | .Bd -literal -offset indent | | 594 | .Bd -literal -offset indent |
595 | START array | | 595 | START array |
596 | # numRow numCol numSpare | | 596 | # numRow numCol numSpare |
597 | 1 4 0 | | 597 | 1 4 0 |
598 | | | 598 | |
599 | START disks | | 599 | START disks |
600 | /dev/sd10e | | 600 | /dev/sd10e |
601 | /dev/sd11e | | 601 | /dev/sd11e |
602 | /dev/sd12e | | 602 | /dev/sd12e |
603 | /dev/sd13e | | 603 | /dev/sd13e |
604 | | | 604 | |
605 | START layout | | 605 | START layout |
606 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_0 | | 606 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_0 |
607 | 64 1 1 0 | | 607 | 64 1 1 0 |
608 | | | 608 | |
609 | START queue | | 609 | START queue |
610 | fifo 100 | | 610 | fifo 100 |
611 | .Ed | | 611 | .Ed |
612 | .Pp | | 612 | .Pp |
613 | In this case, devices | | 613 | In this case, devices |
614 | .Pa /dev/sd10e , | | 614 | .Pa /dev/sd10e , |
615 | .Pa /dev/sd11e , | | 615 | .Pa /dev/sd11e , |
616 | .Pa /dev/sd12e , | | 616 | .Pa /dev/sd12e , |
617 | and | | 617 | and |
618 | .Pa /dev/sd13e | | 618 | .Pa /dev/sd13e |
619 | are the components that make up this RAID set. | | 619 | are the components that make up this RAID set. |
620 | Note that there are no hot spares for a RAID 0 set, | | 620 | Note that there are no hot spares for a RAID 0 set, |
621 | since there is no way to recover data if any of the components fail. | | 621 | since there is no way to recover data if any of the components fail. |
622 | .Pp | | 622 | .Pp |
623 | For a RAID 1 (mirror) set, the following configuration might be used: | | 623 | For a RAID 1 (mirror) set, the following configuration might be used: |
624 | .Bd -literal -offset indent | | 624 | .Bd -literal -offset indent |
625 | START array | | 625 | START array |
626 | # numRow numCol numSpare | | 626 | # numRow numCol numSpare |
627 | 1 2 0 | | 627 | 1 2 0 |
628 | | | 628 | |
629 | START disks | | 629 | START disks |
630 | /dev/sd20e | | 630 | /dev/sd20e |
631 | /dev/sd21e | | 631 | /dev/sd21e |
632 | | | 632 | |
633 | START layout | | 633 | START layout |
634 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1 | | 634 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1 |
635 | 128 1 1 1 | | 635 | 128 1 1 1 |
636 | | | 636 | |
637 | START queue | | 637 | START queue |
638 | fifo 100 | | 638 | fifo 100 |
639 | .Ed | | 639 | .Ed |
640 | .Pp | | 640 | .Pp |
641 | In this case, | | 641 | In this case, |
642 | .Pa /dev/sd20e | | 642 | .Pa /dev/sd20e |
643 | and | | 643 | and |
644 | .Pa /dev/sd21e | | 644 | .Pa /dev/sd21e |
645 | are the two components of the mirror set. | | 645 | are the two components of the mirror set. |
646 | While no hot spares have been specified in this | | 646 | While no hot spares have been specified in this |
647 | configuration, they easily could be, just as they were specified in | | 647 | configuration, they easily could be, just as they were specified in |
648 | the RAID 5 case above. | | 648 | the RAID 5 case above. |
649 | Note as well that RAID 1 sets are currently limited to only 2 components. | | 649 | Note as well that RAID 1 sets are currently limited to only 2 components. |
650 | At present, n-way mirroring is not possible. | | 650 | At present, n-way mirroring is not possible. |
651 | .Pp | | 651 | .Pp |
652 | The first time a RAID set is configured, the | | 652 | The first time a RAID set is configured, the |
653 | .Fl C | | 653 | .Fl C |
654 | option must be used: | | 654 | option must be used: |
655 | .Bd -literal -offset indent | | 655 | .Bd -literal -offset indent |
656 | raidctl -C raid0.conf raid0 | | 656 | raidctl -C raid0.conf raid0 |
657 | .Ed | | 657 | .Ed |
658 | .Pp | | 658 | .Pp |
659 | where | | 659 | where |
660 | .Pa raid0.conf | | 660 | .Pa raid0.conf |
661 | is the name of the RAID configuration file. | | 661 | is the name of the RAID configuration file. |
662 | The | | 662 | The |
663 | .Fl C | | 663 | .Fl C |
664 | forces the configuration to succeed, even if any of the component | | 664 | forces the configuration to succeed, even if any of the component |
665 | labels are incorrect. | | 665 | labels are incorrect. |
666 | The | | 666 | The |
667 | .Fl C | | 667 | .Fl C |
668 | option should not be used lightly in | | 668 | option should not be used lightly in |
669 | situations other than initial configurations, as if | | 669 | situations other than initial configurations, as if |
670 | the system is refusing to configure a RAID set, there is probably a | | 670 | the system is refusing to configure a RAID set, there is probably a |
671 | very good reason for it. | | 671 | very good reason for it. |
672 | After the initial configuration is done (and | | 672 | After the initial configuration is done (and |
673 | appropriate component labels are added with the | | 673 | appropriate component labels are added with the |
674 | .Fl I | | 674 | .Fl I |
675 | option) then raid0 can be configured normally with: | | 675 | option) then raid0 can be configured normally with: |
676 | .Bd -literal -offset indent | | 676 | .Bd -literal -offset indent |
677 | raidctl -c raid0.conf raid0 | | 677 | raidctl -c raid0.conf raid0 |
678 | .Ed | | 678 | .Ed |
679 | .Pp | | 679 | .Pp |
680 | When the RAID set is configured for the first time, it is | | 680 | When the RAID set is configured for the first time, it is |
681 | necessary to initialize the component labels, and to initialize the | | 681 | necessary to initialize the component labels, and to initialize the |
682 | parity on the RAID set. | | 682 | parity on the RAID set. |
683 | Initializing the component labels is done with: | | 683 | Initializing the component labels is done with: |
684 | .Bd -literal -offset indent | | 684 | .Bd -literal -offset indent |
685 | raidctl -I 112341 raid0 | | 685 | raidctl -I 112341 raid0 |
686 | .Ed | | 686 | .Ed |
687 | .Pp | | 687 | .Pp |
688 | where | | 688 | where |
689 | .Sq 112341 | | 689 | .Sq 112341 |
690 | is a user-specified serial number for the RAID set. | | 690 | is a user-specified serial number for the RAID set. |
691 | This initialization step is | | 691 | This initialization step is |
692 | .Em required | | 692 | .Em required |
693 | for all RAID sets. | | 693 | for all RAID sets. |
694 | As well, using different serial numbers between RAID sets is | | 694 | As well, using different serial numbers between RAID sets is |
695 | .Em strongly encouraged , | | 695 | .Em strongly encouraged , |
696 | as using the same serial number for all RAID sets will only serve to | | 696 | as using the same serial number for all RAID sets will only serve to |
697 | decrease the usefulness of the component label checking. | | 697 | decrease the usefulness of the component label checking. |
698 | .Pp | | 698 | .Pp |
699 | Initializing the RAID set is done via the | | 699 | Initializing the RAID set is done via the |
700 | .Fl i | | 700 | .Fl i |
701 | option. | | 701 | option. |
702 | This initialization | | 702 | This initialization |
703 | .Em MUST | | 703 | .Em MUST |
704 | be done for | | 704 | be done for |
705 | .Em all | | 705 | .Em all |
706 | RAID sets, since among other things it verifies that the parity (if | | 706 | RAID sets, since among other things it verifies that the parity (if |
707 | any) on the RAID set is correct. | | 707 | any) on the RAID set is correct. |
708 | Since this initialization may be quite time-consuming, the | | 708 | Since this initialization may be quite time-consuming, the |
709 | .Fl v | | 709 | .Fl v |
710 | option may be also used in conjunction with | | 710 | option may be also used in conjunction with |
711 | .Fl i : | | 711 | .Fl i : |
712 | .Bd -literal -offset indent | | 712 | .Bd -literal -offset indent |
713 | raidctl -iv raid0 | | 713 | raidctl -iv raid0 |
714 | .Ed | | 714 | .Ed |
715 | .Pp | | 715 | .Pp |
716 | This will give more verbose output on the | | 716 | This will give more verbose output on the |
717 | status of the initialization: | | 717 | status of the initialization: |
718 | .Bd -literal -offset indent | | 718 | .Bd -literal -offset indent |
719 | Initiating re-write of parity | | 719 | Initiating re-write of parity |
720 | Parity Re-write status: | | 720 | Parity Re-write status: |
721 | 10% |**** | ETA: 06:03 / | | 721 | 10% |**** | ETA: 06:03 / |
722 | .Ed | | 722 | .Ed |
723 | .Pp | | 723 | .Pp |
724 | The output provides a | | 724 | The output provides a |
725 | .Sq Percent Complete | | 725 | .Sq Percent Complete |
726 | in both a numeric and graphical format, as well as an estimated time | | 726 | in both a numeric and graphical format, as well as an estimated time |
727 | to completion of the operation. | | 727 | to completion of the operation. |
728 | .Pp | | 728 | .Pp |
729 | Since it is the parity that provides the | | 729 | Since it is the parity that provides the |
730 | .Sq redundancy | | 730 | .Sq redundancy |
731 | part of RAID, it is critical that the parity is correct as much as possible. | | 731 | part of RAID, it is critical that the parity is correct as much as possible. |
732 | If the parity is not correct, then there is no | | 732 | If the parity is not correct, then there is no |
733 | guarantee that data will not be lost if a component fails. | | 733 | guarantee that data will not be lost if a component fails. |
734 | .Pp | | 734 | .Pp |
735 | Once the parity is known to be correct, it is then safe to perform | | 735 | Once the parity is known to be correct, it is then safe to perform |
736 | .Xr disklabel 8 , | | 736 | .Xr disklabel 8 , |
737 | .Xr newfs 8 , | | 737 | .Xr newfs 8 , |
738 | or | | 738 | or |
739 | .Xr fsck 8 | | 739 | .Xr fsck 8 |
740 | on the device or its file systems, and then to mount the file systems | | 740 | on the device or its file systems, and then to mount the file systems |
741 | for use. | | 741 | for use. |
742 | .Pp | | 742 | .Pp |
743 | Under certain circumstances (e.g., the additional component has not | | 743 | Under certain circumstances (e.g., the additional component has not |
744 | arrived, or data is being migrated off of a disk destined to become a | | 744 | arrived, or data is being migrated off of a disk destined to become a |
745 | component) it may be desirable to configure a RAID 1 set with only | | 745 | component) it may be desirable to configure a RAID 1 set with only |
746 | a single component. | | 746 | a single component. |
747 | This can be achieved by using the word | | 747 | This can be achieved by using the word |
748 | .Dq absent | | 748 | .Dq absent |
749 | to indicate that a particular component is not present. | | 749 | to indicate that a particular component is not present. |
750 | In the following: | | 750 | In the following: |
751 | .Bd -literal -offset indent | | 751 | .Bd -literal -offset indent |
752 | START array | | 752 | START array |
753 | # numRow numCol numSpare | | 753 | # numRow numCol numSpare |
754 | 1 2 0 | | 754 | 1 2 0 |
755 | | | 755 | |
756 | START disks | | 756 | START disks |
757 | absent | | 757 | absent |
758 | /dev/sd0e | | 758 | /dev/sd0e |
759 | | | 759 | |
760 | START layout | | 760 | START layout |
761 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1 | | 761 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1 |
762 | 128 1 1 1 | | 762 | 128 1 1 1 |
763 | | | 763 | |
764 | START queue | | 764 | START queue |
765 | fifo 100 | | 765 | fifo 100 |
766 | .Ed | | 766 | .Ed |
767 | .Pp | | 767 | .Pp |
768 | .Pa /dev/sd0e | | 768 | .Pa /dev/sd0e |
769 | is the real component, and will be the second disk of a RAID 1 set. | | 769 | is the real component, and will be the second disk of a RAID 1 set. |
770 | The first component is simply marked as being absent. | | 770 | The first component is simply marked as being absent. |
771 | Configuration (using | | 771 | Configuration (using |
772 | .Fl C | | 772 | .Fl C |
773 | and | | 773 | and |
774 | .Fl I Ar 12345 | | 774 | .Fl I Ar 12345 |
775 | as above) proceeds normally, but initialization of the RAID set will | | 775 | as above) proceeds normally, but initialization of the RAID set will |
776 | have to wait until all physical components are present. | | 776 | have to wait until all physical components are present. |
777 | After configuration, this set can be used normally, but will be operating | | 777 | After configuration, this set can be used normally, but will be operating |
778 | in degraded mode. | | 778 | in degraded mode. |
779 | Once a second physical component is obtained, it can be hot-added, | | 779 | Once a second physical component is obtained, it can be hot-added, |
780 | the existing data mirrored, and normal operation resumed. | | 780 | the existing data mirrored, and normal operation resumed. |
781 | .Pp | | 781 | .Pp |
782 | The size of the resulting RAID set will depend on the number of data | | 782 | The size of the resulting RAID set will depend on the number of data |
783 | components in the set. | | 783 | components in the set. |
784 | Space is automatically reserved for the component labels, and | | 784 | Space is automatically reserved for the component labels, and |
785 | the actual amount of space used | | 785 | the actual amount of space used |
786 | for data on a component will be rounded down to the largest possible | | 786 | for data on a component will be rounded down to the largest possible |
787 | multiple of the sectors per stripe unit (sectPerSU) value. | | 787 | multiple of the sectors per stripe unit (sectPerSU) value. |
788 | Thus, the amount of space provided by the RAID set will be less | | 788 | Thus, the amount of space provided by the RAID set will be less |
789 | than the sum of the size of the components. | | 789 | than the sum of the size of the components. |
790 | .Ss Maintenance of the RAID set | | 790 | .Ss Maintenance of the RAID set |
791 | After the parity has been initialized for the first time, the command: | | 791 | After the parity has been initialized for the first time, the command: |
792 | .Bd -literal -offset indent | | 792 | .Bd -literal -offset indent |
793 | raidctl -p raid0 | | 793 | raidctl -p raid0 |
794 | .Ed | | 794 | .Ed |
795 | .Pp | | 795 | .Pp |
796 | can be used to check the current status of the parity. | | 796 | can be used to check the current status of the parity. |
797 | To check the parity and rebuild it necessary (for example, | | 797 | To check the parity and rebuild it necessary (for example, |
798 | after an unclean shutdown) the command: | | 798 | after an unclean shutdown) the command: |
799 | .Bd -literal -offset indent | | 799 | .Bd -literal -offset indent |
800 | raidctl -P raid0 | | 800 | raidctl -P raid0 |
801 | .Ed | | 801 | .Ed |
802 | .Pp | | 802 | .Pp |
803 | is used. | | 803 | is used. |
804 | Note that re-writing the parity can be done while | | 804 | Note that re-writing the parity can be done while |
805 | other operations on the RAID set are taking place (e.g., while doing a | | 805 | other operations on the RAID set are taking place (e.g., while doing a |
806 | .Xr fsck 8 | | 806 | .Xr fsck 8 |
807 | on a file system on the RAID set). | | 807 | on a file system on the RAID set). |
808 | However: for maximum effectiveness of the RAID set, the parity should be | | 808 | However: for maximum effectiveness of the RAID set, the parity should be |
809 | known to be correct before any data on the set is modified. | | 809 | known to be correct before any data on the set is modified. |
810 | .Pp | | 810 | .Pp |
811 | To see how the RAID set is doing, the following command can be used to | | 811 | To see how the RAID set is doing, the following command can be used to |
812 | show the RAID set's status: | | 812 | show the RAID set's status: |
813 | .Bd -literal -offset indent | | 813 | .Bd -literal -offset indent |
814 | raidctl -s raid0 | | 814 | raidctl -s raid0 |
815 | .Ed | | 815 | .Ed |
816 | .Pp | | 816 | .Pp |
817 | The output will look something like: | | 817 | The output will look something like: |
818 | .Bd -literal -offset indent | | 818 | .Bd -literal -offset indent |
819 | Components: | | 819 | Components: |
820 | /dev/sd1e: optimal | | 820 | /dev/sd1e: optimal |
821 | /dev/sd2e: optimal | | 821 | /dev/sd2e: optimal |
822 | /dev/sd3e: optimal | | 822 | /dev/sd3e: optimal |
823 | Spares: | | 823 | Spares: |
824 | /dev/sd4e: spare | | 824 | /dev/sd4e: spare |
825 | Component label for /dev/sd1e: | | 825 | Component label for /dev/sd1e: |
826 | Row: 0 Column: 0 Num Rows: 1 Num Columns: 3 | | 826 | Row: 0 Column: 0 Num Rows: 1 Num Columns: 3 |
827 | Version: 2 Serial Number: 13432 Mod Counter: 65 | | 827 | Version: 2 Serial Number: 13432 Mod Counter: 65 |
828 | Clean: No Status: 0 | | 828 | Clean: No Status: 0 |
829 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 | | 829 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 |
830 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 | | 830 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 |
831 | Autoconfig: No | | 831 | Autoconfig: No |
832 | Last configured as: raid0 | | 832 | Last configured as: raid0 |
833 | Component label for /dev/sd2e: | | 833 | Component label for /dev/sd2e: |
834 | Row: 0 Column: 1 Num Rows: 1 Num Columns: 3 | | 834 | Row: 0 Column: 1 Num Rows: 1 Num Columns: 3 |
835 | Version: 2 Serial Number: 13432 Mod Counter: 65 | | 835 | Version: 2 Serial Number: 13432 Mod Counter: 65 |
836 | Clean: No Status: 0 | | 836 | Clean: No Status: 0 |
837 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 | | 837 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 |
838 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 | | 838 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 |
839 | Autoconfig: No | | 839 | Autoconfig: No |
840 | Last configured as: raid0 | | 840 | Last configured as: raid0 |
841 | Component label for /dev/sd3e: | | 841 | Component label for /dev/sd3e: |
842 | Row: 0 Column: 2 Num Rows: 1 Num Columns: 3 | | 842 | Row: 0 Column: 2 Num Rows: 1 Num Columns: 3 |
843 | Version: 2 Serial Number: 13432 Mod Counter: 65 | | 843 | Version: 2 Serial Number: 13432 Mod Counter: 65 |
844 | Clean: No Status: 0 | | 844 | Clean: No Status: 0 |
845 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 | | 845 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 |
846 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 | | 846 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 |
847 | Autoconfig: No | | 847 | Autoconfig: No |
848 | Last configured as: raid0 | | 848 | Last configured as: raid0 |
849 | Parity status: clean | | 849 | Parity status: clean |
850 | Reconstruction is 100% complete. | | 850 | Reconstruction is 100% complete. |
851 | Parity Re-write is 100% complete. | | 851 | Parity Re-write is 100% complete. |
852 | Copyback is 100% complete. | | 852 | Copyback is 100% complete. |
853 | .Ed | | 853 | .Ed |
854 | .Pp | | 854 | .Pp |
855 | This indicates that all is well with the RAID set. | | 855 | This indicates that all is well with the RAID set. |
856 | Of importance here are the component lines which read | | 856 | Of importance here are the component lines which read |
857 | .Sq optimal , | | 857 | .Sq optimal , |
858 | and the | | 858 | and the |
859 | .Sq Parity status | | 859 | .Sq Parity status |
860 | line. | | 860 | line. |
861 | .Sq Parity status: clean | | 861 | .Sq Parity status: clean |
862 | indicates that the parity is up-to-date for this RAID set, | | 862 | indicates that the parity is up-to-date for this RAID set, |
863 | whether or not the RAID set is in redundant or degraded mode. | | 863 | whether or not the RAID set is in redundant or degraded mode. |
864 | .Sq Parity status: DIRTY | | 864 | .Sq Parity status: DIRTY |
865 | indicates that it is not known if the parity information is | | 865 | indicates that it is not known if the parity information is |
866 | consistent with the data, and that the parity information needs | | 866 | consistent with the data, and that the parity information needs |
867 | to be checked. | | 867 | to be checked. |
868 | Note that if there are file systems open on the RAID set, | | 868 | Note that if there are file systems open on the RAID set, |
869 | the individual components will not be | | 869 | the individual components will not be |
870 | .Sq clean | | 870 | .Sq clean |
871 | but the set as a whole can still be clean. | | 871 | but the set as a whole can still be clean. |
872 | .Pp | | 872 | .Pp |
873 | To check the component label of | | 873 | To check the component label of |
874 | .Pa /dev/sd1e , | | 874 | .Pa /dev/sd1e , |
875 | the following is used: | | 875 | the following is used: |
876 | .Bd -literal -offset indent | | 876 | .Bd -literal -offset indent |
877 | raidctl -g /dev/sd1e raid0 | | 877 | raidctl -g /dev/sd1e raid0 |
878 | .Ed | | 878 | .Ed |
879 | .Pp | | 879 | .Pp |
880 | The output of this command will look something like: | | 880 | The output of this command will look something like: |
881 | .Bd -literal -offset indent | | 881 | .Bd -literal -offset indent |
882 | Component label for /dev/sd1e: | | 882 | Component label for /dev/sd1e: |
883 | Row: 0 Column: 0 Num Rows: 1 Num Columns: 3 | | 883 | Row: 0 Column: 0 Num Rows: 1 Num Columns: 3 |
884 | Version: 2 Serial Number: 13432 Mod Counter: 65 | | 884 | Version: 2 Serial Number: 13432 Mod Counter: 65 |
885 | Clean: No Status: 0 | | 885 | Clean: No Status: 0 |
886 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 | | 886 | sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1 |
887 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 | | 887 | RAID Level: 5 blocksize: 512 numBlocks: 1799936 |
888 | Autoconfig: No | | 888 | Autoconfig: No |
889 | Last configured as: raid0 | | 889 | Last configured as: raid0 |
890 | .Ed | | 890 | .Ed |
891 | .Ss Dealing with Component Failures | | 891 | .Ss Dealing with Component Failures |
892 | If for some reason | | 892 | If for some reason |
893 | (perhaps to test reconstruction) it is necessary to pretend a drive | | 893 | (perhaps to test reconstruction) it is necessary to pretend a drive |
894 | has failed, the following will perform that function: | | 894 | has failed, the following will perform that function: |
895 | .Bd -literal -offset indent | | 895 | .Bd -literal -offset indent |
896 | raidctl -f /dev/sd2e raid0 | | 896 | raidctl -f /dev/sd2e raid0 |
897 | .Ed | | 897 | .Ed |
898 | .Pp | | 898 | .Pp |
899 | The system will then be performing all operations in degraded mode, | | 899 | The system will then be performing all operations in degraded mode, |
900 | where missing data is re-computed from existing data and the parity. | | 900 | where missing data is re-computed from existing data and the parity. |
901 | In this case, obtaining the status of raid0 will return (in part): | | 901 | In this case, obtaining the status of raid0 will return (in part): |
902 | .Bd -literal -offset indent | | 902 | .Bd -literal -offset indent |
903 | Components: | | 903 | Components: |
904 | /dev/sd1e: optimal | | 904 | /dev/sd1e: optimal |
905 | /dev/sd2e: failed | | 905 | /dev/sd2e: failed |
906 | /dev/sd3e: optimal | | 906 | /dev/sd3e: optimal |
907 | Spares: | | 907 | Spares: |
908 | /dev/sd4e: spare | | 908 | /dev/sd4e: spare |
909 | .Ed | | 909 | .Ed |
910 | .Pp | | 910 | .Pp |
911 | Note that with the use of | | 911 | Note that with the use of |
912 | .Fl f | | 912 | .Fl f |
913 | a reconstruction has not been started. | | 913 | a reconstruction has not been started. |
914 | To both fail the disk and start a reconstruction, the | | 914 | To both fail the disk and start a reconstruction, the |
915 | .Fl F | | 915 | .Fl F |
916 | option must be used: | | 916 | option must be used: |
917 | .Bd -literal -offset indent | | 917 | .Bd -literal -offset indent |
918 | raidctl -F /dev/sd2e raid0 | | 918 | raidctl -F /dev/sd2e raid0 |
919 | .Ed | | 919 | .Ed |
920 | .Pp | | 920 | .Pp |
921 | The | | 921 | The |
922 | .Fl f | | 922 | .Fl f |
923 | option may be used first, and then the | | 923 | option may be used first, and then the |
924 | .Fl F | | 924 | .Fl F |
925 | option used later, on the same disk, if desired. | | 925 | option used later, on the same disk, if desired. |
926 | Immediately after the reconstruction is started, the status will report: | | 926 | Immediately after the reconstruction is started, the status will report: |
927 | .Bd -literal -offset indent | | 927 | .Bd -literal -offset indent |
928 | Components: | | 928 | Components: |
929 | /dev/sd1e: optimal | | 929 | /dev/sd1e: optimal |
930 | /dev/sd2e: reconstructing | | 930 | /dev/sd2e: reconstructing |
931 | /dev/sd3e: optimal | | 931 | /dev/sd3e: optimal |
932 | Spares: | | 932 | Spares: |
933 | /dev/sd4e: used_spare | | 933 | /dev/sd4e: used_spare |
934 | [...] | | 934 | [...] |
935 | Parity status: clean | | 935 | Parity status: clean |
936 | Reconstruction is 10% complete. | | 936 | Reconstruction is 10% complete. |
937 | Parity Re-write is 100% complete. | | 937 | Parity Re-write is 100% complete. |
938 | Copyback is 100% complete. | | 938 | Copyback is 100% complete. |
939 | .Ed | | 939 | .Ed |
940 | .Pp | | 940 | .Pp |
941 | This indicates that a reconstruction is in progress. | | 941 | This indicates that a reconstruction is in progress. |
942 | To find out how the reconstruction is progressing the | | 942 | To find out how the reconstruction is progressing the |
943 | .Fl S | | 943 | .Fl S |
944 | option may be used. | | 944 | option may be used. |
945 | This will indicate the progress in terms of the | | 945 | This will indicate the progress in terms of the |
946 | percentage of the reconstruction that is completed. | | 946 | percentage of the reconstruction that is completed. |
947 | When the reconstruction is finished the | | 947 | When the reconstruction is finished the |
948 | .Fl s | | 948 | .Fl s |
949 | option will show: | | 949 | option will show: |
950 | .Bd -literal -offset indent | | 950 | .Bd -literal -offset indent |
951 | Components: | | 951 | Components: |
952 | /dev/sd1e: optimal | | 952 | /dev/sd1e: optimal |
953 | /dev/sd2e: spared | | 953 | /dev/sd2e: spared |
954 | /dev/sd3e: optimal | | 954 | /dev/sd3e: optimal |
955 | Spares: | | 955 | Spares: |
956 | /dev/sd4e: used_spare | | 956 | /dev/sd4e: used_spare |
957 | [...] | | 957 | [...] |
958 | Parity status: clean | | 958 | Parity status: clean |
959 | Reconstruction is 100% complete. | | 959 | Reconstruction is 100% complete. |
960 | Parity Re-write is 100% complete. | | 960 | Parity Re-write is 100% complete. |
961 | Copyback is 100% complete. | | 961 | Copyback is 100% complete. |
962 | .Ed | | 962 | .Ed |
963 | .Pp | | 963 | .Pp |
964 | At this point there are at least two options. | | 964 | At this point there are at least two options. |
965 | First, if | | 965 | First, if |
966 | .Pa /dev/sd2e | | 966 | .Pa /dev/sd2e |
967 | is known to be good (i.e., the failure was either caused by | | 967 | is known to be good (i.e., the failure was either caused by |
968 | .Fl f | | 968 | .Fl f |
969 | or | | 969 | or |
970 | .Fl F , | | 970 | .Fl F , |
971 | or the failed disk was replaced), then a copyback of the data can | | 971 | or the failed disk was replaced), then a copyback of the data can |
972 | be initiated with the | | 972 | be initiated with the |
973 | .Fl B | | 973 | .Fl B |
974 | option. | | 974 | option. |
975 | In this example, this would copy the entire contents of | | 975 | In this example, this would copy the entire contents of |
976 | .Pa /dev/sd4e | | 976 | .Pa /dev/sd4e |
977 | to | | 977 | to |
978 | .Pa /dev/sd2e . | | 978 | .Pa /dev/sd2e . |
979 | Once the copyback procedure is complete, the | | 979 | Once the copyback procedure is complete, the |
980 | status of the device would be (in part): | | 980 | status of the device would be (in part): |
981 | .Bd -literal -offset indent | | 981 | .Bd -literal -offset indent |
982 | Components: | | 982 | Components: |
983 | /dev/sd1e: optimal | | 983 | /dev/sd1e: optimal |
984 | /dev/sd2e: optimal | | 984 | /dev/sd2e: optimal |
985 | /dev/sd3e: optimal | | 985 | /dev/sd3e: optimal |
986 | Spares: | | 986 | Spares: |
987 | /dev/sd4e: spare | | 987 | /dev/sd4e: spare |
988 | .Ed | | 988 | .Ed |
989 | .Pp | | 989 | .Pp |
990 | and the system is back to normal operation. | | 990 | and the system is back to normal operation. |
991 | .Pp | | 991 | .Pp |
992 | The second option after the reconstruction is to simply use | | 992 | The second option after the reconstruction is to simply use |
993 | .Pa /dev/sd4e | | 993 | .Pa /dev/sd4e |
994 | in place of | | 994 | in place of |
995 | .Pa /dev/sd2e | | 995 | .Pa /dev/sd2e |
996 | in the configuration file. | | 996 | in the configuration file. |
997 | For example, the configuration file (in part) might now look like: | | 997 | For example, the configuration file (in part) might now look like: |
998 | .Bd -literal -offset indent | | 998 | .Bd -literal -offset indent |
999 | START array | | 999 | START array |
1000 | 1 3 0 | | 1000 | 1 3 0 |
1001 | | | 1001 | |
1002 | START disks | | 1002 | START disks |
1003 | /dev/sd1e | | 1003 | /dev/sd1e |
1004 | /dev/sd4e | | 1004 | /dev/sd4e |
1005 | /dev/sd3e | | 1005 | /dev/sd3e |
1006 | .Ed | | 1006 | .Ed |
1007 | .Pp | | 1007 | .Pp |
1008 | This can be done as | | 1008 | This can be done as |
1009 | .Pa /dev/sd4e | | 1009 | .Pa /dev/sd4e |
1010 | is completely interchangeable with | | 1010 | is completely interchangeable with |
1011 | .Pa /dev/sd2e | | 1011 | .Pa /dev/sd2e |
1012 | at this point. | | 1012 | at this point. |
1013 | Note that extreme care must be taken when | | 1013 | Note that extreme care must be taken when |
1014 | changing the order of the drives in a configuration. | | 1014 | changing the order of the drives in a configuration. |
1015 | This is one of the few instances where the devices and/or | | 1015 | This is one of the few instances where the devices and/or |
1016 | their orderings can be changed without loss of data! | | 1016 | their orderings can be changed without loss of data! |
1017 | In general, the ordering of components in a configuration file should | | 1017 | In general, the ordering of components in a configuration file should |
1018 | .Em never | | 1018 | .Em never |
1019 | be changed. | | 1019 | be changed. |
1020 | .Pp | | 1020 | .Pp |
1021 | If a component fails and there are no hot spares | | 1021 | If a component fails and there are no hot spares |
1022 | available on-line, the status of the RAID set might (in part) look like: | | 1022 | available on-line, the status of the RAID set might (in part) look like: |
1023 | .Bd -literal -offset indent | | 1023 | .Bd -literal -offset indent |
1024 | Components: | | 1024 | Components: |
1025 | /dev/sd1e: optimal | | 1025 | /dev/sd1e: optimal |
1026 | /dev/sd2e: failed | | 1026 | /dev/sd2e: failed |
1027 | /dev/sd3e: optimal | | 1027 | /dev/sd3e: optimal |
1028 | No spares. | | 1028 | No spares. |
1029 | .Ed | | 1029 | .Ed |
1030 | .Pp | | 1030 | .Pp |
1031 | In this case there are a number of options. | | 1031 | In this case there are a number of options. |
1032 | The first option is to add a hot spare using: | | 1032 | The first option is to add a hot spare using: |
1033 | .Bd -literal -offset indent | | 1033 | .Bd -literal -offset indent |
1034 | raidctl -a /dev/sd4e raid0 | | 1034 | raidctl -a /dev/sd4e raid0 |
1035 | .Ed | | 1035 | .Ed |
1036 | .Pp | | 1036 | .Pp |
1037 | After the hot add, the status would then be: | | 1037 | After the hot add, the status would then be: |
1038 | .Bd -literal -offset indent | | 1038 | .Bd -literal -offset indent |
1039 | Components: | | 1039 | Components: |
1040 | /dev/sd1e: optimal | | 1040 | /dev/sd1e: optimal |
1041 | /dev/sd2e: failed | | 1041 | /dev/sd2e: failed |
1042 | /dev/sd3e: optimal | | 1042 | /dev/sd3e: optimal |
1043 | Spares: | | 1043 | Spares: |
1044 | /dev/sd4e: spare | | 1044 | /dev/sd4e: spare |
1045 | .Ed | | 1045 | .Ed |
1046 | .Pp | | 1046 | .Pp |
1047 | Reconstruction could then take place using | | 1047 | Reconstruction could then take place using |
1048 | .Fl F | | 1048 | .Fl F |
1049 | as describe above. | | 1049 | as describe above. |
1050 | .Pp | | 1050 | .Pp |
1051 | A second option is to rebuild directly onto | | 1051 | A second option is to rebuild directly onto |
1052 | .Pa /dev/sd2e . | | 1052 | .Pa /dev/sd2e . |
1053 | Once the disk containing | | 1053 | Once the disk containing |
1054 | .Pa /dev/sd2e | | 1054 | .Pa /dev/sd2e |
1055 | has been replaced, one can simply use: | | 1055 | has been replaced, one can simply use: |
1056 | .Bd -literal -offset indent | | 1056 | .Bd -literal -offset indent |
1057 | raidctl -R /dev/sd2e raid0 | | 1057 | raidctl -R /dev/sd2e raid0 |
1058 | .Ed | | 1058 | .Ed |
1059 | .Pp | | 1059 | .Pp |
1060 | to rebuild the | | 1060 | to rebuild the |
1061 | .Pa /dev/sd2e | | 1061 | .Pa /dev/sd2e |
1062 | component. | | 1062 | component. |
1063 | As the rebuilding is in progress, the status will be: | | 1063 | As the rebuilding is in progress, the status will be: |
1064 | .Bd -literal -offset indent | | 1064 | .Bd -literal -offset indent |
1065 | Components: | | 1065 | Components: |
1066 | /dev/sd1e: optimal | | 1066 | /dev/sd1e: optimal |
1067 | /dev/sd2e: reconstructing | | 1067 | /dev/sd2e: reconstructing |
1068 | /dev/sd3e: optimal | | 1068 | /dev/sd3e: optimal |
1069 | No spares. | | 1069 | No spares. |
1070 | .Ed | | 1070 | .Ed |
1071 | .Pp | | 1071 | .Pp |
1072 | and when completed, will be: | | 1072 | and when completed, will be: |
1073 | .Bd -literal -offset indent | | 1073 | .Bd -literal -offset indent |
1074 | Components: | | 1074 | Components: |
1075 | /dev/sd1e: optimal | | 1075 | /dev/sd1e: optimal |
1076 | /dev/sd2e: optimal | | 1076 | /dev/sd2e: optimal |
1077 | /dev/sd3e: optimal | | 1077 | /dev/sd3e: optimal |
1078 | No spares. | | 1078 | No spares. |
1079 | .Ed | | 1079 | .Ed |
1080 | .Pp | | 1080 | .Pp |
1081 | In circumstances where a particular component is completely | | 1081 | In circumstances where a particular component is completely |
1082 | unavailable after a reboot, a special component name will be used to | | 1082 | unavailable after a reboot, a special component name will be used to |
1083 | indicate the missing component. | | 1083 | indicate the missing component. |
1084 | For example: | | 1084 | For example: |
1085 | .Bd -literal -offset indent | | 1085 | .Bd -literal -offset indent |
1086 | Components: | | 1086 | Components: |
1087 | /dev/sd2e: optimal | | 1087 | /dev/sd2e: optimal |
1088 | component1: failed | | 1088 | component1: failed |
1089 | No spares. | | 1089 | No spares. |
1090 | .Ed | | 1090 | .Ed |
1091 | .Pp | | 1091 | .Pp |
1092 | indicates that the second component of this RAID set was not detected | | 1092 | indicates that the second component of this RAID set was not detected |
1093 | at all by the auto-configuration code. | | 1093 | at all by the auto-configuration code. |
1094 | The name | | 1094 | The name |
1095 | .Sq component1 | | 1095 | .Sq component1 |
1096 | can be used anywhere a normal component name would be used. | | 1096 | can be used anywhere a normal component name would be used. |
1097 | For example, to add a hot spare to the above set, and rebuild to that hot | | 1097 | For example, to add a hot spare to the above set, and rebuild to that hot |
1098 | spare, the following could be done: | | 1098 | spare, the following could be done: |
1099 | .Bd -literal -offset indent | | 1099 | .Bd -literal -offset indent |
1100 | raidctl -a /dev/sd3e raid0 | | 1100 | raidctl -a /dev/sd3e raid0 |
1101 | raidctl -F component1 raid0 | | 1101 | raidctl -F component1 raid0 |
1102 | .Ed | | 1102 | .Ed |
1103 | .Pp | | 1103 | .Pp |
1104 | at which point the data missing from | | 1104 | at which point the data missing from |
1105 | .Sq component1 | | 1105 | .Sq component1 |
1106 | would be reconstructed onto | | 1106 | would be reconstructed onto |
1107 | .Pa /dev/sd3e . | | 1107 | .Pa /dev/sd3e . |
1108 | .Pp | | 1108 | .Pp |
1109 | When more than one component is marked as | | 1109 | When more than one component is marked as |
1110 | .Sq failed | | 1110 | .Sq failed |
1111 | due to a non-component hardware failure (e.g., loss of power to two | | 1111 | due to a non-component hardware failure (e.g., loss of power to two |
1112 | components, adapter problems, termination problems, or cabling issues) it | | 1112 | components, adapter problems, termination problems, or cabling issues) it |
1113 | is quite possible to recover the data on the RAID set. | | 1113 | is quite possible to recover the data on the RAID set. |
1114 | The first thing to be aware of is that the first disk to fail will | | 1114 | The first thing to be aware of is that the first disk to fail will |
1115 | almost certainly be out-of-sync with the remainder of the array. | | 1115 | almost certainly be out-of-sync with the remainder of the array. |
1116 | If any IO was performed between the time the first component is considered | | 1116 | If any IO was performed between the time the first component is considered |
1117 | .Sq failed | | 1117 | .Sq failed |
1118 | and when the second component is considered | | 1118 | and when the second component is considered |
1119 | .Sq failed , | | 1119 | .Sq failed , |
1120 | then the first component to fail will | | 1120 | then the first component to fail will |
1121 | .Em not | | 1121 | .Em not |
1122 | contain correct data, and should be ignored. | | 1122 | contain correct data, and should be ignored. |
1123 | When the second component is marked as failed, however, the RAID device will | | 1123 | When the second component is marked as failed, however, the RAID device will |
1124 | (currently) panic the system. | | 1124 | (currently) panic the system. |
1125 | At this point the data on the RAID set | | 1125 | At this point the data on the RAID set |
1126 | (not including the first failed component) is still self consistent, | | 1126 | (not including the first failed component) is still self consistent, |
1127 | and will be in no worse state of repair than had the power gone out in | | 1127 | and will be in no worse state of repair than had the power gone out in |
1128 | the middle of a write to a file system on a non-RAID device. | | 1128 | the middle of a write to a file system on a non-RAID device. |
1129 | The problem, however, is that the component labels may now have 3 different | | 1129 | The problem, however, is that the component labels may now have 3 different |
1130 | .Sq modification counters | | 1130 | .Sq modification counters |
1131 | (one value on the first component that failed, one value on the second | | 1131 | (one value on the first component that failed, one value on the second |
1132 | component that failed, and a third value on the remaining components). | | 1132 | component that failed, and a third value on the remaining components). |
1133 | In such a situation, the RAID set will not autoconfigure, | | 1133 | In such a situation, the RAID set will not autoconfigure, |
1134 | and can only be forcibly re-configured | | 1134 | and can only be forcibly re-configured |
1135 | with the | | 1135 | with the |
1136 | .Fl C | | 1136 | .Fl C |
1137 | option. | | 1137 | option. |
1138 | To recover the RAID set, one must first remedy whatever physical | | 1138 | To recover the RAID set, one must first remedy whatever physical |
1139 | problem caused the multiple-component failure. | | 1139 | problem caused the multiple-component failure. |
1140 | After that is done, the RAID set can be restored by forcibly | | 1140 | After that is done, the RAID set can be restored by forcibly |
1141 | configuring the raid set | | 1141 | configuring the raid set |
1142 | .Em without | | 1142 | .Em without |
1143 | the component that failed first. | | 1143 | the component that failed first. |
1144 | For example, if | | 1144 | For example, if |
1145 | .Pa /dev/sd1e | | 1145 | .Pa /dev/sd1e |
1146 | and | | 1146 | and |
1147 | .Pa /dev/sd2e | | 1147 | .Pa /dev/sd2e |
1148 | fail (in that order) in a RAID set of the following configuration: | | 1148 | fail (in that order) in a RAID set of the following configuration: |
1149 | .Bd -literal -offset indent | | 1149 | .Bd -literal -offset indent |
1150 | START array | | 1150 | START array |
1151 | 1 4 0 | | 1151 | 1 4 0 |
1152 | | | 1152 | |
1153 | START disks | | 1153 | START disks |
1154 | /dev/sd1e | | 1154 | /dev/sd1e |
1155 | /dev/sd2e | | 1155 | /dev/sd2e |
1156 | /dev/sd3e | | 1156 | /dev/sd3e |
1157 | /dev/sd4e | | 1157 | /dev/sd4e |
1158 | | | 1158 | |
1159 | START layout | | 1159 | START layout |
1160 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_5 | | 1160 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_5 |
1161 | 64 1 1 5 | | 1161 | 64 1 1 5 |
1162 | | | 1162 | |
1163 | START queue | | 1163 | START queue |
1164 | fifo 100 | | 1164 | fifo 100 |
1165 | | | 1165 | |
1166 | .Ed | | 1166 | .Ed |
1167 | .Pp | | 1167 | .Pp |
1168 | then the following configuration (say "recover_raid0.conf") | | 1168 | then the following configuration (say "recover_raid0.conf") |
1169 | .Bd -literal -offset indent | | 1169 | .Bd -literal -offset indent |
1170 | START array | | 1170 | START array |
1171 | 1 4 0 | | 1171 | 1 4 0 |
1172 | | | 1172 | |
1173 | START disks | | 1173 | START disks |
1174 | absent | | 1174 | absent |
1175 | /dev/sd2e | | 1175 | /dev/sd2e |
1176 | /dev/sd3e | | 1176 | /dev/sd3e |
1177 | /dev/sd4e | | 1177 | /dev/sd4e |
1178 | | | 1178 | |
1179 | START layout | | 1179 | START layout |
1180 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_5 | | 1180 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_5 |
1181 | 64 1 1 5 | | 1181 | 64 1 1 5 |
1182 | | | 1182 | |
1183 | START queue | | 1183 | START queue |
1184 | fifo 100 | | 1184 | fifo 100 |
1185 | .Ed | | 1185 | .Ed |
1186 | .Pp | | 1186 | .Pp |
1187 | can be used with | | 1187 | can be used with |
1188 | .Bd -literal -offset indent | | 1188 | .Bd -literal -offset indent |
1189 | raidctl -C recover_raid0.conf raid0 | | 1189 | raidctl -C recover_raid0.conf raid0 |
1190 | .Ed | | 1190 | .Ed |
1191 | .Pp | | 1191 | .Pp |
1192 | to force the configuration of raid0. | | 1192 | to force the configuration of raid0. |
1193 | A | | 1193 | A |
1194 | .Bd -literal -offset indent | | 1194 | .Bd -literal -offset indent |
1195 | raidctl -I 12345 raid0 | | 1195 | raidctl -I 12345 raid0 |
1196 | .Ed | | 1196 | .Ed |
1197 | .Pp | | 1197 | .Pp |
1198 | will be required in order to synchronize the component labels. | | 1198 | will be required in order to synchronize the component labels. |
1199 | At this point the file systems on the RAID set can then be checked and | | 1199 | At this point the file systems on the RAID set can then be checked and |
1200 | corrected. | | 1200 | corrected. |
1201 | To complete the re-construction of the RAID set, | | 1201 | To complete the re-construction of the RAID set, |
1202 | .Pa /dev/sd1e | | 1202 | .Pa /dev/sd1e |
1203 | is simply hot-added back into the array, and reconstructed | | 1203 | is simply hot-added back into the array, and reconstructed |
1204 | as described earlier. | | 1204 | as described earlier. |
1205 | .Ss RAID on RAID | | 1205 | .Ss RAID on RAID |
1206 | RAID sets can be layered to create more complex and much larger RAID sets. | | 1206 | RAID sets can be layered to create more complex and much larger RAID sets. |
1207 | A RAID 0 set, for example, could be constructed from four RAID 5 sets. | | 1207 | A RAID 0 set, for example, could be constructed from four RAID 5 sets. |
1208 | The following configuration file shows such a setup: | | 1208 | The following configuration file shows such a setup: |
1209 | .Bd -literal -offset indent | | 1209 | .Bd -literal -offset indent |
1210 | START array | | 1210 | START array |
1211 | # numRow numCol numSpare | | 1211 | # numRow numCol numSpare |
1212 | 1 4 0 | | 1212 | 1 4 0 |
1213 | | | 1213 | |
1214 | START disks | | 1214 | START disks |
1215 | /dev/raid1e | | 1215 | /dev/raid1e |
1216 | /dev/raid2e | | 1216 | /dev/raid2e |
1217 | /dev/raid3e | | 1217 | /dev/raid3e |
1218 | /dev/raid4e | | 1218 | /dev/raid4e |
1219 | | | 1219 | |
1220 | START layout | | 1220 | START layout |
1221 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_0 | | 1221 | # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_0 |
1222 | 128 1 1 0 | | 1222 | 128 1 1 0 |
1223 | | | 1223 | |
1224 | START queue | | 1224 | START queue |
1225 | fifo 100 | | 1225 | fifo 100 |
1226 | .Ed | | 1226 | .Ed |
1227 | .Pp | | 1227 | .Pp |
1228 | A similar configuration file might be used for a RAID 0 set | | 1228 | A similar configuration file might be used for a RAID 0 set |
1229 | constructed from components on RAID 1 sets. | | 1229 | constructed from components on RAID 1 sets. |
1230 | In such a configuration, the mirroring provides a high degree | | 1230 | In such a configuration, the mirroring provides a high degree |
1231 | of redundancy, while the striping provides additional speed benefits. | | 1231 | of redundancy, while the striping provides additional speed benefits. |
1232 | .Ss Auto-configuration and Root on RAID | | 1232 | .Ss Auto-configuration and Root on RAID |
1233 | RAID sets can also be auto-configured at boot. | | 1233 | RAID sets can also be auto-configured at boot. |
1234 | To make a set auto-configurable, | | 1234 | To make a set auto-configurable, |
1235 | simply prepare the RAID set as above, and then do a: | | 1235 | simply prepare the RAID set as above, and then do a: |
1236 | .Bd -literal -offset indent | | 1236 | .Bd -literal -offset indent |
1237 | raidctl -A yes raid0 | | 1237 | raidctl -A yes raid0 |
1238 | .Ed | | 1238 | .Ed |
1239 | .Pp | | 1239 | .Pp |
1240 | to turn on auto-configuration for that set. | | 1240 | to turn on auto-configuration for that set. |
1241 | To turn off auto-configuration, use: | | 1241 | To turn off auto-configuration, use: |
1242 | .Bd -literal -offset indent | | 1242 | .Bd -literal -offset indent |
1243 | raidctl -A no raid0 | | 1243 | raidctl -A no raid0 |
1244 | .Ed | | 1244 | .Ed |
1245 | .Pp | | 1245 | .Pp |
1246 | RAID sets which are auto-configurable will be configured before the | | 1246 | RAID sets which are auto-configurable will be configured before the |
1247 | root file system is mounted. | | 1247 | root file system is mounted. |
1248 | These RAID sets are thus available for | | 1248 | These RAID sets are thus available for |
1249 | use as a root file system, or for any other file system. | | 1249 | use as a root file system, or for any other file system. |
1250 | A primary advantage of using the auto-configuration is that RAID components | | 1250 | A primary advantage of using the auto-configuration is that RAID components |
1251 | become more independent of the disks they reside on. | | 1251 | become more independent of the disks they reside on. |
1252 | For example, SCSI ID's can change, but auto-configured sets will always be | | 1252 | For example, SCSI ID's can change, but auto-configured sets will always be |
1253 | configured correctly, even if the SCSI ID's of the component disks | | 1253 | configured correctly, even if the SCSI ID's of the component disks |
1254 | have become scrambled. | | 1254 | have become scrambled. |
1255 | .Pp | | 1255 | .Pp |
1256 | Having a system's root file system | | 1256 | Having a system's root file system |
1257 | .Pq Pa / | | 1257 | .Pq Pa / |
1258 | on a RAID set is also allowed, with the | | 1258 | on a RAID set is also allowed, with the |
1259 | .Sq a | | 1259 | .Sq a |
1260 | partition of such a RAID set being used for | | 1260 | partition of such a RAID set being used for |
1261 | .Pa / . | | 1261 | .Pa / . |
1262 | To use raid0a as the root file system, simply use: | | 1262 | To use raid0a as the root file system, simply use: |
1263 | .Bd -literal -offset indent | | 1263 | .Bd -literal -offset indent |
1264 | raidctl -A root raid0 | | 1264 | raidctl -A root raid0 |
1265 | .Ed | | 1265 | .Ed |
1266 | .Pp | | 1266 | .Pp |
1267 | To return raid0a to be just an auto-configuring set simply use the | | 1267 | To return raid0a to be just an auto-configuring set simply use the |
1268 | .Fl A Ar yes | | 1268 | .Fl A Ar yes |
1269 | arguments. | | 1269 | arguments. |
1270 | .Pp | | 1270 | .Pp |
1271 | Note that kernels can only be directly read from RAID 1 components on | | 1271 | Note that kernels can only be directly read from RAID 1 components on |
1272 | architectures that support that | | 1272 | architectures that support that |
1273 | .Pq currently alpha, i386, pmax, sparc, sparc64, and vax . | | 1273 | .Pq currently alpha, i386, pmax, sparc, sparc64, and vax . |
1274 | On those architectures, the | | 1274 | On those architectures, the |
1275 | .Dv FS_RAID | | 1275 | .Dv FS_RAID |
1276 | file system is recognized by the bootblocks, and will properly load the | | 1276 | file system is recognized by the bootblocks, and will properly load the |
1277 | kernel directly from a RAID 1 component. | | 1277 | kernel directly from a RAID 1 component. |
1278 | For other architectures, or to support the root file system | | 1278 | For other architectures, or to support the root file system |
1279 | on other RAID sets, some other mechanism must be used to get a kernel booting. | | 1279 | on other RAID sets, some other mechanism must be used to get a kernel booting. |
1280 | For example, a small partition containing only the secondary boot-blocks | | 1280 | For example, a small partition containing only the secondary boot-blocks |
1281 | and an alternate kernel (or two) could be used. | | 1281 | and an alternate kernel (or two) could be used. |
1282 | Once a kernel is booting however, and an auto-configuring RAID set is | | 1282 | Once a kernel is booting however, and an auto-configuring RAID set is |
1283 | found that is eligible to be root, then that RAID set will be | | 1283 | found that is eligible to be root, then that RAID set will be |
1284 | auto-configured and used as the root device. | | 1284 | auto-configured and used as the root device. |
1285 | If two or more RAID sets claim to be root devices, then the | | 1285 | If two or more RAID sets claim to be root devices, then the |
1286 | user will be prompted to select the root device. | | 1286 | user will be prompted to select the root device. |
1287 | At this time, RAID 0, 1, 4, and 5 sets are all supported as root devices. | | 1287 | At this time, RAID 0, 1, 4, and 5 sets are all supported as root devices. |
1288 | .Pp | | 1288 | .Pp |
1289 | A typical RAID 1 setup with root on RAID might be as follows: | | 1289 | A typical RAID 1 setup with root on RAID might be as follows: |
1290 | .Bl -enum | | 1290 | .Bl -enum |
1291 | .It | | 1291 | .It |
1292 | wd0a - a small partition, which contains a complete, bootable, basic | | 1292 | wd0a - a small partition, which contains a complete, bootable, basic |
1293 | .Nx | | 1293 | .Nx |
1294 | installation. | | 1294 | installation. |
1295 | .It | | 1295 | .It |
1296 | wd1a - also contains a complete, bootable, basic | | 1296 | wd1a - also contains a complete, bootable, basic |
1297 | .Nx | | 1297 | .Nx |
1298 | installation. | | 1298 | installation. |
1299 | .It | | 1299 | .It |
1300 | wd0e and wd1e - a RAID 1 set, raid0, used for the root file system. | | 1300 | wd0e and wd1e - a RAID 1 set, raid0, used for the root file system. |
1301 | .It | | 1301 | .It |
1302 | wd0f and wd1f - a RAID 1 set, raid1, which will be used only for | | 1302 | wd0f and wd1f - a RAID 1 set, raid1, which will be used only for |
1303 | swap space. | | 1303 | swap space. |
1304 | .It | | 1304 | .It |
1305 | wd0g and wd1g - a RAID 1 set, raid2, used for | | 1305 | wd0g and wd1g - a RAID 1 set, raid2, used for |
1306 | .Pa /usr , | | 1306 | .Pa /usr , |
1307 | .Pa /home , | | 1307 | .Pa /home , |
1308 | or other data, if desired. | | 1308 | or other data, if desired. |
1309 | .It | | 1309 | .It |
1310 | wd0h and wd1h - a RAID 1 set, raid3, if desired. | | 1310 | wd0h and wd1h - a RAID 1 set, raid3, if desired. |
1311 | .El | | 1311 | .El |
1312 | .Pp | | 1312 | .Pp |
1313 | RAID sets raid0, raid1, and raid2 are all marked as auto-configurable. | | 1313 | RAID sets raid0, raid1, and raid2 are all marked as auto-configurable. |
1314 | raid0 is marked as being a root file system. | | 1314 | raid0 is marked as being a root file system. |
1315 | When new kernels are installed, the kernel is not only copied to | | 1315 | When new kernels are installed, the kernel is not only copied to |
1316 | .Pa / , | | 1316 | .Pa / , |
1317 | but also to wd0a and wd1a. | | 1317 | but also to wd0a and wd1a. |
1318 | The kernel on wd0a is required, since that | | 1318 | The kernel on wd0a is required, since that |
1319 | is the kernel the system boots from. | | 1319 | is the kernel the system boots from. |
1320 | The kernel on wd1a is also | | 1320 | The kernel on wd1a is also |
1321 | required, since that will be the kernel used should wd0 fail. | | 1321 | required, since that will be the kernel used should wd0 fail. |
1322 | The important point here is to have redundant copies of the kernel | | 1322 | The important point here is to have redundant copies of the kernel |
1323 | available, in the event that one of the drives fail. | | 1323 | available, in the event that one of the drives fail. |
1324 | .Pp | | 1324 | .Pp |
1325 | There is no requirement that the root file system be on the same disk | | 1325 | There is no requirement that the root file system be on the same disk |
1326 | as the kernel. | | 1326 | as the kernel. |
1327 | For example, obtaining the kernel from wd0a, and using | | 1327 | For example, obtaining the kernel from wd0a, and using |
1328 | sd0e and sd1e for raid0, and the root file system, is fine. | | 1328 | sd0e and sd1e for raid0, and the root file system, is fine. |
1329 | It | | 1329 | It |
1330 | .Em is | | 1330 | .Em is |
1331 | critical, however, that there be multiple kernels available, in the | | 1331 | critical, however, that there be multiple kernels available, in the |
1332 | event of media failure. | | 1332 | event of media failure. |
1333 | .Pp | | 1333 | .Pp |
1334 | Multi-layered RAID devices (such as a RAID 0 set made | | 1334 | Multi-layered RAID devices (such as a RAID 0 set made |
1335 | up of RAID 1 sets) are | | 1335 | up of RAID 1 sets) are |
1336 | .Em not | | 1336 | .Em not |
1337 | supported as root devices or auto-configurable devices at this point. | | 1337 | supported as root devices or auto-configurable devices at this point. |
1338 | (Multi-layered RAID devices | | 1338 | (Multi-layered RAID devices |
1339 | .Em are | | 1339 | .Em are |
1340 | supported in general, however, as mentioned earlier.) | | 1340 | supported in general, however, as mentioned earlier.) |
1341 | Note that in order to enable component auto-detection and | | 1341 | Note that in order to enable component auto-detection and |
1342 | auto-configuration of RAID devices, the line: | | 1342 | auto-configuration of RAID devices, the line: |
1343 | .Bd -literal -offset indent | | 1343 | .Bd -literal -offset indent |
1344 | options RAID_AUTOCONFIG | | 1344 | options RAID_AUTOCONFIG |
1345 | .Ed | | 1345 | .Ed |
1346 | .Pp | | 1346 | .Pp |
1347 | must be in the kernel configuration file. | | 1347 | must be in the kernel configuration file. |
1348 | See | | 1348 | See |
1349 | .Xr raid 4 | | 1349 | .Xr raid 4 |
1350 | for more details. | | 1350 | for more details. |
1351 | .Ss Swapping on RAID | | 1351 | .Ss Swapping on RAID |
1352 | A RAID device can be used as a swap device. | | 1352 | A RAID device can be used as a swap device. |
1353 | In order to ensure that a RAID device used as a swap device | | 1353 | In order to ensure that a RAID device used as a swap device |
1354 | is correctly unconfigured when the system is shutdown or rebooted, | | 1354 | is correctly unconfigured when the system is shutdown or rebooted, |
1355 | it is recommended that the line | | 1355 | it is recommended that the line |
1356 | .Bd -literal -offset indent | | 1356 | .Bd -literal -offset indent |
1357 | swapoff=YES | | 1357 | swapoff=YES |
1358 | .Ed | | 1358 | .Ed |
1359 | .Pp | | 1359 | .Pp |
1360 | be added to | | 1360 | be added to |
1361 | .Pa /etc/rc.conf . | | 1361 | .Pa /etc/rc.conf . |
1362 | .Ss Unconfiguration | | 1362 | .Ss Unconfiguration |
1363 | The final operation performed by | | 1363 | The final operation performed by |
1364 | .Nm | | 1364 | .Nm |
1365 | is to unconfigure a | | 1365 | is to unconfigure a |
1366 | .Xr raid 4 | | 1366 | .Xr raid 4 |
1367 | device. | | 1367 | device. |
1368 | This is accomplished via a simple: | | 1368 | This is accomplished via a simple: |
1369 | .Bd -literal -offset indent | | 1369 | .Bd -literal -offset indent |
1370 | raidctl -u raid0 | | 1370 | raidctl -u raid0 |
1371 | .Ed | | 1371 | .Ed |
1372 | .Pp | | 1372 | .Pp |
1373 | at which point the device is ready to be reconfigured. | | 1373 | at which point the device is ready to be reconfigured. |
1374 | .Ss Performance Tuning | | 1374 | .Ss Performance Tuning |
1375 | Selection of the various parameter values which result in the best | | 1375 | Selection of the various parameter values which result in the best |
1376 | performance can be quite tricky, and often requires a bit of | | 1376 | performance can be quite tricky, and often requires a bit of |
1377 | trial-and-error to get those values most appropriate for a given system. | | 1377 | trial-and-error to get those values most appropriate for a given system. |
1378 | A whole range of factors come into play, including: | | 1378 | A whole range of factors come into play, including: |
1379 | .Bl -enum | | 1379 | .Bl -enum |
1380 | .It | | 1380 | .It |
1381 | Types of components (e.g., SCSI vs. IDE) and their bandwidth | | 1381 | Types of components (e.g., SCSI vs. IDE) and their bandwidth |
1382 | .It | | 1382 | .It |
1383 | Types of controller cards and their bandwidth | | 1383 | Types of controller cards and their bandwidth |
1384 | .It | | 1384 | .It |
1385 | Distribution of components among controllers | | 1385 | Distribution of components among controllers |
1386 | .It | | 1386 | .It |
1387 | IO bandwidth | | 1387 | IO bandwidth |
1388 | .It | | 1388 | .It |
1389 | file system access patterns | | 1389 | file system access patterns |
1390 | .It | | 1390 | .It |
1391 | CPU speed | | 1391 | CPU speed |
1392 | .El | | 1392 | .El |
1393 | .Pp | | 1393 | .Pp |
1394 | As with most performance tuning, benchmarking under real-life loads | | 1394 | As with most performance tuning, benchmarking under real-life loads |
1395 | may be the only way to measure expected performance. | | 1395 | may be the only way to measure expected performance. |
1396 | Understanding some of the underlying technology is also useful in tuning. | | 1396 | Understanding some of the underlying technology is also useful in tuning. |
1397 | The goal of this section is to provide pointers to those parameters which may | | 1397 | The goal of this section is to provide pointers to those parameters which may |
1398 | make significant differences in performance. | | 1398 | make significant differences in performance. |
1399 | .Pp | | 1399 | .Pp |
1400 | For a RAID 1 set, a SectPerSU value of 64 or 128 is typically sufficient. | | 1400 | For a RAID 1 set, a SectPerSU value of 64 or 128 is typically sufficient. |
1401 | Since data in a RAID 1 set is arranged in a linear | | 1401 | Since data in a RAID 1 set is arranged in a linear |
1402 | fashion on each component, selecting an appropriate stripe size is | | 1402 | fashion on each component, selecting an appropriate stripe size is |
1403 | somewhat less critical than it is for a RAID 5 set. | | 1403 | somewhat less critical than it is for a RAID 5 set. |
1404 | However: a stripe size that is too small will cause large IO's to be | | 1404 | However: a stripe size that is too small will cause large IO's to be |
1405 | broken up into a number of smaller ones, hurting performance. | | 1405 | broken up into a number of smaller ones, hurting performance. |
1406 | At the same time, a large stripe size may cause problems with | | 1406 | At the same time, a large stripe size may cause problems with |
1407 | concurrent accesses to stripes, which may also affect performance. | | 1407 | concurrent accesses to stripes, which may also affect performance. |
1408 | Thus values in the range of 32 to 128 are often the most effective. | | 1408 | Thus values in the range of 32 to 128 are often the most effective. |
1409 | .Pp | | 1409 | .Pp |
1410 | Tuning RAID 5 sets is trickier. | | 1410 | Tuning RAID 5 sets is trickier. |
1411 | In the best case, IO is presented to the RAID set one stripe at a time. | | 1411 | In the best case, IO is presented to the RAID set one stripe at a time. |
1412 | Since the entire stripe is available at the beginning of the IO, | | 1412 | Since the entire stripe is available at the beginning of the IO, |
1413 | the parity of that stripe can be calculated before the stripe is written, | | 1413 | the parity of that stripe can be calculated before the stripe is written, |
1414 | and then the stripe data and parity can be written in parallel. | | 1414 | and then the stripe data and parity can be written in parallel. |
1415 | When the amount of data being written is less than a full stripe worth, the | | 1415 | When the amount of data being written is less than a full stripe worth, the |
1416 | .Sq small write | | 1416 | .Sq small write |
1417 | problem occurs. | | 1417 | problem occurs. |
1418 | Since a | | 1418 | Since a |
1419 | .Sq small write | | 1419 | .Sq small write |
1420 | means only a portion of the stripe on the components is going to | | 1420 | means only a portion of the stripe on the components is going to |
1421 | change, the data (and parity) on the components must be updated | | 1421 | change, the data (and parity) on the components must be updated |
1422 | slightly differently. | | 1422 | slightly differently. |
1423 | First, the | | 1423 | First, the |
1424 | .Sq old parity | | 1424 | .Sq old parity |
1425 | and | | 1425 | and |
1426 | .Sq old data | | 1426 | .Sq old data |
1427 | must be read from the components. | | 1427 | must be read from the components. |
1428 | Then the new parity is constructed, | | 1428 | Then the new parity is constructed, |
1429 | using the new data to be written, and the old data and old parity. | | 1429 | using the new data to be written, and the old data and old parity. |
1430 | Finally, the new data and new parity are written. | | 1430 | Finally, the new data and new parity are written. |
1431 | All this extra data shuffling results in a serious loss of performance, | | 1431 | All this extra data shuffling results in a serious loss of performance, |
1432 | and is typically 2 to 4 times slower than a full stripe write (or read). | | 1432 | and is typically 2 to 4 times slower than a full stripe write (or read). |
1433 | To combat this problem in the real world, it may be useful | | 1433 | To combat this problem in the real world, it may be useful |
1434 | to ensure that stripe sizes are small enough that a | | 1434 | to ensure that stripe sizes are small enough that a |
1435 | .Sq large IO | | 1435 | .Sq large IO |
1436 | from the system will use exactly one large stripe write. | | 1436 | from the system will use exactly one large stripe write. |
1437 | As is seen later, there are some file system dependencies | | 1437 | As is seen later, there are some file system dependencies |
1438 | which may come into play here as well. | | 1438 | which may come into play here as well. |
1439 | .Pp | | 1439 | .Pp |
1440 | Since the size of a | | 1440 | Since the size of a |
1441 | .Sq large IO | | 1441 | .Sq large IO |
1442 | is often (currently) only 32K or 64K, on a 5-drive RAID 5 set it may | | 1442 | is often (currently) only 32K or 64K, on a 5-drive RAID 5 set it may |
1443 | be desirable to select a SectPerSU value of 16 blocks (8K) or 32 | | 1443 | be desirable to select a SectPerSU value of 16 blocks (8K) or 32 |
1444 | blocks (16K). | | 1444 | blocks (16K). |
1445 | Since there are 4 data sectors per stripe, the maximum | | 1445 | Since there are 4 data sectors per stripe, the maximum |
1446 | data per stripe is 64 blocks (32K) or 128 blocks (64K). | | 1446 | data per stripe is 64 blocks (32K) or 128 blocks (64K). |
1447 | Again, empirical measurement will provide the best indicators of which | | 1447 | Again, empirical measurement will provide the best indicators of which |
1448 | values will yield better performance. | | 1448 | values will yield better performance. |
1449 | .Pp | | 1449 | .Pp |
1450 | The parameters used for the file system are also critical to good performance. | | 1450 | The parameters used for the file system are also critical to good performance. |
1451 | For | | 1451 | For |
1452 | .Xr newfs 8 , | | 1452 | .Xr newfs 8 , |
1453 | for example, increasing the block size to 32K or 64K may improve | | 1453 | for example, increasing the block size to 32K or 64K may improve |
1454 | performance dramatically. | | 1454 | performance dramatically. |
1455 | As well, changing the cylinders-per-group | | 1455 | As well, changing the cylinders-per-group |
1456 | parameter from 16 to 32 or higher is often not only necessary for | | 1456 | parameter from 16 to 32 or higher is often not only necessary for |
1457 | larger file systems, but may also have positive performance implications. | | 1457 | larger file systems, but may also have positive performance implications. |
1458 | .Ss Summary | | 1458 | .Ss Summary |
1459 | Despite the length of this man-page, configuring a RAID set is a | | 1459 | Despite the length of this man-page, configuring a RAID set is a |
1460 | relatively straight-forward process. | | 1460 | relatively straight-forward process. |
1461 | All that needs to be done is the following steps: | | 1461 | All that needs to be done is the following steps: |
1462 | .Bl -enum | | 1462 | .Bl -enum |
1463 | .It | | 1463 | .It |
1464 | Use | | 1464 | Use |
1465 | .Xr disklabel 8 | | 1465 | .Xr disklabel 8 |
1466 | to create the components (of type RAID). | | 1466 | to create the components (of type RAID). |
1467 | .It | | 1467 | .It |
1468 | Construct a RAID configuration file: e.g., | | 1468 | Construct a RAID configuration file: e.g., |
1469 | .Pa raid0.conf | | 1469 | .Pa raid0.conf |
1470 | .It | | 1470 | .It |
1471 | Configure the RAID set with: | | 1471 | Configure the RAID set with: |
1472 | .Bd -literal -offset indent | | 1472 | .Bd -literal -offset indent |
1473 | raidctl -C raid0.conf raid0 | | 1473 | raidctl -C raid0.conf raid0 |
1474 | .Ed | | 1474 | .Ed |
1475 | .Pp | | 1475 | .Pp |
1476 | .It | | 1476 | .It |
1477 | Initialize the component labels with: | | 1477 | Initialize the component labels with: |
1478 | .Bd -literal -offset indent | | 1478 | .Bd -literal -offset indent |
1479 | raidctl -I 123456 raid0 | | 1479 | raidctl -I 123456 raid0 |
1480 | .Ed | | 1480 | .Ed |
1481 | .Pp | | 1481 | .Pp |
1482 | .It | | 1482 | .It |
1483 | Initialize other important parts of the set with: | | 1483 | Initialize other important parts of the set with: |
1484 | .Bd -literal -offset indent | | 1484 | .Bd -literal -offset indent |
1485 | raidctl -i raid0 | | 1485 | raidctl -i raid0 |
1486 | .Ed | | 1486 | .Ed |
1487 | .Pp | | 1487 | .Pp |
1488 | .It | | 1488 | .It |
1489 | Get the default label for the RAID set: | | 1489 | Get the default label for the RAID set: |
1490 | .Bd -literal -offset indent | | 1490 | .Bd -literal -offset indent |
1491 | disklabel raid0 \*[Gt] /tmp/label | | 1491 | disklabel raid0 \*[Gt] /tmp/label |
1492 | .Ed | | 1492 | .Ed |
1493 | .Pp | | 1493 | .Pp |
1494 | .It | | 1494 | .It |
1495 | Edit the label: | | 1495 | Edit the label: |
1496 | .Bd -literal -offset indent | | 1496 | .Bd -literal -offset indent |
1497 | vi /tmp/label | | 1497 | vi /tmp/label |
1498 | .Ed | | 1498 | .Ed |
1499 | .Pp | | 1499 | .Pp |
1500 | .It | | 1500 | .It |
1501 | Put the new label on the RAID set: | | 1501 | Put the new label on the RAID set: |
1502 | .Bd -literal -offset indent | | 1502 | .Bd -literal -offset indent |
1503 | disklabel -R -r raid0 /tmp/label | | 1503 | disklabel -R -r raid0 /tmp/label |
1504 | .Ed | | 1504 | .Ed |
1505 | .Pp | | 1505 | .Pp |
1506 | .It | | 1506 | .It |
1507 | Create the file system: | | 1507 | Create the file system: |
1508 | .Bd -literal -offset indent | | 1508 | .Bd -literal -offset indent |
1509 | newfs /dev/rraid0e | | 1509 | newfs /dev/rraid0e |
1510 | .Ed | | 1510 | .Ed |
1511 | .Pp | | 1511 | .Pp |
1512 | .It | | 1512 | .It |
1513 | Mount the file system: | | 1513 | Mount the file system: |
1514 | .Bd -literal -offset indent | | 1514 | .Bd -literal -offset indent |
1515 | mount /dev/raid0e /mnt | | 1515 | mount /dev/raid0e /mnt |
1516 | .Ed | | 1516 | .Ed |
1517 | .Pp | | 1517 | .Pp |
1518 | .It | | 1518 | .It |
1519 | Use: | | 1519 | Use: |
1520 | .Bd -literal -offset indent | | 1520 | .Bd -literal -offset indent |
1521 | raidctl -c raid0.conf raid0 | | 1521 | raidctl -c raid0.conf raid0 |
1522 | .Ed | | 1522 | .Ed |
1523 | .Pp | | 1523 | .Pp |
1524 | To re-configure the RAID set the next time it is needed, or put | | 1524 | To re-configure the RAID set the next time it is needed, or put |
1525 | .Pa raid0.conf | | 1525 | .Pa raid0.conf |
1526 | into | | 1526 | into |
1527 | .Pa /etc | | 1527 | .Pa /etc |
1528 | where it will automatically be started by the | | 1528 | where it will automatically be started by the |
1529 | .Pa /etc/rc.d | | 1529 | .Pa /etc/rc.d |
1530 | scripts. | | 1530 | scripts. |
1531 | .El | | 1531 | .El |
1532 | .Sh SEE ALSO | | 1532 | .Sh SEE ALSO |
1533 | .Xr ccd 4 , | | 1533 | .Xr ccd 4 , |
1534 | .Xr raid 4 , | | 1534 | .Xr raid 4 , |
1535 | .Xr rc 8 | | 1535 | .Xr rc 8 |
1536 | .Sh HISTORY | | 1536 | .Sh HISTORY |
1537 | RAIDframe is a framework for rapid prototyping of RAID structures | | 1537 | RAIDframe is a framework for rapid prototyping of RAID structures |
1538 | developed by the folks at the Parallel Data Laboratory at Carnegie | | 1538 | developed by the folks at the Parallel Data Laboratory at Carnegie |
1539 | Mellon University (CMU). | | 1539 | Mellon University (CMU). |
1540 | A more complete description of the internals and functionality of | | 1540 | A more complete description of the internals and functionality of |
1541 | RAIDframe is found in the paper "RAIDframe: A Rapid Prototyping Tool | | 1541 | RAIDframe is found in the paper "RAIDframe: A Rapid Prototyping Tool |
1542 | for RAID Systems", by William V. Courtright II, Garth Gibson, Mark | | 1542 | for RAID Systems", by William V. Courtright II, Garth Gibson, Mark |
1543 | Holland, LeAnn Neal Reilly, and Jim Zelenka, and published by the | | 1543 | Holland, LeAnn Neal Reilly, and Jim Zelenka, and published by the |
1544 | Parallel Data Laboratory of Carnegie Mellon University. | | 1544 | Parallel Data Laboratory of Carnegie Mellon University. |
1545 | .Pp | | 1545 | .Pp |
1546 | The | | 1546 | The |
1547 | .Nm | | 1547 | .Nm |
1548 | command first appeared as a program in CMU's RAIDframe v1.1 distribution. | | 1548 | command first appeared as a program in CMU's RAIDframe v1.1 distribution. |
1549 | This version of | | 1549 | This version of |
1550 | .Nm | | 1550 | .Nm |
1551 | is a complete re-write, and first appeared in | | 1551 | is a complete re-write, and first appeared in |
1552 | .Nx 1.4 . | | 1552 | .Nx 1.4 . |
1553 | .Sh COPYRIGHT | | 1553 | .Sh COPYRIGHT |
1554 | .Bd -literal | | 1554 | .Bd -literal |
1555 | The RAIDframe Copyright is as follows: | | 1555 | The RAIDframe Copyright is as follows: |
1556 | | | 1556 | |
1557 | Copyright (c) 1994-1996 Carnegie-Mellon University. | | 1557 | Copyright (c) 1994-1996 Carnegie-Mellon University. |
1558 | All rights reserved. | | 1558 | All rights reserved. |
1559 | | | 1559 | |
1560 | Permission to use, copy, modify and distribute this software and | | 1560 | Permission to use, copy, modify and distribute this software and |
1561 | its documentation is hereby granted, provided that both the copyright | | 1561 | its documentation is hereby granted, provided that both the copyright |
1562 | notice and this permission notice appear in all copies of the | | 1562 | notice and this permission notice appear in all copies of the |
1563 | software, derivative works or modified versions, and any portions | | 1563 | software, derivative works or modified versions, and any portions |
1564 | thereof, and that both notices appear in supporting documentation. | | 1564 | thereof, and that both notices appear in supporting documentation. |
1565 | | | 1565 | |
1566 | CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | | 1566 | CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" |
1567 | CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND | | 1567 | CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND |
1568 | FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | | 1568 | FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. |
1569 | | | 1569 | |
1570 | Carnegie Mellon requests users of this software to return to | | 1570 | Carnegie Mellon requests users of this software to return to |
1571 | | | 1571 | |
1572 | Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | | 1572 | Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU |
1573 | School of Computer Science | | 1573 | School of Computer Science |
1574 | Carnegie Mellon University | | 1574 | Carnegie Mellon University |
1575 | Pittsburgh PA 15213-3890 | | 1575 | Pittsburgh PA 15213-3890 |
1576 | | | 1576 | |
1577 | any improvements or extensions that they make and grant Carnegie the | | 1577 | any improvements or extensions that they make and grant Carnegie the |
1578 | rights to redistribute these changes. | | 1578 | rights to redistribute these changes. |
1579 | .Ed | | 1579 | .Ed |
1580 | .Sh WARNINGS | | 1580 | .Sh WARNINGS |
1581 | Certain RAID levels (1, 4, 5, 6, and others) can protect against some | | 1581 | Certain RAID levels (1, 4, 5, 6, and others) can protect against some |
1582 | data loss due to component failure. | | 1582 | data loss due to component failure. |
1583 | However the loss of two components of a RAID 4 or 5 system, | | 1583 | However the loss of two components of a RAID 4 or 5 system, |
1584 | or the loss of a single component of a RAID 0 system will | | 1584 | or the loss of a single component of a RAID 0 system will |
1585 | result in the entire file system being lost. | | 1585 | result in the entire file system being lost. |
1586 | RAID is | | 1586 | RAID is |
1587 | .Em NOT | | 1587 | .Em NOT |
1588 | a substitute for good backup practices. | | 1588 | a substitute for good backup practices. |
1589 | .Pp | | 1589 | .Pp |
1590 | Recomputation of parity | | 1590 | Recomputation of parity |
1591 | .Em MUST | | 1591 | .Em MUST |
1592 | be performed whenever there is a chance that it may have been compromised. | | 1592 | be performed whenever there is a chance that it may have been compromised. |
1593 | This includes after system crashes, or before a RAID | | 1593 | This includes after system crashes, or before a RAID |
1594 | device has been used for the first time. | | 1594 | device has been used for the first time. |
1595 | Failure to keep parity correct will be catastrophic should a | | 1595 | Failure to keep parity correct will be catastrophic should a |
1596 | component ever fail \(em it is better to use RAID 0 and get the | | 1596 | component ever fail \(em it is better to use RAID 0 and get the |
1597 | additional space and speed, than it is to use parity, but | | 1597 | additional space and speed, than it is to use parity, but |
1598 | not keep the parity correct. | | 1598 | not keep the parity correct. |
1599 | At least with RAID 0 there is no perception of increased data security. | | 1599 | At least with RAID 0 there is no perception of increased data security. |
| | | 1600 | .Pp |
| | | 1601 | When replacing a failed component of a RAID set, it is a good |
| | | 1602 | idea to zero out the first 64 blocks of the new component to insure the |
| | | 1603 | RAIDframe driver doesn't erroneously detect a component label in the |
| | | 1604 | new component. This is particularly true on |
| | | 1605 | .Em |
| | | 1606 | RAID 1 |
| | | 1607 | sets because there is at most one correct component label in a failed RAID |
| | | 1608 | 1 installation, and the RAIDframe driver picks the component label with the |
| | | 1609 | highest serial number and modification value as the authoritative source |
| | | 1610 | for the failed RAID set when choosing which component label to use to |
| | | 1611 | configure the RAID set. |
1600 | .Sh BUGS | | 1612 | .Sh BUGS |
1601 | Hot-spare removal is currently not available. | | 1613 | Hot-spare removal is currently not available. |