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