[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[ec9b2d7] | 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 |
|
---|
[8dfc5c3] | 7 | <!ENTITY mdadm-download-http "&kernel-dl;/linux/utils/raid/mdadm/mdadm-&mdadm-version;.tar.xz">
|
---|
[ec9b2d7] | 8 | <!ENTITY mdadm-download-ftp " ">
|
---|
[a13351b] | 9 | <!ENTITY mdadm-md5sum "a42def84e31734a529111394f2289e0e">
|
---|
| 10 | <!ENTITY mdadm-size "456 KB">
|
---|
| 11 | <!ENTITY mdadm-buildsize "5.5 MB">
|
---|
[bcccddd] | 12 | <!ENTITY mdadm-time "0.1 SBU">
|
---|
| 13 | <!-- <!ENTITY mdadm-time "0.1 SBU (tests take about an hour, only partially processor dependent)">-->
|
---|
[ec9b2d7] | 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 |
|
---|
[29244b7] | 29 | <para>
|
---|
| 30 | The <application>mdadm</application> package contains administration
|
---|
| 31 | tools for software RAID.
|
---|
| 32 | </para>
|
---|
[ec9b2d7] | 33 |
|
---|
[4c0efc3c] | 34 | &lfs122_checked;
|
---|
[ec9b2d7] | 35 |
|
---|
| 36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem>
|
---|
[29244b7] | 39 | <para>
|
---|
| 40 | Download (HTTP): <ulink url="&mdadm-download-http;"/>
|
---|
| 41 | </para>
|
---|
[ec9b2d7] | 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
[29244b7] | 44 | <para>
|
---|
| 45 | Download (FTP): <ulink url="&mdadm-download-ftp;"/>
|
---|
| 46 | </para>
|
---|
[ec9b2d7] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[29244b7] | 49 | <para>
|
---|
| 50 | Download MD5 sum: &mdadm-md5sum;
|
---|
| 51 | </para>
|
---|
[ec9b2d7] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[29244b7] | 54 | <para>
|
---|
| 55 | Download size: &mdadm-size;
|
---|
| 56 | </para>
|
---|
[ec9b2d7] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[29244b7] | 59 | <para>
|
---|
| 60 | Estimated disk space required: &mdadm-buildsize;
|
---|
| 61 | </para>
|
---|
[ec9b2d7] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[29244b7] | 64 | <para>
|
---|
| 65 | Estimated build time: &mdadm-time;
|
---|
| 66 | </para>
|
---|
[ec9b2d7] | 67 | </listitem>
|
---|
| 68 | </itemizedlist>
|
---|
[8126c5d] | 69 |
|
---|
| 70 | <bridgehead renderas="sect3">mdadm Dependencies</bridgehead>
|
---|
| 71 |
|
---|
| 72 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 73 | <para role="optional">
|
---|
[cf063edb] | 74 | An <xref linkend="server-mail"/>
|
---|
[8126c5d] | 75 | </para>
|
---|
[4304a5f] | 76 | <!-- Contains -D Sendmail=/usr/sbin/sendmail in the build procedure -->
|
---|
[ec9b2d7] | 77 |
|
---|
[a13351b] | 78 | <!-- I don't think we need this any more... We are now at kernel 6.7.8. - bdubbs
|
---|
[4b92d8d] | 79 | <caution>
|
---|
[09765cf] | 80 | <para>
|
---|
[4b92d8d] | 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.
|
---|
[09765cf] | 83 | </para>
|
---|
[4b92d8d] | 84 | </caution>
|
---|
[a13351b] | 85 | -->
|
---|
[ec9b2d7] | 86 |
|
---|
| 87 | </sect2>
|
---|
| 88 |
|
---|
| 89 | <sect2 role="kernel" id='mdadm-kernel'>
|
---|
| 90 | <title>Kernel Configuration</title>
|
---|
| 91 |
|
---|
[29244b7] | 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>
|
---|
[ec9b2d7] | 97 |
|
---|
[d67d543] | 98 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 99 | href="mdadm-kernel.xml"/>
|
---|
[ec9b2d7] | 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>
|
---|
[bcccddd] | 109 | <!--
|
---|
[29244b7] | 110 | <para>
|
---|
| 111 | Fix a build error introduced by gcc-7.1:
|
---|
| 112 | </para>
|
---|
[4d0c38b] | 113 |
|
---|
| 114 | <screen><userinput>sed 's@-Werror@@' -i Makefile</userinput></screen>
|
---|
[bcccddd] | 115 | -->
|
---|
[29244b7] | 116 | <para>
|
---|
| 117 | Build <application>mdadm</application> by running the following
|
---|
| 118 | command:
|
---|
| 119 | </para>
|
---|
[ec9b2d7] | 120 |
|
---|
[b15359cd] | 121 | <screen><userinput>make</userinput></screen>
|
---|
[ec9b2d7] | 122 |
|
---|
[bcccddd] | 123 | <para>
|
---|
[b9c353b] | 124 | This package does not come with a working test suite.
|
---|
[bcccddd] | 125 | </para>
|
---|
| 126 |
|
---|
| 127 | <!--
|
---|
[ecd2f87a] | 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 |
|
---|
[bcccddd] | 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 |
|
---|
[29244b7] | 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>
|
---|
[4b92d8d] | 148 |
|
---|
[29244b7] | 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>
|
---|
[fd29f76] | 155 |
|
---|
[29244b7] | 156 | <para>
|
---|
| 157 | Run the tests as the <systemitem class="username">root</systemitem> user:
|
---|
| 158 | </para>
|
---|
[4b92d8d] | 159 |
|
---|
[06908bf6] | 160 | <screen role="root"
|
---|
[bcccddd] | 161 | remap="test"><userinput>./test - -keep-going - -logdir=test-logs - -save-logs</userinput></screen>
|
---|
| 162 | -->
|
---|
[29244b7] | 163 | <para>
|
---|
| 164 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 165 | </para>
|
---|
[ec9b2d7] | 166 |
|
---|
[0ea195f4] | 167 | <screen role="root"><userinput>make BINDIR=/usr/sbin install</userinput></screen>
|
---|
[ec9b2d7] | 168 |
|
---|
| 169 | </sect2>
|
---|
| 170 |
|
---|
[b6d51d20] | 171 | <sect2 role="commands">
|
---|
| 172 | <title>Command Explanations</title>
|
---|
| 173 |
|
---|
[a0e6e8dd] | 174 | <para>
|
---|
| 175 | <command>make everything</command>: This optional target creates extra
|
---|
| 176 | programs, particularly a statically-linked version of
|
---|
[12a6d32] | 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.
|
---|
[a0e6e8dd] | 180 | </para>
|
---|
[875b3b57] | 181 | <!-- Tests are not run anymore
|
---|
[a0e6e8dd] | 182 | <para>
|
---|
[875b3b57] | 183 | <parameter>- -keep-going</parameter>: Run the tests to the end, even if one
|
---|
[a0e6e8dd] | 184 | or more tests fail.
|
---|
| 185 | </para>
|
---|
| 186 |
|
---|
| 187 | <para>
|
---|
[875b3b57] | 188 | <parameter>- -logdir=test-logs</parameter>: Defines the directory
|
---|
[4b92d8d] | 189 | where test logs are saved.
|
---|
[a0e6e8dd] | 190 | </para>
|
---|
| 191 |
|
---|
| 192 | <para>
|
---|
[875b3b57] | 193 | <parameter>- -save-logs</parameter>:
|
---|
[a0e6e8dd] | 194 | Instructs the test suite to save the logs.
|
---|
| 195 | </para>
|
---|
| 196 |
|
---|
| 197 | <para>
|
---|
[875b3b57] | 198 | <option>- -tests=<replaceable><test1,test2,...></replaceable></option>:
|
---|
[a0e6e8dd] | 199 | Optional comma separated list of tests to be executed
|
---|
| 200 | (all tests, if this option is not passed).
|
---|
[b6d51d20] | 201 | </para>
|
---|
[875b3b57] | 202 | -->
|
---|
[b6d51d20] | 203 | </sect2>
|
---|
| 204 |
|
---|
| 205 |
|
---|
[ec9b2d7] | 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>
|
---|
[12a6d32] | 215 | <seg>mdadm and mdmon <!--and optionally mdassemble--></seg>
|
---|
[ec9b2d7] | 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>
|
---|
[29244b7] | 229 | <para>
|
---|
[4c24eb0a] | 230 | manages MD devices aka Linux Software RAID
|
---|
[29244b7] | 231 | </para>
|
---|
[ec9b2d7] | 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>
|
---|
[29244b7] | 241 | <para>
|
---|
[4c24eb0a] | 242 | monitors MD external metadata arrays
|
---|
[29244b7] | 243 | </para>
|
---|
[ec9b2d7] | 244 | <indexterm zone="mdadm mdmon">
|
---|
| 245 | <primary sortas="b-mdmon">mdmon</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 |
|
---|
[12a6d32] | 250 | <!-- Seems to be removed without a trace in 4.1
|
---|
[b6d51d20] | 251 | <varlistentry id="mdassemble">
|
---|
| 252 | <term><command>mdassemble</command></term>
|
---|
| 253 | <listitem>
|
---|
[29244b7] | 254 | <para>
|
---|
| 255 | is a tiny program that can be used to assemble MD devices
|
---|
[4c24eb0a] | 256 | inside an initial ramdisk (initrd) or initramfs
|
---|
[29244b7] | 257 | </para>
|
---|
[b6d51d20] | 258 | <indexterm zone="mdadm mdassemble">
|
---|
| 259 | <primary sortas="b-mdassemble">mdassemble</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
| 262 | </varlistentry>
|
---|
[12a6d32] | 263 | -->
|
---|
[b6d51d20] | 264 |
|
---|
[ec9b2d7] | 265 | </variablelist>
|
---|
| 266 |
|
---|
| 267 | </sect2>
|
---|
| 268 |
|
---|
| 269 | </sect1>
|
---|