[ec9b2d7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 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 " ">
|
---|
[a99fc417] | 9 | <!ENTITY mdadm-md5sum "a304eb0a978ca81045620d06547050a6">
|
---|
[bcccddd] | 10 | <!ENTITY mdadm-size "444 KB">
|
---|
| 11 | <!ENTITY mdadm-buildsize "5.0 MB">
|
---|
| 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 |
|
---|
[2314cd7] | 34 | &lfs120_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">
|
---|
| 74 | A <xref linkend="server-mail"/>
|
---|
| 75 | </para>
|
---|
| 76 | <!-- Contains -DSendmail=/usr/sbin/sendmail in the build procedure -->
|
---|
[ec9b2d7] | 77 |
|
---|
[4b92d8d] | 78 | <caution>
|
---|
[09765cf] | 79 | <para>
|
---|
[4b92d8d] | 80 | Kernel versions in series 4.1 through 4.4.1 have a broken RAID
|
---|
| 81 | implementation. Use a kernel with version at or above 4.4.2.
|
---|
[09765cf] | 82 | </para>
|
---|
[4b92d8d] | 83 | </caution>
|
---|
[ec9b2d7] | 84 |
|
---|
| 85 | </sect2>
|
---|
| 86 |
|
---|
| 87 | <sect2 role="kernel" id='mdadm-kernel'>
|
---|
| 88 | <title>Kernel Configuration</title>
|
---|
| 89 |
|
---|
[29244b7] | 90 | <para>
|
---|
| 91 | Enable the following options in the kernel configuration
|
---|
| 92 | and recompile the kernel, if necessary. Only the RAID types desired
|
---|
| 93 | are required.
|
---|
| 94 | </para>
|
---|
[ec9b2d7] | 95 |
|
---|
[d67d543] | 96 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 97 | href="mdadm-kernel.xml"/>
|
---|
[ec9b2d7] | 98 |
|
---|
| 99 | <indexterm zone="mdadm mdadm-kernel">
|
---|
| 100 | <primary sortas="d-mdadm">mdadm</primary>
|
---|
| 101 | </indexterm>
|
---|
| 102 |
|
---|
| 103 | </sect2>
|
---|
| 104 |
|
---|
| 105 | <sect2 role="installation">
|
---|
| 106 | <title>Installation of mdadm</title>
|
---|
[bcccddd] | 107 | <!--
|
---|
[29244b7] | 108 | <para>
|
---|
| 109 | Fix a build error introduced by gcc-7.1:
|
---|
| 110 | </para>
|
---|
[4d0c38b] | 111 |
|
---|
| 112 | <screen><userinput>sed 's@-Werror@@' -i Makefile</userinput></screen>
|
---|
[bcccddd] | 113 | -->
|
---|
[29244b7] | 114 | <para>
|
---|
| 115 | Build <application>mdadm</application> by running the following
|
---|
| 116 | command:
|
---|
| 117 | </para>
|
---|
[ec9b2d7] | 118 |
|
---|
[b15359cd] | 119 | <screen><userinput>make</userinput></screen>
|
---|
[ec9b2d7] | 120 |
|
---|
[bcccddd] | 121 | <para>
|
---|
[b9c353b] | 122 | This package does not come with a working test suite.
|
---|
[bcccddd] | 123 | </para>
|
---|
| 124 |
|
---|
| 125 | <!--
|
---|
| 126 | The test suite errors out after about half the tests are run.
|
---|
| 127 | Of those tests, about half fail.
|
---|
| 128 | There are tests that indicate failure when the test is clearly wrong
|
---|
| 129 | for the current code.
|
---|
| 130 | I asked about it at linux-raid@vger.kernel.org, but did not get
|
---|
| 131 | a responsive answer.
|
---|
| 132 | - bdubbs 6 January 22
|
---|
| 133 |
|
---|
| 134 |
|
---|
[29244b7] | 135 | <para>
|
---|
| 136 | If you wish to run the tests, ensure that your kernel supports RAID
|
---|
| 137 | and that a version of mdadm is not already running. As many as 9 out
|
---|
| 138 | of 124 tests may fail.
|
---|
| 139 | </para>
|
---|
[4b92d8d] | 140 |
|
---|
[29244b7] | 141 | <caution>
|
---|
| 142 | <para>
|
---|
| 143 | The tests edit values in /proc and run tests on software raid devices.
|
---|
| 144 | They shouldn't be run on systems with active software RAID devices.
|
---|
| 145 | </para>
|
---|
| 146 | </caution>
|
---|
[fd29f76] | 147 |
|
---|
[29244b7] | 148 | <para>
|
---|
| 149 | Run the tests as the <systemitem class="username">root</systemitem> user:
|
---|
| 150 | </para>
|
---|
[4b92d8d] | 151 |
|
---|
[06908bf6] | 152 | <screen role="root"
|
---|
[bcccddd] | 153 | remap="test"><userinput>./test - -keep-going - -logdir=test-logs - -save-logs</userinput></screen>
|
---|
| 154 | -->
|
---|
[29244b7] | 155 | <para>
|
---|
| 156 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 157 | </para>
|
---|
[ec9b2d7] | 158 |
|
---|
[0ea195f4] | 159 | <screen role="root"><userinput>make BINDIR=/usr/sbin install</userinput></screen>
|
---|
[ec9b2d7] | 160 |
|
---|
| 161 | </sect2>
|
---|
| 162 |
|
---|
[b6d51d20] | 163 | <sect2 role="commands">
|
---|
| 164 | <title>Command Explanations</title>
|
---|
| 165 |
|
---|
[a0e6e8dd] | 166 | <para>
|
---|
| 167 | <command>make everything</command>: This optional target creates extra
|
---|
| 168 | programs, particularly a statically-linked version of
|
---|
[12a6d32] | 169 | <command>mdadm</command>. <!-- and also versions of
|
---|
| 170 | <command>mdassemble</command>. These all need to be manually installed.-->
|
---|
| 171 | This needs to be manually installed.
|
---|
[a0e6e8dd] | 172 | </para>
|
---|
| 173 |
|
---|
| 174 | <para>
|
---|
| 175 | <parameter>--keep-going</parameter>: Run the tests to the end, even if one
|
---|
| 176 | or more tests fail.
|
---|
| 177 | </para>
|
---|
| 178 |
|
---|
| 179 | <para>
|
---|
[af8a78d] | 180 | <parameter>--logdir=test-logs</parameter>: Defines the directory
|
---|
[4b92d8d] | 181 | where test logs are saved.
|
---|
[a0e6e8dd] | 182 | </para>
|
---|
| 183 |
|
---|
| 184 | <para>
|
---|
| 185 | <parameter>--save-logs</parameter>:
|
---|
| 186 | Instructs the test suite to save the logs.
|
---|
| 187 | </para>
|
---|
| 188 |
|
---|
| 189 | <para>
|
---|
| 190 | <option>--tests=<replaceable><test1,test2,...></replaceable></option>:
|
---|
| 191 | Optional comma separated list of tests to be executed
|
---|
| 192 | (all tests, if this option is not passed).
|
---|
[b6d51d20] | 193 | </para>
|
---|
| 194 |
|
---|
| 195 | </sect2>
|
---|
| 196 |
|
---|
| 197 |
|
---|
[ec9b2d7] | 198 | <sect2 role="content">
|
---|
| 199 | <title>Contents</title>
|
---|
| 200 |
|
---|
| 201 | <segmentedlist>
|
---|
| 202 | <segtitle>Installed Programs</segtitle>
|
---|
| 203 | <segtitle>Installed Libraries</segtitle>
|
---|
| 204 | <segtitle>Installed Directory</segtitle>
|
---|
| 205 |
|
---|
| 206 | <seglistitem>
|
---|
[12a6d32] | 207 | <seg>mdadm and mdmon <!--and optionally mdassemble--></seg>
|
---|
[ec9b2d7] | 208 | <seg>None</seg>
|
---|
| 209 | <seg>None</seg>
|
---|
| 210 | </seglistitem>
|
---|
| 211 | </segmentedlist>
|
---|
| 212 |
|
---|
| 213 | <variablelist>
|
---|
| 214 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 215 | <?dbfo list-presentation="list"?>
|
---|
| 216 | <?dbhtml list-presentation="table"?>
|
---|
| 217 |
|
---|
| 218 | <varlistentry id="mdadm-prog">
|
---|
| 219 | <term><command>mdadm</command></term>
|
---|
| 220 | <listitem>
|
---|
[29244b7] | 221 | <para>
|
---|
[4c24eb0a] | 222 | manages MD devices aka Linux Software RAID
|
---|
[29244b7] | 223 | </para>
|
---|
[ec9b2d7] | 224 | <indexterm zone="mdadm mdadm-prog">
|
---|
| 225 | <primary sortas="b-mdadm-prog">mdadm</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 | </listitem>
|
---|
| 228 | </varlistentry>
|
---|
| 229 |
|
---|
| 230 | <varlistentry id="mdmon">
|
---|
| 231 | <term><command>mdmon</command></term>
|
---|
| 232 | <listitem>
|
---|
[29244b7] | 233 | <para>
|
---|
[4c24eb0a] | 234 | monitors MD external metadata arrays
|
---|
[29244b7] | 235 | </para>
|
---|
[ec9b2d7] | 236 | <indexterm zone="mdadm mdmon">
|
---|
| 237 | <primary sortas="b-mdmon">mdmon</primary>
|
---|
| 238 | </indexterm>
|
---|
| 239 | </listitem>
|
---|
| 240 | </varlistentry>
|
---|
| 241 |
|
---|
[12a6d32] | 242 | <!-- Seems to be removed without a trace in 4.1
|
---|
[b6d51d20] | 243 | <varlistentry id="mdassemble">
|
---|
| 244 | <term><command>mdassemble</command></term>
|
---|
| 245 | <listitem>
|
---|
[29244b7] | 246 | <para>
|
---|
| 247 | is a tiny program that can be used to assemble MD devices
|
---|
[4c24eb0a] | 248 | inside an initial ramdisk (initrd) or initramfs
|
---|
[29244b7] | 249 | </para>
|
---|
[b6d51d20] | 250 | <indexterm zone="mdadm mdassemble">
|
---|
| 251 | <primary sortas="b-mdassemble">mdassemble</primary>
|
---|
| 252 | </indexterm>
|
---|
| 253 | </listitem>
|
---|
| 254 | </varlistentry>
|
---|
[12a6d32] | 255 | -->
|
---|
[b6d51d20] | 256 |
|
---|
[ec9b2d7] | 257 | </variablelist>
|
---|
| 258 |
|
---|
| 259 | </sect2>
|
---|
| 260 |
|
---|
| 261 | </sect1>
|
---|