]> git.ipfire.org Git - thirdparty/mdadm.git/blame - mdadm.conf.5
mdadm-1.0.1
[thirdparty/mdadm.git] / mdadm.conf.5
CommitLineData
56eb10c0
NB
1.TH MDADM.CONF 5
2.SH NAME
3mdadm.conf \- configuration for management of Software Raid with mdadm
4.SH SYNOPSIS
5/etc/mdadm.conf
6.SH DESCRIPTION
7.PP
8.B mdadm
11a3e71d 9is a tool for creating, managing, and monitoring RAID devices using the
56eb10c0
NB
10.B md
11driver in Linux.
12.PP
13Some common tasks, such as assembling all arrays, can be simplified
2d465520 14by describing the devices and arrays in this configuration file.
56eb10c0
NB
15
16.SS SYNTAX
17The file should be seen as a collection of words separated by white
18space (space, tab, or newline).
11a3e71d 19Any word that beings with a hash sign (#) starts a comment and that
2d465520 20word together with the remainder of the line is ignored.
56eb10c0 21
2d465520 22Any line that starts with white space (space or tab) is treated as
56eb10c0
NB
23though it were a continuation of the previous line.
24
25Empty lines are ignored, but otherwise each (non continuation) line
2d465520 26must start with a keyword as listed below. The keywords are case
e0d19036 27insensitive and can be abbreviated to 3 characters.
56eb10c0
NB
28
29The keywords are:
30.TP
31.B DEVICE
32A
33.B device
34line lists the devices (whole devices or partitions) that might contain
35a component of an MD array. When looking for the components of an
36array,
37.B mdadm
2d465520 38will scan these devices (or any devices listed on the command line).
56eb10c0
NB
39
40The
41.B device
42line may contain a number of different devices (separated by spaces)
43and each device name can contain wild cards as defined by
44.BR glob (7).
45
46Also, there may be several device lines present in the file.
47
11a3e71d
NB
48For example:
49.IP
50DEVICE /dev/hda* /dev/hdc*
51.br
52DEV /dev/sd*
53.br
54DEVICE /dev/discs/disc*/disc
55
56eb10c0
NB
56.TP
57.B ARRAY
11a3e71d
NB
58The ARRAY lines identify actual arrays. The second word on the line
59should be the name of the device where the array is normally
60assembled, such as
61.BR /dev/md1 .
e0d19036
NB
62Subsequent words identify the array, or identify the array as a member
63of a group. If multiple identities are given,
2d465520
NB
64then a component device must match ALL identities to be considered a
65match. Each identity word has a tag, and equals sign, and some value.
66The tags are:
11a3e71d
NB
67
68.RS 4
69.TP
70.B uuid=
71The value should be a 128 bit uuid in hexadecimal, with punctuation
72interspersed if desired. This must match the uuid stored in the
73superblock.
74.TP
75.B super-minor=
76The value is an integer which indicates the minor number that was
77stored in the superblock when the array was created. When an array is
78created as /dev/mdX, then the minor number X is stored.
79.TP
80.B devices=
81The value is a comma separated list of device names. Precisely these
82devices will be used to assemble the array. Note that the devices
83listed there must also be listed on a DEVICE line.
84.TP
85.B level=
86The value is a raid level. This is not normally used to
87identify an array, but is supported so that the output of
88
89.B "mdadm --examine --scan"
90
91can be use directly in the configuration file.
92.TP
b83d95f3
NB
93.B num-devices=
94The value is the number of devices in a complete active array. As with
11a3e71d
NB
95.B level=
96this is mainly for compatibility with the output of
56eb10c0 97
11a3e71d 98.BR "mdadm --examine --scan" .
e0d19036
NB
99
100.TP
101.B spare-group=
102The value is a textual name for a group of arrays. All arrays with
103the same
104.B spare-group
105name are considered to be part of the same group. The significance of
106a group of arrays is that
107.B mdadm
108will, when monitoring the arrays, move a spare drive from one array in
109a group to another array in that group if the first array had a failed
110or missing drive but no spare.
11a3e71d 111.RE
e0d19036
NB
112
113.TP
114.B MAILADDR
115The
116.B mailaddr
117line gives an E-mail address that alerts should be
118sent to when
119.M mdadm
120is running in
121.B --monitor
122mode (and was given the
123.B --scan
124option). There should only be one
125.B MAILADDR
126line and it should have only one address.
127
128
129.TP
130.B PROGRAM
131The
132.B program
133line gives the name of a program to be run when
134.B "mdadm --monitor"
135detects potentially interesting events on any of the arrays that it
136is monitoring. This program gets run with two or three arguments, they
137being the Event, the md device, and possibly the related component
138device.
139
140There should only be one
141.B program
142line and it should be give only one program.
143
2d465520
NB
144.SH EXAMPLE
145DEVICE /dev/sd[bcdjkl]1
146.br
147DEVICE /dev/hda1 /dev/hdb1
148
149# /dev/md0 is known by it's UID.
150.br
151ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
152.br
153# /dev/md1 contains all devices with a minor number of
154.br
155# 1 in the superblock.
156.br
157ARRAY /dev/md1 superminor=1
158.br
159# /dev/md2 is made from precisey these two devices
160.br
161ARRAY /dev/md2 devices=/dev/hda1,/dev/hda2
162
163# /dev/md4 and /dev/md5 are a spare-group and spares
164.br
165# can be moved between them
166.br
167ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df
168.br
169 spare-group=group1
170.br
171ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977
172.br
173 spare-group=group1
174
175MAILADDR root@mydomain.tld
176.br
177PROGRAM /usr/sbin/handle-mdadm-events
178
e0d19036 179
56eb10c0 180.SH SEE ALSO
11a3e71d
NB
181.BR mdadm (8),
182.BR md (4).
56eb10c0 183