]> git.ipfire.org Git - thirdparty/mdadm.git/blob - mdadm.8
c9d164dede994e96044b40eb35596e7960ffbec3
[thirdparty/mdadm.git] / mdadm.8
1 .\" -*- nroff -*-
2 .TH MDADM 8 "" v1.3.0
3 .SH NAME
4 mdadm \- manage MD devices
5 .I aka
6 Linux Software Raid.
7
8 .SH SYNOPSIS
9
10 .BI mdadm " [mode] <raiddevice> [options] <component-devices>"
11
12 .SH DESCRIPTION
13 RAID devices are virtual devices created from two or more
14 real block devices. This allows multiple devices (typically disk
15 drives or partitions there-of) to be combined into a single device to
16 hold (for example) a single filesystem.
17 Some RAID levels include redundancy and so can survive some degree of
18 device failure.
19
20 Linux Software RAID devices are implemented through the md (Multiple
21 Devices) device driver.
22
23 Currently, Linux supports
24 .B LINEAR
25 md devices,
26 .B RAID0
27 (striping),
28 .B RAID1
29 (mirroring),
30 .BR RAID4 ,
31 .BR RAID5 ,
32 and
33 .BR MULTIPATH .
34
35 .B MULTIPATH is not a Software RAID mechanism, but does involve
36 multiple devices. For
37 .B MULTIPATH
38 each device is a path to one common physical storage device.
39
40
41 .B mdadm
42 is a program that can be used to create, manage, and monitor
43 MD devices. As
44 such it provides a similar set of functionality to the
45 .B raidtools
46 packages.
47 The key differences between
48 .B mdadm
49 and
50 .B raidtools
51 are:
52 .IP \(bu 4
53 .B mdadm
54 is a single program and not a collection of programs.
55 .IP \(bu 4
56 .B mdadm
57 can perform (almost) all of its functions without having a
58 configuration file and does not use one by default. Also
59 .B mdadm
60 helps with management of the configuration
61 file.
62 .IP \(bu 4
63 .B mdadm
64 can provide information about your arrays (through Query, Detail, and Examine)
65 that
66 .B raidtools
67 cannot.
68 .P
69 .I mdadm
70 does not use
71 .IR /etc/raidtab ,
72 the
73 .B raidtools
74 configuration file, at all. It has a different configuration file
75 with a different format and an different purpose.
76
77 .SH MODES
78 mdadm has 6 major modes of operation:
79 .TP
80 .B Assemble
81 Assemble the parts of a previously created
82 array into an active array. Components can be explicitly given
83 or can be searched for.
84 .B mdadm
85 checks that the components
86 do form a bona fide array, and can, on request, fiddle superblock
87 information so as to assemble a faulty array.
88
89 .TP
90 .B Build
91 Build a legacy array without per-device superblocks.
92
93 .TP
94 .B Create
95 Create a new array with per-device superblocks.
96 '''It can progress
97 '''in several step create-add-add-run or it can all happen with one command.
98
99 .TP
100 .B Manage
101 This is for doing things to specific components of an array such as
102 adding new spares and removing faulty devices.
103
104 .TP
105 .B Misc
106 This mode allows operations on independent devices such as examine MD
107 superblocks, erasing old superblocks and stopping active arrays.
108
109 .TP
110 .B "Follow or Monitor"
111 Monitor one or more md devices and act on any state changes. This is
112 only meaningful for raid1, raid5 or multipath arrays as only these have
113 interesting state. raid0 or linear never have missing, spare, or
114 failed drives, so there is nothing to monitor.
115
116
117 .SH OPTIONS
118
119 Available options are:
120
121 .TP
122 .BR -A ", " --assemble
123 Assemble a pre-existing array.
124
125 .TP
126 .BR -B ", " --build
127 Build a legacy array without superblocks.
128
129 .TP
130 .BR -C ", " --create
131 Create a new array.
132
133 .TP
134 .BR -Q ", " --query
135 Examine a device to see
136 (1) if it is an md device and (2) if it is a component of an md
137 array.
138 Information about what is discovered is presented.
139
140 .TP
141 .BR -D ", " --detail
142 Print detail of one or more md devices.
143
144 .TP
145 .BR -E ", " --examine
146 Print content of md superblock on device(s).
147
148 .TP
149 .BR -F ", " --follow ", " --monitor
150 Select
151 .B Monitor
152 mode.
153
154 .TP
155 .BR -h ", " --help
156 Display help message or, after above option, mode specific help
157 message.
158
159 .TP
160 .B --help-options
161 Display more detailed help about command line parsing and some commonly
162 used options.
163
164 .TP
165 .BR -V ", " --version
166 Print version information for mdadm.
167
168 .TP
169 .BR -v ", " --verbose
170 Be more verbose about what is happening.
171
172 .TP
173 .BR -b ", " --brief
174 Be less verbose. This is used with
175 .B --detail
176 and
177 .BR --examine .
178
179 .TP
180 .BR -f ", " --force
181 Be more forceful about certain operations. See the various modes of
182 the exact meaning of this option in different contexts.
183
184 .TP
185 .BR -c ", " --config=
186 Specify the config file. Default is
187 .BR /etc/mdadm.conf .
188 If the config file given is
189 .B partitions
190 then nothing will be read, but
191 .I mdadm
192 will act as though the config file contained exactly
193 .B "DEVICE partitions"
194 and will read
195 .B /proc/partitions
196 to find a list of devices to scan.
197 If the word
198 .B none
199 is given for the config file, then
200 .I mdadm
201 will act as though the config file were empty.
202
203 .TP
204 .BR -s ", " --scan
205 scan config file or
206 .B /proc/mdstat
207 for missing information.
208 In general, this option gives
209 .B mdadm
210 permission to get any missing information, like component devices,
211 array devices, array identities, and alert destination from the
212 configuration file:
213 .BR /etc/mdadm.conf .
214 One exception is MISC mode when using
215 .B --detail
216 or
217 .B --stop
218 in which case
219 .B --scan
220 says to get a list of array devices from
221 .BR /proc/mdstat .
222
223 .SH For create or build:
224
225 .TP
226 .BR -c ", " --chunk=
227 Specify chunk size of kibibytes. The default is 64.
228
229 .TP
230 .BR --rounding=
231 Specify rounding factor for linear array (==chunk size)
232
233 .TP
234 .BR -l ", " --level=
235 Set raid level. When used with
236 .IR --create ,
237 options are: linear, raid0, 0, stripe, raid1, 1, mirror, raid5, 4,
238 raid5, 5, multipath, mp. Obviously some of these are synonymous.
239
240 When used with
241 .IR --build ,
242 only linear, raid0, 0, stripe are valid.
243
244 .TP
245 .BR -p ", " --parity=
246 Set raid5 parity algorithm. Options are:
247 left-asymmetric,
248 left-symmetric,
249 right-asymmetric,
250 right-symmetric,
251 la, ra, ls, rs. The default is left-symmetric.
252
253 .TP
254 .BR --layout=
255 same as --parity
256
257 .TP
258 .BR -n ", " --raid-devices=
259 Specify the number of active devices in the array. This, plus the
260 number of spare devices (see below) must equal the number of
261 .I component-devices
262 (including "\fBmissing\fP" devices)
263 that are listed on the command line. Setting a value of 1 is probably
264 a mistake and so requires that
265 .B --force
266 be specified first. A value of 1 will then be allowed for linear,
267 multipath, raid0 and raid1. It is never allowed for raid4 or raid5.
268 .br
269 Note that this number cannot be changed once the array has been created.
270
271 .TP
272 .BR -x ", " --spare-devices=
273 Specify the number of spare (eXtra) devices in the initial array.
274 Spares can also be added
275 and removed later. The number of component devices listed
276 on the command line must equal the number of raid devices plus the
277 number of spare devices.
278
279
280 .TP
281 .BR -z ", " --size=
282 Amount (in Kibibytes) of space to use from each drive in RAID1/4/5.
283 This must be a multiple of the chunk size, and must leave about 128Kb
284 of space at the end of the drive for the RAID superblock.
285 If this is not specified
286 (as it normally is not) the smallest drive (or partition) sets the
287 size, though if there is a variance among the drives of greater than 1%, a warning is
288 issued.
289
290 .SH For assemble:
291
292 .TP
293 .BR -u ", " --uuid=
294 uuid of array to assemble. Devices which don't have this uuid are
295 excluded
296
297 .TP
298 .BR -m ", " --super-minor=
299 Minor number of device that array was created for. Devices which
300 don't have this minor number are excluded. If you create an array as
301 /dev/md1, then all superblocks will contain the minor number 1, even if
302 the array is later assembled as /dev/md2.
303
304 Giving the literal word "dev" for
305 .B --super-minor
306 will cause
307 .I mdadm
308 to use the minor number of the md device that is being assembled.
309 e.g. when assembling
310 .BR /dev/md0 ,
311 .M --super-minor=dev
312 will look for super blocks with a minor number of 0.
313
314 .TP
315 .BR -f ", " --force
316 Assemble the array even if some superblocks appear out-of-date
317
318 .TP
319 .BR -R ", " --run
320 Attempt to start the array even if fewer drives were given than are
321 needed for a full array. Normally if not all drives are found and
322 .B --scan
323 is not used, then the array will be assembled but not started.
324 With
325 .B --run
326 an attempt will be made to start it anyway.
327
328 .TP
329 .BR -U ", " --update=
330 Update the superblock on each device while assembling the array. The
331 argument given to this flag can be either
332 .B sparc2.2
333 or
334 .BR super-minor .
335
336 The
337 .B sparc2.2
338 option will adjust the superblock of an array what was created on a Sparc
339 machine running a patched 2.2 Linux kernel. This kernel got the
340 alignment of part of the superblock wrong. You can use the
341 .B "--examine --sparc2.2"
342 option to
343 .I mdadm
344 to see what effect this would have.
345
346 The
347 .B super-minor
348 option will update the
349 .B "prefered minor"
350 field on each superblock to match the minor number of the array being
351 assembled. This is not need on 2.6 and later kernels as they make
352 this adjustment automatically.
353
354
355 .SH For Manage mode:
356
357 .TP
358 .BR -a ", " --add
359 '''add, or
360 hotadd listed devices.
361
362 .TP
363 .BR -r ", " --remove
364 remove listed devices. They must not be active. i.e. they should
365 be failed or spare devices.
366
367 .TP
368 .BR -f ", " --fail
369 mark listed devices as faulty.
370
371 .TP
372 .BR --set-faulty
373 same as --fail.
374
375 .SH For Examine mode:
376
377 .TP
378 .B --sparc2.2
379 In an array was created on a 2.2 Linux kernel patched with RAID
380 support, the superblock will have been created incorrectly, or at
381 least incompatibly with 2.4 and later kernels. Using the
382 .B --sparc2.2
383 flag with
384 .B --examine
385 will fix the superblock before displaying it. If this appears to do
386 the right thing, then the array can be successfully assembled using
387 .BR "--assemble --update=sparc2.2" .
388
389 .SH For Misc mode:
390
391 .TP
392 .BR -R ", " --run
393 start a partially built array.
394
395 .TP
396 .BR -S ", " --stop
397 deactivate array, releasing all resources.
398
399 .TP
400 .BR -o ", " --readonly
401 mark array as readonly.
402
403 .TP
404 .BR -w ", " --readwrite
405 mark array as readwrite.
406
407 .TP
408 .B --zero-superblock
409 If the device contains a valid md superblock, the block is
410 over-written with zeros. With
411 --force
412 the block where the superblock would be is over-written even if it
413 doesn't appear to be valid.
414
415 .SH For Monitor mode:
416 .TP
417 .BR -m ", " --mail
418 Give a mail address to send alerts to.
419
420 .TP
421 .BR -p ", " --program ", " --alert
422 Give a program to be run whenever an event is detected.
423
424 .TP
425 .BR -d ", " --delay
426 Give a delay in seconds.
427 .B mdadm
428 polls the md arrays and then waits this many seconds before polling
429 again. The default is 60 seconds.
430
431 .TP
432 .BR -f ", " --daemonise
433 Tell
434 .B mdadm
435 to run as a background daemon if it decides to monitor anything. This
436 causes it to fork and run in the child, and to disconnect form the
437 terminal. The process id of the child is written to stdout.
438 This is useful with
439 .B --scan
440 which will only continue monitoring if a mail address or alert program
441 is found in the config file.
442
443 .TP
444 .BR -1 ", " --oneshot
445 Check arrays only once. This will generate
446 .B NewArray
447 events and more significantly
448 .B DegradedArray
449 events. Running
450 .in +5
451 .B " mdadm --monitor --scan -1"
452 .in -5
453 from a cron script will ensure regular notification of any degraded arrays.
454
455 .SH ASSEMBLE MODE
456
457 .HP 12
458 Usage:
459 .B mdadm --assemble
460 .I md-device options-and-component-devices...
461 .HP 12
462 Usage:
463 .B mdadm --assemble --scan
464 .I md-devices-and-options...
465 .HP 12
466 Usage:
467 .B mdadm --assemble --scan
468 .I options...
469
470 .PP
471 This usage assembles one or more raid arrays from pre-existing components.
472 For each array, mdadm needs to know the md device, the identity of the
473 array, and a number of component-devices. These can be found in a number of ways.
474
475 In the first usage example (without the
476 .BR --scan )
477 the first device given is the md device.
478 In the second usage example, all devices listed are treated as md
479 devices and assembly is attempted.
480 In the third (where no devices are listed) all md devices that are
481 listed in the configuration file are assembled.
482
483 If precisely one device is listed, but
484 .B --scan
485 is not given, that
486 .I mdadm
487 acts as though
488 .B --scan
489 was given and identify information is extracted from the configuration file.
490
491 The identity can be given with the
492 .B --uuid
493 option, with the
494 .B --super-minor
495 option, can be found in the config file, or will be taken from the
496 super block on the first component-device listed on the command line.
497
498 Devices can be given on the
499 .B --assemble
500 command line or in the config file. Only devices which have an md
501 superblock which contains the right identity will be considered for
502 any array.
503
504 The config file is only used if explicitly named with
505 .B --config
506 or requested with (a possibly implicit)
507 .B --scan.
508 In the later case,
509 .B /etc/mdadm.conf
510 is used.
511
512 If
513 .B --scan
514 is not given, then the config file will only be used to find the
515 identity of md arrays.
516
517 Normally the array will be started after it is assembled. However if
518 .B --scan
519 is not given and insufficient drives were listed to start a complete
520 (non-degraded) array, then the array is not started (to guard against
521 usage errors). To insist that the array be started in this case (as
522 may work for RAID1 or RAID5), give the
523 .B --run
524 flag.
525
526
527 .SH BUILD MODE
528
529 .HP 12
530 Usage:
531 .B mdadm --build
532 .I device
533 .BI --chunk= X
534 .BI --level= Y
535 .BI --raid-devices= Z
536 .I devices
537
538 .PP
539 This usage is similar to
540 .BR --create .
541 The difference is that it creates a legacy array without a superblock. With
542 these arrays there is no difference between initially creating the array and
543 subsequently assembling the array, except that hopefully there is useful
544 data there in the second case.
545
546 The level may only be 0, raid0, or linear. All devices must be listed
547 and the array will be started once complete.
548
549 .SH CREATE MODE
550
551 .HP 12
552 Usage:
553 .B mdadm --create
554 .I device
555 .BI --chunk= X
556 .BI --level= Y
557 .br
558 .BI --raid-devices= Z
559 .I devices
560
561 .PP
562 This usage will initialise a new md array, associate some devices with
563 it, and activate the array.
564
565 As devices are added, they are checked to see if they contain raid
566 superblocks or filesystems. They are also checked to see if the variance in
567 device size exceeds 1%.
568
569 If any discrepancy is found, the array will not automatically be run, though
570 the presence of a
571 .B --run
572 can override this caution.
573
574 To create a "degraded" array in which some devices are missing, simply
575 give the word "\fBmissing\fP"
576 in place of a device name. This will cause
577 .B mdadm
578 to leave the corresponding slot in the array empty.
579 For a RAID4 or RAID5 array at most one slot can be
580 "\fBmissing\fP".
581 For a RAID1 array, only one real device needs to be given. All of the
582 others can be
583 "\fBmissing\fP".
584
585 '''If the
586 '''.B --size
587 '''option is given, it is not necessary to list any component-devices in this command.
588 '''They can be added later, before a
589 '''.B --run.
590 '''If no
591 '''.B --size
592 '''is given, the apparent size of the smallest drive given is used.
593
594 The General Management options that are valid with --create are:
595 .TP
596 .B --run
597 insist of running the array even if some devices look like they might
598 be in use.
599
600 .TP
601 .B --readonly
602 start the array readonly - not supported yet.
603
604 .SH MANAGE MODE
605 .HP 12
606 Usage:
607 .B mdadm
608 .I device
609 .I options... devices...
610 .PP
611
612 This usage will allow individual devices in an array to be failed,
613 removed or added. It is possible to perform multiple operations with
614 on command. For example:
615 .br
616 .B " mdadm /dev/md0 -f /dev/hda1 -r /dev/hda1 -a /dev/hda1"
617 .br
618 will firstly mark
619 .B /dev/hda1
620 as faulty in
621 .B /dev/md0
622 and will then remove it from the array and finally add it back
623 in as a spare. However only one md array can be affected by a single
624 command.
625
626 .SH MISC MODE
627 .HP 12
628 Usage:
629 .B mdadm
630 .I options ...
631 .I devices ...
632 .PP
633
634 MISC mode includes a number if distinct operations that
635 operate on distinct devices. The operations are:
636 .TP
637 --query
638 The device is examined to see if it is
639 (1) an active md array, or
640 (2) a component of an md array.
641 The information discovered is reported.
642
643 .TP
644 --detail
645 The device should be an active md device.
646 .B mdadm
647 will display a detailed description of the array.
648 .B --brief
649 or
650 .B --scan
651 will cause the output to be less detailed and the format to be
652 suitable for inclusion in
653 .BR /etc/mdadm.conf .
654
655 .TP
656 --examine
657 The device should be a component of an md array.
658 .B mdadm
659 will read the md superblock of the device and display the contents.
660 If
661 .B --brief
662 is given, or
663 .B --scan
664 then multiple devices that are components of the one array
665 are grouped together and reported in a single entry suitable
666 for inclusion in
667 .BR /etc/mdadm.conf .
668
669 Having
670 .B --scan
671 without listing any devices will cause all devices listed in the
672 config file to be examined.
673
674 .TP
675 --stop
676 This devices should active md arrays which will be deactivated, if
677 they are not currently in use.
678
679 .TP
680 --run
681 This will fully activate a partially assembled md array.
682
683 .TP
684 --readonly
685 This will mark an active array as read-only, providing that it is
686 not currently being used.
687
688 .TP
689 --readwrite
690 This will change a
691 .B readonly
692 array back to being read/write.
693
694 .TP
695 --scan
696 For all operations except
697 .BR --examine ,
698 .B --scan
699 will cause the operation to be applied to all arrays listed in
700 .BR /proc/mdstat .
701 For
702 .BR --examine,
703 .B --scan
704 causes all devices listed in the config file to be examined.
705
706
707 .SH MONITOR MODE
708
709 .HP 12
710 Usage:
711 .B mdadm --monitor
712 .I options... devices...
713
714 .PP
715 This usage causes
716 .B mdadm
717 to periodically poll a number of md arrays and to report on any events
718 noticed.
719 .B mdadm
720 will never exit once it decides that there are arrays to be checked,
721 so it should normally be run in the background.
722
723 As well as reporting events,
724 .B mdadm
725 may move a spare drive from one array to another if they are in the
726 same
727 .B spare-group
728 and if the destination array has a failed drive but not spares.
729
730 If any devices are listed on the command line,
731 .B mdadm
732 will only monitor those devices. Otherwise all arrays listed in the
733 configuration file will be monitored. Further, if
734 .B --scan
735 is given, then any other md devices that appear in
736 .B /proc/mdstat
737 will also be monitored.
738
739 The result of monitoring the arrays is the generation of events.
740 These events are passed to a separate program (if specified) and may
741 be mailed to a given E-mail address.
742
743 When passing event to program, the program is run once for each event
744 and is given 2 or 3 command-line arguements. The first is the
745 name of the event (see below). The second is the name of the
746 md device which is affected, and the third is the name of a related
747 device if relevant, such as a component device that has failed.
748
749 If
750 .B --scan
751 is given, then a program or an E-mail address must be specified on the
752 command line or in the config file. If neither are available, then
753 .B mdadm
754 will not monitor anything.
755 Without
756 .B --scan
757 .B mdadm
758 will continue monitoring as long as something was found to monitor. If
759 no program or email is given, then each event is reported to
760 .BR stdout .
761
762 The different events are:
763
764 .RS 4
765 .TP
766 .B DeviceDisappeared
767 An md array which previously was configured appears to no longer be
768 configured.
769
770 .TP
771 .B RebuildStarted
772 An md array started reconstruction.
773
774 .TP
775 .BI Rebuild NN
776 Where
777 .I NN
778 is 20, 40, 60, or 80, this indicates that rebuild has passed that many
779 percentage of the total.
780
781 .TP
782 .B Fail
783 An active component device of an array has been marked as faulty.
784
785 .TP
786 .B FailSpare
787 A spare component device which was being rebuilt to replace a faulty
788 device has failed.
789
790 .TP
791 .B SpareActive
792 A spare component device which was being rebuilt to replace a faulty
793 device as been successfully rebuild and has been made active.
794
795 .TP
796 .B NewArray
797 A new md array has been detected in the
798 .B /proc/mdstat
799 file.
800
801 .TP
802 .B DegradedArray
803 A newly noticed array appears to be degraded. This message is not
804 generated when
805 .I mdadm
806 notices a drive failure which causes degradation, but only when
807 .I mdadm
808 notices that an array is degraded when it first sees the array.
809
810 .TP
811 .B MoveSpare
812 A spare drive has been moved from one array in a
813 .B spare-group
814 to another to allow a failed drive to be replaced.
815
816 .RE
817
818 Only
819 .B Fail
820 and
821 .B FailSpare
822 cause Email to be sent. All events cause the program to be run.
823 The program is run with two or three arguments, they being the event
824 name, the array device and possibly a second device.
825
826 Each event has an associated array device (e.g.
827 .BR /dev/md1 )
828 and possibly a second device. For
829 .BR Fail ,
830 .BR FailSpare ,
831 and
832 .B SpareActive
833 the second device is the relevant component device.
834 For
835 .B MoveSpare
836 the second device is the array that the spare was moved from.
837
838 For
839 .B mdadm
840 to move spares from one array to another, the different arrays need to
841 be labelled with the same
842 .B spare-group
843 in the configuration file. The
844 .B spare-group
845 name can be any string. It is only necessary that different spare
846 groups use different names.
847
848 When
849 .B mdadm
850 detects that an array which is in a spare group has fewer active
851 devices than necessary for the complete array, and has no spare
852 devices, it will look for another array in the same spare group that
853 has a full complement of working drive and a spare. It will then
854 attempt to remove the spare from the second drive and add it to the
855 first.
856 If the removal succeeds but the adding fails, then it is added back to
857 the original array.
858
859 .SH EXAMPLES
860
861 .B " mdadm --query /dev/name-of-device"
862 .br
863 This will find out if a given device is a raid array, or is part of
864 one, and will provide brief information about the device.
865
866 .B " mdadm --assemble --scan"
867 .br
868 This will assemble and start all arrays listed in the standard confile
869 file. This command will typically go in a system startup file.
870
871 .B " mdadm --stop --scan"
872 .br
873 This will shut down all array that can be shut down (i.e. are not
874 currently in used). This will typically going in a system shutdown script.
875
876 .B " mdadm --follow --scan --delay=120"
877 .br
878 If (and only if) there is an Email address or program given in the
879 standard config file, then
880 monitor the status of all arrays listed in that file by
881 polling them ever 2 minutes.
882
883 .B " mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hd[ac]1"
884 .br
885 Create /dev/md0 as a RAID1 array consisting of /dev/hda1 and /dev/hdc1.
886
887 .br
888 .B " echo 'DEVICE /dev/hd*[0-9] /dev/sd*[0-9]' > mdadm.conf"
889 .br
890 .B " mdadm --detail --scan >> mdadm.conf"
891 .br
892 This will create a prototype config file that describes currently
893 active arrays that are known to be made from partitions of IDE or SCSI drives.
894 This file should be reviewed before being used as it may
895 contain unwanted detail.
896
897 .B " echo 'DEVICE /dev/hd[a-z] /dev/sd*[a-z]' > mdadm.conf"
898 .br
899 .B " mdadm --examine --scan --config=mdadm.conf >> mdadm.conf"
900 .ber
901 This will find what arrays could be assembled from existign IDE and
902 SCSI whole drives (not partitions) and store the information is the
903 format of a config file.
904 This file is very likely to contain unwanted detail, particularly
905 the
906 .B devices=
907 entries. It should be reviewed and edited before being used as an
908 actual config file.
909
910 .B " mdadm --examine --brief --scan --config=partitions"
911 .br
912 .B " mdadm -Ebsc partitions"
913 .br
914 Create a list of devices by reading
915 .BR /proc/partitions ,
916 scan these for RAID superblocks, and printout a brief listing of all
917 that was found.
918
919 .B " mdadm -Ac partitions -m 0 /dev/md0"
920 .br
921 Scan all partitions and devices listed in
922 .BR /proc/partitions
923 and assemble
924 .B /dev/md0
925 out of all such devices with a RAID superblock with a minor number of 0.
926
927 .B " mdadm --monitor --scan --daemonise > /var/run/mdadm"
928 .br
929 If config file contains a mail address or alert program, run mdadm in
930 the background in monitor mode monitoring all md devices. Also write
931 pid of mdadm daemon to
932 .BR /var/run/mdadm .
933
934 .B " mdadm --create --help"
935 .br
936 Providew help about the Create mode.
937
938 .B " mdadm --config --help"
939 .br
940 Provide help about the format of the config file.
941
942 .B " mdadm --help"
943 .br
944 Provide general help.
945
946
947 .SH FILES
948
949 .SS /proc/mdstat
950
951 If you're using the
952 .B /proc
953 filesystem,
954 .B /proc/mdstat
955 lists all active md devices with information about them.
956 .B mdadm
957 uses this to find arrays when
958 .B --scan
959 is given in Misc mode, and to monitor array reconstruction
960 on Monitor mode.
961
962
963 .SS /etc/mdadm.conf
964
965 The config file lists which devices may be scanned to see if
966 they contain MD super block, and gives identifying information
967 (e.g. UUID) about known MD arrays. See
968 .BR mdadm.conf (5)
969 for more details.
970
971
972 .SH NOTE
973 .B mdadm
974 was previously known as
975 .BR mdctl .
976
977 .SH SEE ALSO
978 For information on the various levels of
979 RAID, check out:
980
981 .IP
982 .UR http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/
983 http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/
984 .UE
985 .PP
986 for new releases of the RAID driver check out:
987
988 .IP
989 .UR ftp://ftp.kernel.org/pub/linux/kernel/people/mingo/raid-patches
990 ftp://ftp.kernel.org/pub/linux/kernel/people/mingo/raid-patches
991 .UE
992 .PP
993 or
994 .IP
995 .UR http://www.cse.unsw.edu.au/~neilb/patches/linux-stable/
996 http://www.cse.unsw.edu.au/~neilb/patches/linux-stable/
997 .URk
998 .PP
999 .BR mdadm.conf (5),
1000 .BR md (4).
1001 .PP
1002 .IR raidtab (5),
1003 .IR raid0run (8),
1004 .IR raidstop (8),
1005 .IR mkraid (8)