diff options
Diffstat (limited to 'mdadm.8.in')
-rw-r--r-- | mdadm.8.in | 226 |
1 files changed, 55 insertions, 171 deletions
@@ -48,11 +48,12 @@ multiple devices: each device is a path to one common physical storage device. New installations should not use md/multipath as it is not well supported and has no ongoing development. Use the Device Mapper based -multipath-tools instead. +multipath-tools instead. It is deprecated and support will be removed in the future. .B FAULTY is also not true RAID, and it only involves one device. It -provides a layer over a true device that can be used to inject faults. +provides a layer over a true device that can be used to inject faults. It is deprecated +and support will be removed in the future. .B CONTAINER is different again. A @@ -354,7 +355,7 @@ preferred 1.x format). 'if '{DEFAULT_METADATA}'1.2' "default" is equivalent to "1.2". .IP ddf Use the "Industry Standard" DDF (Disk Data Format) format defined by -SNIA. +SNIA. DDF is deprecated and there is no active development around it. When creating a DDF array a .B CONTAINER will be created, and normal arrays can be created in that container. @@ -443,8 +444,7 @@ multipath, RAID0 and RAID1. It is never allowed for RAID4, RAID5 or RAID6. .br This number can only be changed using .B \-\-grow -for RAID1, RAID4, RAID5 and RAID6 arrays, and only on kernels which provide -the necessary support. +for RAID1, RAID4, RAID5 and RAID6 arrays. .TP .BR \-x ", " \-\-spare\-devices= @@ -563,8 +563,7 @@ component will be rounded down to a multiple of this size. This is a synonym for .B \-\-chunk but highlights the different meaning for Linear as compared to other -RAID levels. The default is 64K if a kernel earlier than 2.6.16 is in -use, and is 0K (i.e. no rounding) in later kernels. +RAID levels. The default is 0K (i.e. no rounding). .TP .BR \-l ", " \-\-level= @@ -829,7 +828,7 @@ facts the operator knows. When an array is resized to a larger size with .B "\-\-grow \-\-size=" the new space is normally resynced in that same way that the whole -array is resynced at creation. From Linux version 3.0, +array is resynced at creation. .B \-\-assume\-clean can be used with that command to avoid the automatic resync. @@ -837,8 +836,7 @@ can be used with that command to avoid the automatic resync. .BR \-\-write-zeroes When creating an array, send write zeroes requests to all the block devices. This should zero the data area on all disks such that the -initial sync is not necessary and, if successfull, will behave -as if +initial sync is not necessary and, if successful, will behave as if .B \-\-assume\-clean was specified. .IP @@ -875,7 +873,6 @@ Setting the offset explicitly over-rides the default. The value given is in Kilobytes unless a suffix of 'K', 'M', 'G' or 'T' is used to explicitly indicate Kilobytes, Megabytes, Gigabytes or Terabytes respectively. -Since Linux 3.4, .B \-\-data\-offset can also be used with .B --grow @@ -969,63 +966,6 @@ array, and no resync, recovery, or reshape will be started. It works with Create, Assemble, Manage and Misc mode. .TP -.BR \-a ", " "\-\-auto{=yes,md,mdp,part,p}{NN}" -Instruct mdadm how to create the device file if needed, possibly allocating -an unused minor number. "md" causes a non-partitionable array -to be used (though since Linux 2.6.28, these array devices are in fact -partitionable). "mdp", "part" or "p" causes a partitionable array (2.6 and -later) to be used. "yes" requires the named md device to have -a 'standard' format, and the type and minor number will be determined -from this. With mdadm 3.0, device creation is normally left up to -.I udev -so this option is unlikely to be needed. -See DEVICE NAMES below. - -The argument can also come immediately after -"\-a". e.g. "\-ap". - -If -.B \-\-auto -is not given on the command line or in the config file, then -the default will be -.BR \-\-auto=yes . - -If -.B \-\-scan -is also given, then any -.I auto= -entries in the config file will override the -.B \-\-auto -instruction given on the command line. - -For partitionable arrays, -.I mdadm -will create the device file for the whole array and for the first 4 -partitions. A different number of partitions can be specified at the -end of this option (e.g. -.BR \-\-auto=p7 ). -If the device name ends with a digit, the partition names add a 'p', -and a number, e.g. -.IR /dev/md/home1p3 . -If there is no trailing digit, then the partition names just have a -number added, e.g. -.IR /dev/md/scratch3 . - -If the md device name is in a 'standard' format as described in DEVICE -NAMES, then it will be created, if necessary, with the appropriate -device number based on that name. If the device name is not in one of these -formats, then an unused device number will be allocated. The device -number will be considered unused if there is no active array for that -number, and there is no entry in /dev for that number and with a -non-standard name. Names that are not in 'standard' format are only -allowed in "/dev/md/". - -This is meaningful with -.B \-\-create -or -.BR \-\-build . - -.TP .BR \-a ", " "\-\-add" This option can be used in Grow mode in two cases. @@ -1169,10 +1109,6 @@ and can be used if the physical connections to devices are not as reliable as you would like. .TP -.BR \-a ", " "\-\-auto{=no,yes,md,mdp,part}" -See this option under Create and Build options. - -.TP .BR \-b ", " \-\-bitmap= Specify the bitmap file that was given when the array was created. If an array has an @@ -1206,7 +1142,6 @@ backup file. .BR \-U ", " \-\-update= Update the superblock on each device while assembling the array. The argument given to this flag can be one of -.BR sparc2.2 , .BR summaries , .BR uuid , .BR name , @@ -1229,16 +1164,6 @@ or .BR super\-minor . The -.B sparc2.2 -option will adjust the superblock of an array what was created on a Sparc -machine running a patched 2.2 Linux kernel. This kernel got the -alignment of part of the superblock wrong. You can use the -.B "\-\-examine \-\-sparc2.2" -option to -.I mdadm -to see what effect this would have. - -The .B super\-minor option will update the .B "preferred minor" @@ -1251,7 +1176,7 @@ reports a different "Preferred Minor" to In some cases this update will be performed automatically by the kernel driver. In particular, the update happens automatically at the first write to an array with redundancy (RAID level 1 or -greater) on a 2.6 (or later) kernel. +greater). The .B uuid @@ -1686,18 +1611,6 @@ and applies to devices which are components of an array, while .B \-\-detail applies to a whole array which is currently active. -.TP -.B \-\-sparc2.2 -If an array was created on a SPARC machine with a 2.2 Linux kernel -patched with RAID support, the superblock will have been created -incorrectly, or at least incompatibly with 2.4 and later kernels. -Using the -.B \-\-sparc2.2 -flag with -.B \-\-examine -will fix the superblock before displaying it. If this appears to do -the right thing, then the array can be successfully assembled using -.BR "\-\-assemble \-\-update=sparc2.2" . .TP .BR \-X ", " \-\-examine\-bitmap @@ -1830,6 +1743,16 @@ can be found it under .BR "SCRUBBING AND MISMATCHES" . +.TP +.B \-\-udev\-rules= +it generates the udev rules to the file that handles hot-plug bare devices. +Given the POLICYs defined under +.IR {CONFFILE}\ (or {CONFFILE2}) + +See +.BR mdadm.conf (5) +for more details and usage examples about POLICY. + .SH For Incremental Assembly mode: .TP .BR \-\-rebuild\-map ", " \-r @@ -1878,11 +1801,15 @@ script. .SH For Monitor mode: .TP .BR \-m ", " \-\-mail -Give a mail address to send alerts to. +Give an mail address to send alerts to. Can be configured in +.B mdadm.conf +as MAILADDR. .TP .BR \-p ", " \-\-program ", " \-\-alert -Give a program to be run whenever an event is detected. +Give a program to be run whenever an event is detected. Can be configured in +.B mdadm.conf +as PROGRAM. .TP .BR \-y ", " \-\-syslog @@ -1891,13 +1818,12 @@ facility of 'daemon' and varying priorities. .TP .BR \-d ", " \-\-delay -Give a delay in seconds. -.I mdadm -polls the md arrays and then waits this many seconds before polling -again. The default is 60 seconds. Since 2.6.16, there is no need to -reduce this as the kernel alerts +Give a delay in seconds. The default is 60 seconds. .I mdadm -immediately when there is any change. +polls the md arrays and then waits this many seconds before polling again if no event happened. +Can be configured in +.B mdadm.conf +as MONITORDELAY. .TP .BR \-r ", " \-\-increment @@ -2050,33 +1976,6 @@ detects that udev is not configured, it will create the devices in .B /dev itself. -In Linux kernels prior to version 2.6.28 there were two distinct -types of md devices that could be created: one that could be -partitioned using standard partitioning tools and one that could not. -Since 2.6.28 that distinction is no longer relevant as both types of -devices can be partitioned. -.I mdadm -will normally create the type that originally could not be partitioned -as it has a well-defined major number (9). - -Prior to 2.6.28, it is important that mdadm chooses the correct type -of array device to use. This can be controlled with the -.B \-\-auto -option. In particular, a value of "mdp" or "part" or "p" tells mdadm -to use a partitionable device rather than the default. - -In the no-udev case, the value given to -.B \-\-auto -can be suffixed by a number. This tells -.I mdadm -to create that number of partition devices rather than the default of 4. - -The value given to -.B \-\-auto -can also be given in the configuration file as a word starting -.B auto= -on the ARRAY line for the relevant array. - .SS Auto-Assembly When .B \-\-assemble @@ -2595,30 +2494,29 @@ is given, then a .B program or an .B e-mail -address must be specified on the -command line or in the config file. If neither are available, then +address must be specified on the command line or in the config file. If neither are available, then .I mdadm -will not monitor anything. -For devices given directly in command line, without +will not monitor anything. For devices given directly in command line, without .B program or .B email specified, each event is reported to .BR stdout. -Note: For systems where -.If mdadm monitor -is configured via systemd, -.B mdmonitor(mdmonitor.service) -should be configured. The service is designed to be primary solution for array monitoring, -it is configured to work in system wide mode. -It is automatically started and stopped according to current state and types of MD arrays in system. -The service may require additional configuration, like -.B e-mail -or -.B delay. -That should be done in -.B mdadm.conf. +Note: On systems where mdadm monitoring is managed through systemd, the mdmonitor.service +should be present. This service is designed to be the primary solution for array monitoring. +It is configured to operate in system-wide mode. It is initiated by udev when start criteria are +met, e.g. +.B mdadm.conf +exists and necessary configuration parameters are set. +It is kept alive as long as a redundant RAID array is active; it stops otherwise. User should +customize MAILADDR in +.B mdadm.conf +to receive mail notifications. MONITORDELAY, MAILFROM and PROGRAM are optional. See +.BR mdadm.conf (5) +for detailed description of these options. +Use systemctl status mdmonitor.service to verify status or determine if additional configuration +is needed. The different events are: @@ -2774,7 +2672,7 @@ and then follow similar steps as above if a matching spare is found. The GROW mode is used for changing the size or shape of an active array. -During the kernel 2.6 era the following changes were added: +The following changes are supported: .IP \(bu 4 change the "size" attribute for RAID1, RAID4, RAID5 and RAID6. .IP \(bu 4 @@ -2858,14 +2756,12 @@ When the number of devices is increased, any hot spares that are present will be activated immediately. Changing the number of active devices in a RAID5 or RAID6 is much more -effort. Every block in the array will need to be read and written -back to a new location. From 2.6.17, the Linux Kernel is able to -increase the number of devices in a RAID5 safely, including restarting -an interrupted "reshape". From 2.6.31, the Linux Kernel is able to -increase or decrease the number of devices in a RAID5 or RAID6. +effort. Every block in the array will need to be read and written +back to a new location. Linux Kernel is able to increase or decrease +the number of devices in a RAID5 and RAID6 safely, including restarting +an interrupted "reshape". -From 2.6.35, the Linux Kernel is able to convert a RAID0 in to a RAID4 -or RAID5. +The Linux Kernel is able to convert a RAID0 into a RAID4 or RAID5. .I mdadm uses this functionality and the ability to add devices to a RAID4 to allow devices to be added to a RAID0. When @@ -3419,26 +3315,14 @@ Also if the homehost is specified as will only use a suffix if a different array of the same name already exists or is listed in the config file. -The standard names for non-partitioned arrays (the only sort of md -array available in 2.4 and earlier) are of the form +The names for arrays are of the form: .IP .RB /dev/md NN .PP where NN is a number. -The standard names for partitionable arrays (as available from 2.6 -onwards) are of the form: -.IP -.RB /dev/md_d NN -.PP -Partition numbers should be indicated by adding "pMM" to these, thus "/dev/md/d1p2". -.PP -From kernel version 2.6.28 the "non-partitioned array" can actually -be partitioned. So the "md_d\fBNN\fP" -names are no longer needed, and -partitions such as "/dev/md\fBNN\fPp\fBXX\fP" -are possible. + .PP -From kernel version 2.6.29 standard names can be non-numeric following +Names can be non-numeric following the form: .IP .RB /dev/md_ XXX |