[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 |
|
---|
[cfd4fa8] | 34 | &lfs113_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 |
|
---|
[ee42033] | 96 | <screen><literal>Device Drivers --->
|
---|
| 97 | [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
|
---|
| 98 | <*> RAID support [CONFIG_BLK_DEV_MD]
|
---|
| 99 | [*] Autodetect RAID arrays during kernel boot [CONFIG_MD_AUTODETECT]
|
---|
| 100 | <*/M> Linear (append) mode [CONFIG_MD_LINEAR]
|
---|
| 101 | <*/M> RAID-0 (striping) mode [CONFIG_MD_RAID0]
|
---|
| 102 | <*/M> RAID-1 (mirroring) mode [CONFIG_MD_RAID1]
|
---|
| 103 | <*/M> RAID-10 (mirrored striping) mode [CONFIG_MD_RAID10]
|
---|
| 104 | <*/M> RAID-4/RAID-5/RAID-6 mode [CONFIG_MD_RAID456]</literal></screen>
|
---|
[ec9b2d7] | 105 |
|
---|
| 106 | <indexterm zone="mdadm mdadm-kernel">
|
---|
| 107 | <primary sortas="d-mdadm">mdadm</primary>
|
---|
| 108 | </indexterm>
|
---|
| 109 |
|
---|
| 110 | </sect2>
|
---|
| 111 |
|
---|
| 112 | <sect2 role="installation">
|
---|
| 113 | <title>Installation of mdadm</title>
|
---|
[bcccddd] | 114 | <!--
|
---|
[29244b7] | 115 | <para>
|
---|
| 116 | Fix a build error introduced by gcc-7.1:
|
---|
| 117 | </para>
|
---|
[4d0c38b] | 118 |
|
---|
| 119 | <screen><userinput>sed 's@-Werror@@' -i Makefile</userinput></screen>
|
---|
[bcccddd] | 120 | -->
|
---|
[29244b7] | 121 | <para>
|
---|
| 122 | Build <application>mdadm</application> by running the following
|
---|
| 123 | command:
|
---|
| 124 | </para>
|
---|
[ec9b2d7] | 125 |
|
---|
[b15359cd] | 126 | <screen><userinput>make</userinput></screen>
|
---|
[ec9b2d7] | 127 |
|
---|
[bcccddd] | 128 | <para>
|
---|
[b9c353b] | 129 | This package does not come with a working test suite.
|
---|
[bcccddd] | 130 | </para>
|
---|
| 131 |
|
---|
| 132 | <!--
|
---|
| 133 | The test suite errors out after about half the tests are run.
|
---|
| 134 | Of those tests, about half fail.
|
---|
| 135 | There are tests that indicate failure when the test is clearly wrong
|
---|
| 136 | for the current code.
|
---|
| 137 | I asked about it at linux-raid@vger.kernel.org, but did not get
|
---|
| 138 | a responsive answer.
|
---|
| 139 | - bdubbs 6 January 22
|
---|
| 140 |
|
---|
| 141 |
|
---|
[29244b7] | 142 | <para>
|
---|
| 143 | If you wish to run the tests, ensure that your kernel supports RAID
|
---|
| 144 | and that a version of mdadm is not already running. As many as 9 out
|
---|
| 145 | of 124 tests may fail.
|
---|
| 146 | </para>
|
---|
[4b92d8d] | 147 |
|
---|
[29244b7] | 148 | <caution>
|
---|
| 149 | <para>
|
---|
| 150 | The tests edit values in /proc and run tests on software raid devices.
|
---|
| 151 | They shouldn't be run on systems with active software RAID devices.
|
---|
| 152 | </para>
|
---|
| 153 | </caution>
|
---|
[fd29f76] | 154 |
|
---|
[29244b7] | 155 | <para>
|
---|
| 156 | Run the tests as the <systemitem class="username">root</systemitem> user:
|
---|
| 157 | </para>
|
---|
[4b92d8d] | 158 |
|
---|
[06908bf6] | 159 | <screen role="root"
|
---|
[bcccddd] | 160 | remap="test"><userinput>./test - -keep-going - -logdir=test-logs - -save-logs</userinput></screen>
|
---|
| 161 | -->
|
---|
[29244b7] | 162 | <para>
|
---|
| 163 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 164 | </para>
|
---|
[ec9b2d7] | 165 |
|
---|
[0ea195f4] | 166 | <screen role="root"><userinput>make BINDIR=/usr/sbin install</userinput></screen>
|
---|
[ec9b2d7] | 167 |
|
---|
| 168 | </sect2>
|
---|
| 169 |
|
---|
[b6d51d20] | 170 | <sect2 role="commands">
|
---|
| 171 | <title>Command Explanations</title>
|
---|
| 172 |
|
---|
[a0e6e8dd] | 173 | <para>
|
---|
| 174 | <command>make everything</command>: This optional target creates extra
|
---|
| 175 | programs, particularly a statically-linked version of
|
---|
[12a6d32] | 176 | <command>mdadm</command>. <!-- and also versions of
|
---|
| 177 | <command>mdassemble</command>. These all need to be manually installed.-->
|
---|
| 178 | This needs to be manually installed.
|
---|
[a0e6e8dd] | 179 | </para>
|
---|
| 180 |
|
---|
| 181 | <para>
|
---|
| 182 | <parameter>--keep-going</parameter>: Run the tests to the end, even if one
|
---|
| 183 | or more tests fail.
|
---|
| 184 | </para>
|
---|
| 185 |
|
---|
| 186 | <para>
|
---|
[af8a78d] | 187 | <parameter>--logdir=test-logs</parameter>: Defines the directory
|
---|
[4b92d8d] | 188 | where test logs are saved.
|
---|
[a0e6e8dd] | 189 | </para>
|
---|
| 190 |
|
---|
| 191 | <para>
|
---|
| 192 | <parameter>--save-logs</parameter>:
|
---|
| 193 | Instructs the test suite to save the logs.
|
---|
| 194 | </para>
|
---|
| 195 |
|
---|
| 196 | <para>
|
---|
| 197 | <option>--tests=<replaceable><test1,test2,...></replaceable></option>:
|
---|
| 198 | Optional comma separated list of tests to be executed
|
---|
| 199 | (all tests, if this option is not passed).
|
---|
[b6d51d20] | 200 | </para>
|
---|
| 201 |
|
---|
| 202 | </sect2>
|
---|
| 203 |
|
---|
| 204 |
|
---|
[ec9b2d7] | 205 | <sect2 role="content">
|
---|
| 206 | <title>Contents</title>
|
---|
| 207 |
|
---|
| 208 | <segmentedlist>
|
---|
| 209 | <segtitle>Installed Programs</segtitle>
|
---|
| 210 | <segtitle>Installed Libraries</segtitle>
|
---|
| 211 | <segtitle>Installed Directory</segtitle>
|
---|
| 212 |
|
---|
| 213 | <seglistitem>
|
---|
[12a6d32] | 214 | <seg>mdadm and mdmon <!--and optionally mdassemble--></seg>
|
---|
[ec9b2d7] | 215 | <seg>None</seg>
|
---|
| 216 | <seg>None</seg>
|
---|
| 217 | </seglistitem>
|
---|
| 218 | </segmentedlist>
|
---|
| 219 |
|
---|
| 220 | <variablelist>
|
---|
| 221 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 222 | <?dbfo list-presentation="list"?>
|
---|
| 223 | <?dbhtml list-presentation="table"?>
|
---|
| 224 |
|
---|
| 225 | <varlistentry id="mdadm-prog">
|
---|
| 226 | <term><command>mdadm</command></term>
|
---|
| 227 | <listitem>
|
---|
[29244b7] | 228 | <para>
|
---|
[4c24eb0a] | 229 | manages MD devices aka Linux Software RAID
|
---|
[29244b7] | 230 | </para>
|
---|
[ec9b2d7] | 231 | <indexterm zone="mdadm mdadm-prog">
|
---|
| 232 | <primary sortas="b-mdadm-prog">mdadm</primary>
|
---|
| 233 | </indexterm>
|
---|
| 234 | </listitem>
|
---|
| 235 | </varlistentry>
|
---|
| 236 |
|
---|
| 237 | <varlistentry id="mdmon">
|
---|
| 238 | <term><command>mdmon</command></term>
|
---|
| 239 | <listitem>
|
---|
[29244b7] | 240 | <para>
|
---|
[4c24eb0a] | 241 | monitors MD external metadata arrays
|
---|
[29244b7] | 242 | </para>
|
---|
[ec9b2d7] | 243 | <indexterm zone="mdadm mdmon">
|
---|
| 244 | <primary sortas="b-mdmon">mdmon</primary>
|
---|
| 245 | </indexterm>
|
---|
| 246 | </listitem>
|
---|
| 247 | </varlistentry>
|
---|
| 248 |
|
---|
[12a6d32] | 249 | <!-- Seems to be removed without a trace in 4.1
|
---|
[b6d51d20] | 250 | <varlistentry id="mdassemble">
|
---|
| 251 | <term><command>mdassemble</command></term>
|
---|
| 252 | <listitem>
|
---|
[29244b7] | 253 | <para>
|
---|
| 254 | is a tiny program that can be used to assemble MD devices
|
---|
[4c24eb0a] | 255 | inside an initial ramdisk (initrd) or initramfs
|
---|
[29244b7] | 256 | </para>
|
---|
[b6d51d20] | 257 | <indexterm zone="mdadm mdassemble">
|
---|
| 258 | <primary sortas="b-mdassemble">mdassemble</primary>
|
---|
| 259 | </indexterm>
|
---|
| 260 | </listitem>
|
---|
| 261 | </varlistentry>
|
---|
[12a6d32] | 262 | -->
|
---|
[b6d51d20] | 263 |
|
---|
[ec9b2d7] | 264 | </variablelist>
|
---|
| 265 |
|
---|
| 266 | </sect2>
|
---|
| 267 |
|
---|
| 268 | </sect1>
|
---|