]>
Commit | Line | Data |
---|---|---|
519561f7 NB |
1 | .\" Copyright Neil Brown and others. |
2 | .\" This program is free software; you can redistribute it and/or modify | |
3 | .\" it under the terms of the GNU General Public License as published by | |
4 | .\" the Free Software Foundation; either version 2 of the License, or | |
5 | .\" (at your option) any later version. | |
6 | .\" See file COPYING in distribution for details. | |
56eb10c0 NB |
7 | .TH MDADM.CONF 5 |
8 | .SH NAME | |
93e790af | 9 | mdadm.conf \- configuration for management of Software RAID with mdadm |
56eb10c0 | 10 | .SH SYNOPSIS |
e9dd5644 | 11 | {CONFFILE} |
56eb10c0 NB |
12 | .SH DESCRIPTION |
13 | .PP | |
51ac42e3 | 14 | .I mdadm |
11a3e71d | 15 | is a tool for creating, managing, and monitoring RAID devices using the |
56eb10c0 NB |
16 | .B md |
17 | driver in Linux. | |
18 | .PP | |
19 | Some common tasks, such as assembling all arrays, can be simplified | |
2d465520 | 20 | by describing the devices and arrays in this configuration file. |
56eb10c0 NB |
21 | |
22 | .SS SYNTAX | |
23 | The file should be seen as a collection of words separated by white | |
24 | space (space, tab, or newline). | |
11a3e71d | 25 | Any word that beings with a hash sign (#) starts a comment and that |
2d465520 | 26 | word together with the remainder of the line is ignored. |
56eb10c0 | 27 | |
7df8a7b9 N |
28 | Spaces can be included in a word using quotation characters. Either |
29 | single quotes | |
30 | .RB ( ' ) | |
31 | or double quotes (\fB"\fP) | |
32 | may be used. All the characters from one quotation character to | |
33 | next identical character are protected and will not be used to | |
34 | separate words to start new quoted strings. To include a single quote | |
35 | it must be between double quotes. To include a double quote it must | |
36 | be between single quotes. | |
37 | ||
2d465520 | 38 | Any line that starts with white space (space or tab) is treated as |
56eb10c0 NB |
39 | though it were a continuation of the previous line. |
40 | ||
41 | Empty lines are ignored, but otherwise each (non continuation) line | |
2d465520 | 42 | must start with a keyword as listed below. The keywords are case |
e0d19036 | 43 | insensitive and can be abbreviated to 3 characters. |
56eb10c0 NB |
44 | |
45 | The keywords are: | |
46 | .TP | |
47 | .B DEVICE | |
48 | A | |
49 | .B device | |
50 | line lists the devices (whole devices or partitions) that might contain | |
51 | a component of an MD array. When looking for the components of an | |
52 | array, | |
51ac42e3 | 53 | .I mdadm |
2d465520 | 54 | will scan these devices (or any devices listed on the command line). |
56eb10c0 NB |
55 | |
56 | The | |
57 | .B device | |
58 | line may contain a number of different devices (separated by spaces) | |
59 | and each device name can contain wild cards as defined by | |
60 | .BR glob (7). | |
61 | ||
62 | Also, there may be several device lines present in the file. | |
63 | ||
5787fa49 NB |
64 | Alternatively, a |
65 | .B device | |
6c89c867 | 66 | line can contain either or both of the words |
8fd8d9c4 N |
67 | .B containers |
68 | and | |
5787fa49 | 69 | .BR partitions . |
8fd8d9c4 N |
70 | The word |
71 | .B containers | |
72 | will cause | |
73 | .I mdadm | |
74 | to look for assembled CONTAINER arrays and included them as a source | |
75 | for assembling further arrays. | |
e0fe762a | 76 | |
8fd8d9c4 N |
77 | The word |
78 | .I partitions | |
79 | will cause | |
5787fa49 NB |
80 | .I mdadm |
81 | to read | |
82 | .I /proc/partitions | |
35cc5be4 | 83 | and include all devices and partitions found therein. |
5787fa49 NB |
84 | .I mdadm |
85 | does not use the names from | |
86 | .I /proc/partitions | |
87 | but only the major and minor device numbers. It scans | |
88 | .I /dev | |
89 | to find the name that matches the numbers. | |
90 | ||
24e075c6 LF |
91 | If no DEVICE line is present in any config file, |
92 | then "DEVICE partitions containers" is assumed. | |
a99d6b66 | 93 | |
11a3e71d NB |
94 | For example: |
95 | .IP | |
96 | DEVICE /dev/hda* /dev/hdc* | |
97 | .br | |
98 | DEV /dev/sd* | |
99 | .br | |
e0fe762a | 100 | DEVICE /dev/disk/by-path/pci* |
5787fa49 NB |
101 | .br |
102 | DEVICE partitions | |
11a3e71d | 103 | |
56eb10c0 NB |
104 | .TP |
105 | .B ARRAY | |
11a3e71d | 106 | The ARRAY lines identify actual arrays. The second word on the line |
8fd8d9c4 | 107 | may be the name of the device where the array is normally |
11a3e71d | 108 | assembled, such as |
db2d001c N |
109 | .B /dev/md1 |
110 | or | |
111 | .BR /dev/md/backup . | |
112 | If the name does not start with a slash | |
113 | .RB (' / '), | |
114 | it is treated as being in | |
115 | .BR /dev/md/ . | |
112cace6 N |
116 | Alternately the word |
117 | .B <ignore> | |
118 | (complete with angle brackets) can be given in which case any array | |
119 | which matches the rest of the line will never be automatically assembled. | |
8fd8d9c4 N |
120 | If no device name is given, |
121 | .I mdadm | |
db2d001c | 122 | will use various heuristics to determine an appropriate name. |
e0fe762a | 123 | |
e0d19036 NB |
124 | Subsequent words identify the array, or identify the array as a member |
125 | of a group. If multiple identities are given, | |
2d465520 NB |
126 | then a component device must match ALL identities to be considered a |
127 | match. Each identity word has a tag, and equals sign, and some value. | |
128 | The tags are: | |
11a3e71d NB |
129 | .RS 4 |
130 | .TP | |
131 | .B uuid= | |
132 | The value should be a 128 bit uuid in hexadecimal, with punctuation | |
133 | interspersed if desired. This must match the uuid stored in the | |
134 | superblock. | |
135 | .TP | |
7e23fc43 | 136 | .B super\-minor= |
11a3e71d NB |
137 | The value is an integer which indicates the minor number that was |
138 | stored in the superblock when the array was created. When an array is | |
139 | created as /dev/mdX, then the minor number X is stored. | |
140 | .TP | |
141 | .B devices= | |
56eedc1a NB |
142 | The value is a comma separated list of device names or device name |
143 | patterns. | |
144 | Only devices with names which match one entry in the list will be used | |
eca944fa | 145 | to assemble the array. Note that the devices |
11a3e71d NB |
146 | listed there must also be listed on a DEVICE line. |
147 | .TP | |
148 | .B level= | |
956a13fb | 149 | The value is a RAID level. This is not normally used to |
11a3e71d NB |
150 | identify an array, but is supported so that the output of |
151 | ||
7e23fc43 | 152 | .B "mdadm \-\-examine \-\-scan" |
11a3e71d NB |
153 | |
154 | can be use directly in the configuration file. | |
155 | .TP | |
7e23fc43 | 156 | .B num\-devices= |
b83d95f3 | 157 | The value is the number of devices in a complete active array. As with |
11a3e71d NB |
158 | .B level= |
159 | this is mainly for compatibility with the output of | |
56eb10c0 | 160 | |
7e23fc43 | 161 | .BR "mdadm \-\-examine \-\-scan" . |
e0d19036 | 162 | |
058574b1 NB |
163 | .TP |
164 | .B spares= | |
165 | The value is a number of spare devices to expect the array to have. | |
e0fe762a | 166 | The sole use of this keyword and value is as follows: |
7e23fc43 | 167 | .B mdadm \-\-monitor |
058574b1 NB |
168 | will report an array if it is found to have fewer than this number of |
169 | spares when | |
7e23fc43 | 170 | .B \-\-monitor |
058574b1 | 171 | starts or when |
7e23fc43 | 172 | .B \-\-oneshot |
058574b1 NB |
173 | is used. |
174 | ||
e0d19036 | 175 | .TP |
7e23fc43 | 176 | .B spare\-group= |
e0d19036 NB |
177 | The value is a textual name for a group of arrays. All arrays with |
178 | the same | |
7e23fc43 | 179 | .B spare\-group |
e0d19036 NB |
180 | name are considered to be part of the same group. The significance of |
181 | a group of arrays is that | |
51ac42e3 | 182 | .I mdadm |
e0d19036 NB |
183 | will, when monitoring the arrays, move a spare drive from one array in |
184 | a group to another array in that group if the first array had a failed | |
185 | or missing drive but no spare. | |
dd0781e5 NB |
186 | |
187 | .TP | |
188 | .B auto= | |
257c1dc2 N |
189 | This option is rarely needed with mdadm-3.0, particularly if use with |
190 | the Linux kernel v2.6.28 or later. | |
191 | It tells | |
51ac42e3 | 192 | .I mdadm |
257c1dc2 N |
193 | whether to use partitionable array or non-partitionable arrays and, |
194 | in the absence of | |
195 | .IR udev , | |
196 | how many partition devices to create. From 2.6.28 all md array | |
197 | devices are partitionable, hence this option is not needed. | |
dd0781e5 NB |
198 | |
199 | The value of this option can be "yes" or "md" to indicate that a | |
200 | traditional, non-partitionable md array should be created, or "mdp", | |
201 | "part" or "partition" to indicate that a partitionable md array (only | |
202 | available in linux 2.6 and later) should be used. This later set can | |
203 | also have a number appended to indicate how many partitions to create | |
204 | device files for, e.g. | |
205 | .BR auto=mdp5 . | |
206 | The default is 4. | |
7ef02d01 NB |
207 | |
208 | .TP | |
209 | .B bitmap= | |
210 | The option specifies a file in which a write-intent bitmap should be | |
211 | found. When assembling the array, | |
212 | .I mdadm | |
213 | will provide this file to the | |
214 | .B md | |
215 | driver as the bitmap file. This has the same function as the | |
7e23fc43 | 216 | .B \-\-bitmap\-file |
7ef02d01 | 217 | option to |
7e23fc43 | 218 | .BR \-\-assemble . |
058574b1 NB |
219 | |
220 | .TP | |
221 | .B metadata= | |
222 | Specify the metadata format that the array has. This is mainly | |
223 | recognised for comparability with the output of | |
7e23fc43 | 224 | .BR "mdadm \-Es" . |
058574b1 | 225 | |
8fd8d9c4 N |
226 | .TP |
227 | .B container= | |
228 | Specify that this array is a member array of some container. The | |
229 | value given can be either a path name in /dev, or a UUID of the | |
230 | container array. | |
231 | ||
e0fe762a | 232 | .TP |
8fd8d9c4 N |
233 | .B member= |
234 | Specify that this array is a member array of some container. Each | |
235 | type of container has some way to enumerate member arrays, often a | |
236 | simple sequence number. The value identifies which member of a | |
e0fe762a | 237 | container the array is. It will usually accompany a "container=" word. |
11a3e71d | 238 | .RE |
e0d19036 NB |
239 | |
240 | .TP | |
241 | .B MAILADDR | |
242 | The | |
243 | .B mailaddr | |
244 | line gives an E-mail address that alerts should be | |
245 | sent to when | |
51ac42e3 | 246 | .I mdadm |
e0d19036 | 247 | is running in |
7e23fc43 | 248 | .B \-\-monitor |
e0d19036 | 249 | mode (and was given the |
7e23fc43 | 250 | .B \-\-scan |
e0d19036 NB |
251 | option). There should only be one |
252 | .B MAILADDR | |
3c6e95c1 N |
253 | line and it should have only one address. Any subsequent addresses |
254 | are silently ignored. | |
e0d19036 | 255 | |
4948b8f7 NB |
256 | .TP |
257 | .B MAILFROM | |
258 | The | |
259 | .B mailfrom | |
93e790af | 260 | line (which can only be abbreviated to at least 5 characters) gives an |
4948b8f7 NB |
261 | address to appear in the "From" address for alert mails. This can be |
262 | useful if you want to explicitly set a domain, as the default from | |
263 | address is "root" with no domain. All words on this line are | |
264 | catenated with spaces to form the address. | |
265 | ||
266 | Note that this value cannot be set via the | |
267 | .I mdadm | |
268 | commandline. It is only settable via the config file. | |
24e075c6 LF |
269 | There should only be one |
270 | .B MAILADDR | |
271 | line and it should have only one address. Any subsequent addresses | |
272 | are silently ignored. | |
4948b8f7 | 273 | |
e0d19036 NB |
274 | .TP |
275 | .B PROGRAM | |
276 | The | |
277 | .B program | |
278 | line gives the name of a program to be run when | |
7e23fc43 | 279 | .B "mdadm \-\-monitor" |
e0d19036 NB |
280 | detects potentially interesting events on any of the arrays that it |
281 | is monitoring. This program gets run with two or three arguments, they | |
282 | being the Event, the md device, and possibly the related component | |
283 | device. | |
284 | ||
285 | There should only be one | |
286 | .B program | |
24e075c6 LF |
287 | line and it should be given only one program. Any subsequent programs |
288 | are silently ignored. | |
e0d19036 | 289 | |
5bbb4842 NB |
290 | |
291 | .TP | |
292 | .B CREATE | |
293 | The | |
294 | .B create | |
e2efe9e7 N |
295 | line gives default values to be used when creating arrays, new members |
296 | of arrays, and device entries for arrays. | |
24e075c6 LF |
297 | |
298 | There should only be one | |
299 | .B create | |
300 | line. Any subsequent lines will override the previous settings. | |
301 | ||
302 | Keywords used in the | |
303 | .I CREATE | |
304 | line and supported values are: | |
5bbb4842 NB |
305 | |
306 | .RS 4 | |
307 | .TP | |
308 | .B owner= | |
309 | .TP | |
310 | .B group= | |
311 | These can give user/group ids or names to use instead of system | |
312 | defaults (root/wheel or root/disk). | |
313 | .TP | |
314 | .B mode= | |
315 | An octal file mode such as 0660 can be given to override the default | |
316 | of 0600. | |
317 | .TP | |
318 | .B auto= | |
319 | This corresponds to the | |
7e23fc43 | 320 | .B \-\-auto |
5bbb4842 NB |
321 | flag to mdadm. Give |
322 | .BR yes , | |
323 | .BR md , | |
324 | .BR mdp , | |
325 | .B part | |
b3f1c093 | 326 | \(em possibly followed by a number of partitions \(em to indicate how |
5bbb4842 NB |
327 | missing device entries should be created. |
328 | ||
058574b1 NB |
329 | .TP |
330 | .B metadata= | |
331 | The name of the metadata format to use if none is explicitly given. | |
332 | This can be useful to impose a system-wide default of version-1 superblocks. | |
333 | ||
eca944fa N |
334 | .TP |
335 | .B names=yes | |
336 | Since Linux 2.6.29 it has been possible to create | |
337 | .B md | |
338 | devices with a name like | |
339 | .B md_home | |
340 | rather than just a number, like | |
341 | .BR md3 . | |
342 | .I mdadm | |
343 | will use the numeric alternative by default as other tools that interact | |
344 | with md arrays may expect only numbers. | |
345 | If | |
346 | .B names=yes | |
347 | is given in | |
348 | .I mdadm.conf | |
349 | then | |
350 | .I mdadm | |
351 | will use a name when appropriate. | |
352 | If | |
353 | .B names=no | |
354 | is given, then non-numeric | |
355 | .I md | |
356 | device names will not be used even if the default changes in a future | |
357 | release of | |
358 | .IR mdadm . | |
e2efe9e7 N |
359 | |
360 | .TP | |
361 | .B bbl=no | |
362 | By default, | |
363 | .I mdadm | |
364 | will reserve space for a bad block list (bbl) on all devices | |
365 | included in or added to any array that supports them. Setting | |
366 | .B bbl=no | |
367 | will prevent this, so newly added devices will not have a bad | |
368 | block log. | |
5bbb4842 NB |
369 | .RE |
370 | ||
6d6de2ee NB |
371 | .TP |
372 | .B HOMEHOST | |
373 | The | |
374 | .B homehost | |
375 | line gives a default value for the | |
d1d3482b | 376 | .B \-\-homehost= |
e0fe762a | 377 | option to mdadm. There should normally be only one other word on the line. |
0ac91628 | 378 | It should either be a host name, or one of the special words |
0f23aa88 N |
379 | .BR <system>, |
380 | .B <none> | |
0ac91628 N |
381 | and |
382 | .BR <ignore> . | |
6d6de2ee NB |
383 | If |
384 | .B <system> | |
385 | is given, then the | |
386 | .BR gethostname ( 2 ) | |
0f23aa88 | 387 | systemcall is used to get the host name. This is the default. |
5bbb4842 | 388 | |
0ac91628 N |
389 | If |
390 | .B <ignore> | |
391 | is given, then a flag is set so that when arrays are being | |
e0fe762a | 392 | auto-assembled the checking of the recorded |
0ac91628 N |
393 | .I homehost |
394 | is disabled. | |
e0fe762a N |
395 | If |
396 | .B <ignore> | |
397 | is given it is also possible to give an explicit name which will be | |
398 | used when creating arrays. This is the only case when there can be | |
399 | more that one other word on the | |
400 | .B HOMEHOST | |
3c6e95c1 N |
401 | line. If there are other words, or other |
402 | .B HOMEHOST | |
403 | lines, they are silently ignored. | |
0ac91628 | 404 | |
0f23aa88 N |
405 | If |
406 | .B <none> | |
407 | is given, then the default of using | |
408 | .BR gethostname ( 2 ) | |
409 | is over-ridden and no homehost name is assumed. | |
410 | ||
0ac91628 N |
411 | When arrays are created, this host name will be stored in the |
412 | metadata. When arrays are assembled using auto-assembly, arrays which | |
413 | do not record the correct homehost name in their metadata will be | |
e0fe762a N |
414 | assembled using a "foreign" name. A "foreign" name alway ends with a |
415 | digit string preceded by an underscore to differentiate it | |
0ac91628 N |
416 | from any possible local name. e.g. |
417 | .B /dev/md/1_1 | |
418 | or | |
e0fe762a | 419 | .BR /dev/md/home_0 . |
c33bbda5 LF |
420 | |
421 | .TP | |
422 | .B HOMECLUSTER | |
423 | The | |
424 | .B homcluster | |
425 | line gives a default value for the | |
426 | .B \-\-homecluster= | |
427 | option to mdadm. It specifies the cluster name for the md device. | |
428 | The md device can be assembled only on the cluster which matches | |
429 | the name specified. If | |
430 | .B homcluster | |
431 | is not provided, mdadm tries to detect the cluster name automatically. | |
432 | ||
433 | There should only be one | |
434 | .B homecluster | |
435 | line. Any subsequent lines will be silently ignored. | |
436 | ||
31015d57 N |
437 | .TP |
438 | .B AUTO | |
439 | A list of names of metadata format can be given, each preceded by a | |
440 | plus or minus sign. Also the word | |
d1d3482b N |
441 | .I homehost |
442 | is allowed as is | |
443 | .I all | |
444 | preceded by plus or minus sign. | |
31015d57 | 445 | .I all |
d1d3482b | 446 | is usually last. |
31015d57 N |
447 | |
448 | When | |
449 | .I mdadm | |
a1331cc4 | 450 | is auto-assembling an array, either via |
d1d3482b | 451 | .I \-\-assemble |
31015d57 | 452 | or |
d1d3482b | 453 | .I \-\-incremental |
31015d57 N |
454 | and it finds metadata of a given type, it checks that metadata type |
455 | against those listed in this line. The first match wins, where | |
456 | .I all | |
457 | matches anything. | |
458 | If a match is found that was preceded by a plus sign, the auto | |
459 | assembly is allowed. If the match was preceded by a minus sign, the | |
460 | auto assembly is disallowed. If no match is found, the auto assembly | |
461 | is allowed. | |
462 | ||
d1d3482b N |
463 | If the metadata indicates that the array was created for |
464 | .I this | |
465 | host, and the word | |
466 | .I homehost | |
467 | appears before any other match, then the array is treated as a valid | |
468 | candidate for auto-assembly. | |
469 | ||
31015d57 N |
470 | This can be used to disable all auto-assembly (so that only arrays |
471 | explicitly listed in mdadm.conf or on the command line are assembled), | |
472 | or to disable assembly of certain metadata types which might be | |
d1d3482b N |
473 | handled by other software. It can also be used to disable assembly of |
474 | all foreign arrays - normally such arrays are assembled but given a | |
475 | non-deterministic name in | |
476 | .BR /dev/md/ . | |
31015d57 N |
477 | |
478 | The known metadata types are | |
479 | .BR 0.90 , | |
480 | .BR 1.x , | |
481 | .BR ddf , | |
482 | .BR imsm . | |
483 | ||
3c6e95c1 N |
484 | .B AUTO |
485 | should be given at most once. Subsequent lines are silently ignored. | |
24e075c6 LF |
486 | Thus a later config file in a config directory will not overwrite |
487 | the setting in an earlier config file. | |
3c6e95c1 | 488 | |
210597d1 PC |
489 | .TP |
490 | .B POLICY | |
eca944fa | 491 | This is used to specify what automatic behavior is allowed on devices |
87eb4fab N |
492 | newly appearing in the system and provides a way of marking spares that can |
493 | be moved to other arrays as well as the migration domains. | |
210597d1 PC |
494 | .I Domain |
495 | can be defined through | |
496 | .I policy | |
497 | line by specifying a domain name for a number of paths from | |
498 | .BR /dev/disk/by-path/ . | |
87eb4fab N |
499 | A device may belong to several domains. The domain of an array is a union |
500 | of domains of all devices in that array. A spare can be automatically | |
210597d1 PC |
501 | moved from one array to another if the set of the destination array's |
502 | .I domains | |
f0c403ba | 503 | contains all the |
210597d1 PC |
504 | .I domains |
505 | of the new disk or if both arrays have the same | |
506 | .IR spare-group . | |
507 | ||
508 | To update hot plug configuration it is necessary to execute | |
509 | .B mdadm \-\-udev\-rules | |
87eb4fab | 510 | command after changing the config file |
210597d1 | 511 | |
6b611284 | 512 | Keywords used in the |
210597d1 | 513 | .I POLICY |
87eb4fab | 514 | line and supported values are: |
210597d1 | 515 | |
0663137c | 516 | .RS 4 |
210597d1 PC |
517 | .TP |
518 | .B domain= | |
519 | any arbitrary string | |
520 | .TP | |
521 | .B metadata= | |
522 | 0.9 1.x ddf or imsm | |
523 | .TP | |
524 | .B path= | |
525 | file glob matching anything from | |
526 | .B /dev/disk/by-path | |
b601104e | 527 | .TP |
87eb4fab | 528 | .B type= |
eca944fa | 529 | either |
87eb4fab N |
530 | .B disk |
531 | or | |
532 | .BR part . | |
210597d1 PC |
533 | .TP |
534 | .B action= | |
535 | include, re-add, spare, spare-same-slot, or force-spare | |
f0c403ba | 536 | .TP |
b601104e LD |
537 | .B auto= |
538 | yes, no, or homehost. | |
210597d1 PC |
539 | |
540 | .P | |
541 | The | |
542 | .I action | |
543 | item determines the automatic behavior allowed for devices matching the | |
544 | .I path | |
87eb4fab N |
545 | and |
546 | .I type | |
547 | in the same line. If a device matches several lines with different | |
210597d1 PC |
548 | .I actions |
549 | then the most permissive will apply. The ordering of policy lines | |
550 | is irrelevant to the end result. | |
551 | .TP | |
552 | .B include | |
553 | allows adding a disk to an array if metadata on that disk matches that array | |
554 | .TP | |
e31dec22 | 555 | .B re\-add |
87eb4fab | 556 | will include the device in the array if it appears to be a current member |
e31dec22 N |
557 | or a member that was recently removed and the array has a |
558 | write-intent-bitmap to allow the | |
559 | .B re\-add | |
560 | functionality. | |
210597d1 PC |
561 | .TP |
562 | .B spare | |
87eb4fab N |
563 | as above and additionally: if the device is bare it can |
564 | become a spare if there is any array that it is a candidate for based | |
565 | on domains and metadata. | |
210597d1 PC |
566 | .TP |
567 | .B spare\-same\-slot | |
568 | as above and additionally if given slot was used by an array that went | |
569 | degraded recently and the device plugged in has no metadata then it will | |
570 | be automatically added to that array (or it's container) | |
571 | .TP | |
e31dec22 | 572 | .B force\-spare |
210597d1 PC |
573 | as above and the disk will become a spare in remaining cases |
574 | .RE | |
575 | ||
6b611284 N |
576 | .TP |
577 | .B PART-POLICY | |
578 | This is similar to | |
579 | .B POLICY | |
580 | and accepts the same keyword assignments. It allows a consistent set | |
581 | of policies to applied to each of the partitions of a device. | |
582 | ||
583 | A | |
584 | .B PART-POLICY | |
585 | line should set | |
586 | .I type=disk | |
587 | and identify the path to one or more disk devices. Each partition on | |
588 | these disks will be treated according to the | |
589 | .I action= | |
590 | setting from this line. If a | |
591 | .I domain | |
592 | is set in the line, then the domain associated with each patition will | |
593 | be based on the domain, but with | |
594 | .RB \(dq -part N\(dq | |
595 | appended, when N is the partition number for the partition that was | |
596 | found. | |
597 | ||
b0681598 MD |
598 | .TP |
599 | .B SYSFS | |
0663137c | 600 | The |
601 | .B SYSFS | |
602 | line lists custom values of MD device's sysfs attributes which will be | |
b0681598 MD |
603 | stored in sysfs after the array is assembled. Multiple lines are allowed and each |
604 | line has to contain the uuid or the name of the device to which it relates. | |
24e075c6 | 605 | Lines are applied in reverse order. |
b0681598 MD |
606 | .RS 4 |
607 | .TP | |
608 | .B uuid= | |
609 | hexadecimal identifier of MD device. This has to match the uuid stored in the | |
610 | superblock. | |
611 | .TP | |
612 | .B name= | |
613 | name of the MD device as was given to | |
614 | .I mdadm | |
615 | when the array was created. It will be ignored if | |
616 | .B uuid | |
617 | is not empty. | |
0663137c | 618 | .RE |
619 | ||
b0681598 | 620 | .TP |
0663137c | 621 | .B MONITORDELAY |
622 | The | |
623 | .B monitordelay | |
624 | line gives a delay in seconds | |
625 | .I mdadm | |
626 | shall wait before pooling md arrays | |
627 | when | |
628 | .I mdadm | |
629 | is running in | |
630 | .B \-\-monitor | |
631 | mode. | |
632 | .B \-d/\-\-delay | |
24e075c6 LF |
633 | command line argument takes precedence over the config file. |
634 | ||
635 | If multiple | |
636 | .B MINITORDELAY | |
637 | lines are provided, only first non-zero value is considered. | |
638 | ||
336e13fc BK |
639 | .TP |
640 | .B ENCRYPTION_NO_VERIFY | |
641 | The | |
642 | .B ENCRYPTION_NO_VERIFY | |
643 | disables encryption verification for devices with particular encryption support detected. | |
644 | Currently, only verification of SATA OPAL encryption can be disabled. | |
645 | It does not disable ATA security encryption verification. | |
646 | Available parameter | |
647 | .I "sata_opal". | |
648 | ||
649 | ||
24e075c6 LF |
650 | .SH FILES |
651 | ||
652 | .SS {CONFFILE} | |
653 | ||
654 | The default config file location, used when | |
655 | .I mdadm | |
656 | is running without --config option. | |
657 | ||
658 | .SS {CONFFILE}.d | |
659 | ||
660 | The default directory with config files. Used when | |
661 | .I mdadm | |
662 | is running without --config option, after successful reading of the | |
663 | .B {CONFFILE} | |
664 | default config file. Files in that directory | |
665 | are read in lexical order. | |
666 | ||
667 | ||
668 | .SS {CONFFILE2} | |
669 | ||
670 | Alternative config file that is read, when | |
671 | .I mdadm | |
672 | is running without --config option and the | |
673 | .B {CONFFILE} | |
674 | default config file was not opened successfully. | |
675 | ||
676 | .SS {CONFFILE2}.d | |
677 | ||
678 | The alternative directory with config files. Used when | |
679 | .I mdadm | |
680 | is runninng without --config option, after reading the | |
681 | .B {CONFFILE2} | |
682 | alternative config file whether it was successful or not. Files in | |
683 | that directory are read in lexical order. | |
b0681598 | 684 | |
2d465520 NB |
685 | .SH EXAMPLE |
686 | DEVICE /dev/sd[bcdjkl]1 | |
687 | .br | |
688 | DEVICE /dev/hda1 /dev/hdb1 | |
689 | ||
0e69da72 | 690 | # /dev/md0 is known by its UUID. |
2d465520 NB |
691 | .br |
692 | ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371 | |
693 | .br | |
694 | # /dev/md1 contains all devices with a minor number of | |
695 | .br | |
696 | # 1 in the superblock. | |
697 | .br | |
698 | ARRAY /dev/md1 superminor=1 | |
699 | .br | |
93e790af | 700 | # /dev/md2 is made from precisely these two devices |
2d465520 | 701 | .br |
a9d69660 | 702 | ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1 |
2d465520 NB |
703 | |
704 | # /dev/md4 and /dev/md5 are a spare-group and spares | |
705 | .br | |
706 | # can be moved between them | |
707 | .br | |
708 | ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df | |
709 | .br | |
7e23fc43 | 710 | spare\-group=group1 |
2d465520 NB |
711 | .br |
712 | ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 | |
713 | .br | |
7e23fc43 | 714 | spare\-group=group1 |
dd0781e5 NB |
715 | .br |
716 | # /dev/md/home is created if need to be a partitionable md array | |
717 | .br | |
718 | # any spare device number is allocated. | |
719 | .br | |
720 | ARRAY /dev/md/home UUID=9187a482:5dde19d9:eea3cc4a:d646ab8b | |
721 | .br | |
722 | auto=part | |
210597d1 PC |
723 | .br |
724 | POLICY domain=domain1 metadata=imsm path=pci-0000:00:1f.2-scsi-* | |
725 | .br | |
726 | action=spare | |
727 | .br | |
728 | POLICY domain=domain1 metadata=imsm path=pci-0000:04:00.0-scsi-[01]* | |
729 | .br | |
730 | action=include | |
731 | .br | |
732 | # One domain comprising of devices attached to specified paths is defined. | |
733 | .br | |
734 | # Bare device matching first path will be made an imsm spare on hot plug. | |
735 | .br | |
736 | # If more than one array is created on devices belonging to domain1 and | |
737 | .br | |
738 | # one of them becomes degraded, then any imsm spare matching any path for | |
739 | .br | |
740 | # given domain name can be migrated. | |
741 | .br | |
2d465520 NB |
742 | MAILADDR root@mydomain.tld |
743 | .br | |
7e23fc43 | 744 | PROGRAM /usr/sbin/handle\-mdadm\-events |
5bbb4842 | 745 | .br |
7e23fc43 | 746 | CREATE group=system mode=0640 auto=part\-8 |
41a3b72a NB |
747 | .br |
748 | HOMEHOST <system> | |
31015d57 | 749 | .br |
dae45415 | 750 | AUTO +1.x homehost \-all |
b0681598 MD |
751 | .br |
752 | SYSFS name=/dev/md/raid5 group_thread_cnt=4 sync_speed_max=1000000 | |
753 | .br | |
754 | SYSFS uuid=bead5eb6:31c17a27:da120ba2:7dfda40d group_thread_cnt=4 | |
755 | sync_speed_max=1000000 | |
0663137c | 756 | .br |
757 | MONITORDELAY 60 | |
336e13fc BK |
758 | .br |
759 | ENCRYPTION_NO_VERIFY sata_opal | |
e0d19036 | 760 | |
56eb10c0 | 761 | .SH SEE ALSO |
11a3e71d NB |
762 | .BR mdadm (8), |
763 | .BR md (4). |