1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY mdadm-download-http "&kernel-dl;/linux/utils/raid/mdadm/mdadm-&mdadm-version;.tar.xz">
|
---|
8 | <!ENTITY mdadm-download-ftp " ">
|
---|
9 | <!ENTITY mdadm-md5sum "a42def84e31734a529111394f2289e0e">
|
---|
10 | <!ENTITY mdadm-size "456 KB">
|
---|
11 | <!ENTITY mdadm-buildsize "5.5 MB">
|
---|
12 | <!ENTITY mdadm-time "0.1 SBU">
|
---|
13 | <!-- <!ENTITY mdadm-time "0.1 SBU (tests take about an hour, only partially processor dependent)">-->
|
---|
14 | ]>
|
---|
15 |
|
---|
16 | <sect1 id="mdadm" xreflabel="mdadm-&mdadm-version;">
|
---|
17 | <?dbhtml filename="mdadm.html"?>
|
---|
18 |
|
---|
19 |
|
---|
20 | <title>mdadm-&mdadm-version;</title>
|
---|
21 |
|
---|
22 | <indexterm zone="mdadm">
|
---|
23 | <primary sortas="a-mdadm">mdadm</primary>
|
---|
24 | </indexterm>
|
---|
25 |
|
---|
26 | <sect2 role="package">
|
---|
27 | <title>Introduction to mdadm</title>
|
---|
28 |
|
---|
29 | <para>
|
---|
30 | The <application>mdadm</application> package contains administration
|
---|
31 | tools for software RAID.
|
---|
32 | </para>
|
---|
33 |
|
---|
34 | &lfs122_checked;
|
---|
35 |
|
---|
36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
37 | <itemizedlist spacing="compact">
|
---|
38 | <listitem>
|
---|
39 | <para>
|
---|
40 | Download (HTTP): <ulink url="&mdadm-download-http;"/>
|
---|
41 | </para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>
|
---|
45 | Download (FTP): <ulink url="&mdadm-download-ftp;"/>
|
---|
46 | </para>
|
---|
47 | </listitem>
|
---|
48 | <listitem>
|
---|
49 | <para>
|
---|
50 | Download MD5 sum: &mdadm-md5sum;
|
---|
51 | </para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>
|
---|
55 | Download size: &mdadm-size;
|
---|
56 | </para>
|
---|
57 | </listitem>
|
---|
58 | <listitem>
|
---|
59 | <para>
|
---|
60 | Estimated disk space required: &mdadm-buildsize;
|
---|
61 | </para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>
|
---|
65 | Estimated build time: &mdadm-time;
|
---|
66 | </para>
|
---|
67 | </listitem>
|
---|
68 | </itemizedlist>
|
---|
69 |
|
---|
70 | <bridgehead renderas="sect3">mdadm Dependencies</bridgehead>
|
---|
71 |
|
---|
72 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
73 | <para role="optional">
|
---|
74 | An <xref linkend="server-mail"/>
|
---|
75 | </para>
|
---|
76 | <!-- Contains -D Sendmail=/usr/sbin/sendmail in the build procedure -->
|
---|
77 |
|
---|
78 | <!-- I don't think we need this any more... We are now at kernel 6.7.8. - bdubbs
|
---|
79 | <caution>
|
---|
80 | <para>
|
---|
81 | Kernel versions in series 4.1 through 4.4.1 have a broken RAID
|
---|
82 | implementation. Use a kernel with version at or above 4.4.2.
|
---|
83 | </para>
|
---|
84 | </caution>
|
---|
85 | -->
|
---|
86 |
|
---|
87 | </sect2>
|
---|
88 |
|
---|
89 | <sect2 role="kernel" id='mdadm-kernel'>
|
---|
90 | <title>Kernel Configuration</title>
|
---|
91 |
|
---|
92 | <para>
|
---|
93 | Enable the following options in the kernel configuration
|
---|
94 | and recompile the kernel, if necessary. Only the RAID types desired
|
---|
95 | are required.
|
---|
96 | </para>
|
---|
97 |
|
---|
98 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
99 | href="mdadm-kernel.xml"/>
|
---|
100 |
|
---|
101 | <indexterm zone="mdadm mdadm-kernel">
|
---|
102 | <primary sortas="d-mdadm">mdadm</primary>
|
---|
103 | </indexterm>
|
---|
104 |
|
---|
105 | </sect2>
|
---|
106 |
|
---|
107 | <sect2 role="installation">
|
---|
108 | <title>Installation of mdadm</title>
|
---|
109 | <!--
|
---|
110 | <para>
|
---|
111 | Fix a build error introduced by gcc-7.1:
|
---|
112 | </para>
|
---|
113 |
|
---|
114 | <screen><userinput>sed 's@-Werror@@' -i Makefile</userinput></screen>
|
---|
115 | -->
|
---|
116 | <para>
|
---|
117 | Build <application>mdadm</application> by running the following
|
---|
118 | command:
|
---|
119 | </para>
|
---|
120 |
|
---|
121 | <screen><userinput>make</userinput></screen>
|
---|
122 |
|
---|
123 | <para>
|
---|
124 | This package does not come with a working test suite.
|
---|
125 | </para>
|
---|
126 |
|
---|
127 | <!--
|
---|
128 | Still lots of errors with mdadm-4.3. There are a lot of messages
|
---|
129 | like (KNOWN BROKEN TEST: usually fails). Finally stopped after
|
---|
130 | 15 minutes with /build/mdadm-test/mdadm-4.3/tests/10ddf-geometry...
|
---|
131 | ERROR: dmesg prints errors when testing 10ddf-geometry!
|
---|
132 | kern.log shows segfaults.
|
---|
133 | - bdubbs 3 March 24
|
---|
134 |
|
---|
135 | The test suite errors out after about half the tests are run.
|
---|
136 | Of those tests, about half fail.
|
---|
137 | There are tests that indicate failure when the test is clearly wrong
|
---|
138 | for the current code.
|
---|
139 | I asked about it at linux-raid@vger.kernel.org, but did not get
|
---|
140 | a responsive answer.
|
---|
141 | - bdubbs 6 January 22
|
---|
142 |
|
---|
143 | <para>
|
---|
144 | If you wish to run the tests, ensure that your kernel supports RAID
|
---|
145 | and that a version of mdadm is not already running. As many as 9 out
|
---|
146 | of 124 tests may fail.
|
---|
147 | </para>
|
---|
148 |
|
---|
149 | <caution>
|
---|
150 | <para>
|
---|
151 | The tests edit values in /proc and run tests on software raid devices.
|
---|
152 | They shouldn't be run on systems with active software RAID devices.
|
---|
153 | </para>
|
---|
154 | </caution>
|
---|
155 |
|
---|
156 | <para>
|
---|
157 | Run the tests as the <systemitem class="username">root</systemitem> user:
|
---|
158 | </para>
|
---|
159 |
|
---|
160 | <screen role="root"
|
---|
161 | remap="test"><userinput>./test - -keep-going - -logdir=test-logs - -save-logs</userinput></screen>
|
---|
162 | -->
|
---|
163 | <para>
|
---|
164 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
165 | </para>
|
---|
166 |
|
---|
167 | <screen role="root"><userinput>make BINDIR=/usr/sbin install</userinput></screen>
|
---|
168 |
|
---|
169 | </sect2>
|
---|
170 |
|
---|
171 | <sect2 role="commands">
|
---|
172 | <title>Command Explanations</title>
|
---|
173 |
|
---|
174 | <para>
|
---|
175 | <command>make everything</command>: This optional target creates extra
|
---|
176 | programs, particularly a statically-linked version of
|
---|
177 | <command>mdadm</command>. <!-- and also versions of
|
---|
178 | <command>mdassemble</command>. These all need to be manually installed.-->
|
---|
179 | This needs to be manually installed.
|
---|
180 | </para>
|
---|
181 | <!-- Tests are not run anymore
|
---|
182 | <para>
|
---|
183 | <parameter>- -keep-going</parameter>: Run the tests to the end, even if one
|
---|
184 | or more tests fail.
|
---|
185 | </para>
|
---|
186 |
|
---|
187 | <para>
|
---|
188 | <parameter>- -logdir=test-logs</parameter>: Defines the directory
|
---|
189 | where test logs are saved.
|
---|
190 | </para>
|
---|
191 |
|
---|
192 | <para>
|
---|
193 | <parameter>- -save-logs</parameter>:
|
---|
194 | Instructs the test suite to save the logs.
|
---|
195 | </para>
|
---|
196 |
|
---|
197 | <para>
|
---|
198 | <option>- -tests=<replaceable><test1,test2,...></replaceable></option>:
|
---|
199 | Optional comma separated list of tests to be executed
|
---|
200 | (all tests, if this option is not passed).
|
---|
201 | </para>
|
---|
202 | -->
|
---|
203 | </sect2>
|
---|
204 |
|
---|
205 |
|
---|
206 | <sect2 role="content">
|
---|
207 | <title>Contents</title>
|
---|
208 |
|
---|
209 | <segmentedlist>
|
---|
210 | <segtitle>Installed Programs</segtitle>
|
---|
211 | <segtitle>Installed Libraries</segtitle>
|
---|
212 | <segtitle>Installed Directory</segtitle>
|
---|
213 |
|
---|
214 | <seglistitem>
|
---|
215 | <seg>mdadm and mdmon <!--and optionally mdassemble--></seg>
|
---|
216 | <seg>None</seg>
|
---|
217 | <seg>None</seg>
|
---|
218 | </seglistitem>
|
---|
219 | </segmentedlist>
|
---|
220 |
|
---|
221 | <variablelist>
|
---|
222 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
223 | <?dbfo list-presentation="list"?>
|
---|
224 | <?dbhtml list-presentation="table"?>
|
---|
225 |
|
---|
226 | <varlistentry id="mdadm-prog">
|
---|
227 | <term><command>mdadm</command></term>
|
---|
228 | <listitem>
|
---|
229 | <para>
|
---|
230 | manages MD devices aka Linux Software RAID
|
---|
231 | </para>
|
---|
232 | <indexterm zone="mdadm mdadm-prog">
|
---|
233 | <primary sortas="b-mdadm-prog">mdadm</primary>
|
---|
234 | </indexterm>
|
---|
235 | </listitem>
|
---|
236 | </varlistentry>
|
---|
237 |
|
---|
238 | <varlistentry id="mdmon">
|
---|
239 | <term><command>mdmon</command></term>
|
---|
240 | <listitem>
|
---|
241 | <para>
|
---|
242 | monitors MD external metadata arrays
|
---|
243 | </para>
|
---|
244 | <indexterm zone="mdadm mdmon">
|
---|
245 | <primary sortas="b-mdmon">mdmon</primary>
|
---|
246 | </indexterm>
|
---|
247 | </listitem>
|
---|
248 | </varlistentry>
|
---|
249 |
|
---|
250 | <!-- Seems to be removed without a trace in 4.1
|
---|
251 | <varlistentry id="mdassemble">
|
---|
252 | <term><command>mdassemble</command></term>
|
---|
253 | <listitem>
|
---|
254 | <para>
|
---|
255 | is a tiny program that can be used to assemble MD devices
|
---|
256 | inside an initial ramdisk (initrd) or initramfs
|
---|
257 | </para>
|
---|
258 | <indexterm zone="mdadm mdassemble">
|
---|
259 | <primary sortas="b-mdassemble">mdassemble</primary>
|
---|
260 | </indexterm>
|
---|
261 | </listitem>
|
---|
262 | </varlistentry>
|
---|
263 | -->
|
---|
264 |
|
---|
265 | </variablelist>
|
---|
266 |
|
---|
267 | </sect2>
|
---|
268 |
|
---|
269 | </sect1>
|
---|