[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 " ">
|
---|
[bcccddd] | 9 | <!ENTITY mdadm-md5sum "a304eb0a978ca81045620d06547050a6">
|
---|
| 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 | <sect1info>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>mdadm-&mdadm-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="mdadm">
|
---|
| 26 | <primary sortas="a-mdadm">mdadm</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to mdadm</title>
|
---|
| 31 |
|
---|
[29244b7] | 32 | <para>
|
---|
| 33 | The <application>mdadm</application> package contains administration
|
---|
| 34 | tools for software RAID.
|
---|
| 35 | </para>
|
---|
[ec9b2d7] | 36 |
|
---|
[85a581fd] | 37 | &lfs110a_checked;
|
---|
[ec9b2d7] | 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
[29244b7] | 42 | <para>
|
---|
| 43 | Download (HTTP): <ulink url="&mdadm-download-http;"/>
|
---|
| 44 | </para>
|
---|
[ec9b2d7] | 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
[29244b7] | 47 | <para>
|
---|
| 48 | Download (FTP): <ulink url="&mdadm-download-ftp;"/>
|
---|
| 49 | </para>
|
---|
[ec9b2d7] | 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
[29244b7] | 52 | <para>
|
---|
| 53 | Download MD5 sum: &mdadm-md5sum;
|
---|
| 54 | </para>
|
---|
[ec9b2d7] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[29244b7] | 57 | <para>
|
---|
| 58 | Download size: &mdadm-size;
|
---|
| 59 | </para>
|
---|
[ec9b2d7] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[29244b7] | 62 | <para>
|
---|
| 63 | Estimated disk space required: &mdadm-buildsize;
|
---|
| 64 | </para>
|
---|
[ec9b2d7] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[29244b7] | 67 | <para>
|
---|
| 68 | Estimated build time: &mdadm-time;
|
---|
| 69 | </para>
|
---|
[ec9b2d7] | 70 | </listitem>
|
---|
| 71 | </itemizedlist>
|
---|
[8126c5d] | 72 |
|
---|
| 73 | <bridgehead renderas="sect3">mdadm Dependencies</bridgehead>
|
---|
| 74 |
|
---|
| 75 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 76 | <para role="optional">
|
---|
| 77 | A <xref linkend="server-mail"/>
|
---|
| 78 | </para>
|
---|
| 79 | <!-- Contains -DSendmail=/usr/sbin/sendmail in the build procedure -->
|
---|
[ec9b2d7] | 80 |
|
---|
| 81 | <para condition="html" role="usernotes">User Notes:
|
---|
[0ec71e95] | 82 | <ulink url="&blfs-wiki;/mdadm"/></para>
|
---|
[4b92d8d] | 83 | <caution>
|
---|
[09765cf] | 84 | <para>
|
---|
[4b92d8d] | 85 | Kernel versions in series 4.1 through 4.4.1 have a broken RAID
|
---|
| 86 | implementation. Use a kernel with version at or above 4.4.2.
|
---|
[09765cf] | 87 | </para>
|
---|
[4b92d8d] | 88 | </caution>
|
---|
[ec9b2d7] | 89 |
|
---|
| 90 | </sect2>
|
---|
| 91 |
|
---|
| 92 | <sect2 role="kernel" id='mdadm-kernel'>
|
---|
| 93 | <title>Kernel Configuration</title>
|
---|
| 94 |
|
---|
[29244b7] | 95 | <para>
|
---|
| 96 | Enable the following options in the kernel configuration
|
---|
| 97 | and recompile the kernel, if necessary. Only the RAID types desired
|
---|
| 98 | are required.
|
---|
| 99 | </para>
|
---|
[ec9b2d7] | 100 |
|
---|
[ee42033] | 101 | <screen><literal>Device Drivers --->
|
---|
| 102 | [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
|
---|
| 103 | <*> RAID support [CONFIG_BLK_DEV_MD]
|
---|
| 104 | [*] Autodetect RAID arrays during kernel boot [CONFIG_MD_AUTODETECT]
|
---|
| 105 | <*/M> Linear (append) mode [CONFIG_MD_LINEAR]
|
---|
| 106 | <*/M> RAID-0 (striping) mode [CONFIG_MD_RAID0]
|
---|
| 107 | <*/M> RAID-1 (mirroring) mode [CONFIG_MD_RAID1]
|
---|
| 108 | <*/M> RAID-10 (mirrored striping) mode [CONFIG_MD_RAID10]
|
---|
| 109 | <*/M> RAID-4/RAID-5/RAID-6 mode [CONFIG_MD_RAID456]</literal></screen>
|
---|
[ec9b2d7] | 110 |
|
---|
| 111 | <indexterm zone="mdadm mdadm-kernel">
|
---|
| 112 | <primary sortas="d-mdadm">mdadm</primary>
|
---|
| 113 | </indexterm>
|
---|
| 114 |
|
---|
| 115 | </sect2>
|
---|
| 116 |
|
---|
| 117 | <sect2 role="installation">
|
---|
| 118 | <title>Installation of mdadm</title>
|
---|
[bcccddd] | 119 | <!--
|
---|
[29244b7] | 120 | <para>
|
---|
| 121 | Fix a build error introduced by gcc-7.1:
|
---|
| 122 | </para>
|
---|
[4d0c38b] | 123 |
|
---|
| 124 | <screen><userinput>sed 's@-Werror@@' -i Makefile</userinput></screen>
|
---|
[bcccddd] | 125 | -->
|
---|
[29244b7] | 126 | <para>
|
---|
| 127 | Build <application>mdadm</application> by running the following
|
---|
| 128 | command:
|
---|
| 129 | </para>
|
---|
[ec9b2d7] | 130 |
|
---|
[b15359cd] | 131 | <screen><userinput>make</userinput></screen>
|
---|
[ec9b2d7] | 132 |
|
---|
[bcccddd] | 133 | <para>
|
---|
| 134 | This package does not come with a working test suuite.
|
---|
| 135 | </para>
|
---|
| 136 |
|
---|
| 137 | <!--
|
---|
| 138 | The test suite errors out after about half the tests are run.
|
---|
| 139 | Of those tests, about half fail.
|
---|
| 140 | There are tests that indicate failure when the test is clearly wrong
|
---|
| 141 | for the current code.
|
---|
| 142 | I asked about it at linux-raid@vger.kernel.org, but did not get
|
---|
| 143 | a responsive answer.
|
---|
| 144 | - bdubbs 6 January 22
|
---|
| 145 |
|
---|
| 146 |
|
---|
[29244b7] | 147 | <para>
|
---|
| 148 | If you wish to run the tests, ensure that your kernel supports RAID
|
---|
| 149 | and that a version of mdadm is not already running. As many as 9 out
|
---|
| 150 | of 124 tests may fail.
|
---|
| 151 | </para>
|
---|
[4b92d8d] | 152 |
|
---|
[29244b7] | 153 | <caution>
|
---|
| 154 | <para>
|
---|
| 155 | The tests edit values in /proc and run tests on software raid devices.
|
---|
| 156 | They shouldn't be run on systems with active software RAID devices.
|
---|
| 157 | </para>
|
---|
| 158 | </caution>
|
---|
[fd29f76] | 159 |
|
---|
[29244b7] | 160 | <para>
|
---|
| 161 | Run the tests as the <systemitem class="username">root</systemitem> user:
|
---|
| 162 | </para>
|
---|
[4b92d8d] | 163 |
|
---|
[06908bf6] | 164 | <screen role="root"
|
---|
[bcccddd] | 165 | remap="test"><userinput>./test - -keep-going - -logdir=test-logs - -save-logs</userinput></screen>
|
---|
| 166 | -->
|
---|
[29244b7] | 167 | <para>
|
---|
| 168 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 169 | </para>
|
---|
[ec9b2d7] | 170 |
|
---|
[0ea195f4] | 171 | <screen role="root"><userinput>make BINDIR=/usr/sbin install</userinput></screen>
|
---|
[ec9b2d7] | 172 |
|
---|
| 173 | </sect2>
|
---|
| 174 |
|
---|
[b6d51d20] | 175 | <sect2 role="commands">
|
---|
| 176 | <title>Command Explanations</title>
|
---|
| 177 |
|
---|
[a0e6e8dd] | 178 | <para>
|
---|
| 179 | <command>make everything</command>: This optional target creates extra
|
---|
| 180 | programs, particularly a statically-linked version of
|
---|
[12a6d32] | 181 | <command>mdadm</command>. <!-- and also versions of
|
---|
| 182 | <command>mdassemble</command>. These all need to be manually installed.-->
|
---|
| 183 | This needs to be manually installed.
|
---|
[a0e6e8dd] | 184 | </para>
|
---|
| 185 |
|
---|
| 186 | <para>
|
---|
| 187 | <parameter>--keep-going</parameter>: Run the tests to the end, even if one
|
---|
| 188 | or more tests fail.
|
---|
| 189 | </para>
|
---|
| 190 |
|
---|
| 191 | <para>
|
---|
[af8a78d] | 192 | <parameter>--logdir=test-logs</parameter>: Defines the directory
|
---|
[4b92d8d] | 193 | where test logs are saved.
|
---|
[a0e6e8dd] | 194 | </para>
|
---|
| 195 |
|
---|
| 196 | <para>
|
---|
| 197 | <parameter>--save-logs</parameter>:
|
---|
| 198 | Instructs the test suite to save the logs.
|
---|
| 199 | </para>
|
---|
| 200 |
|
---|
| 201 | <para>
|
---|
| 202 | <option>--tests=<replaceable><test1,test2,...></replaceable></option>:
|
---|
| 203 | Optional comma separated list of tests to be executed
|
---|
| 204 | (all tests, if this option is not passed).
|
---|
[b6d51d20] | 205 | </para>
|
---|
| 206 |
|
---|
| 207 | </sect2>
|
---|
| 208 |
|
---|
| 209 |
|
---|
[ec9b2d7] | 210 | <sect2 role="content">
|
---|
| 211 | <title>Contents</title>
|
---|
| 212 |
|
---|
| 213 | <segmentedlist>
|
---|
| 214 | <segtitle>Installed Programs</segtitle>
|
---|
| 215 | <segtitle>Installed Libraries</segtitle>
|
---|
| 216 | <segtitle>Installed Directory</segtitle>
|
---|
| 217 |
|
---|
| 218 | <seglistitem>
|
---|
[12a6d32] | 219 | <seg>mdadm and mdmon <!--and optionally mdassemble--></seg>
|
---|
[ec9b2d7] | 220 | <seg>None</seg>
|
---|
| 221 | <seg>None</seg>
|
---|
| 222 | </seglistitem>
|
---|
| 223 | </segmentedlist>
|
---|
| 224 |
|
---|
| 225 | <variablelist>
|
---|
| 226 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 227 | <?dbfo list-presentation="list"?>
|
---|
| 228 | <?dbhtml list-presentation="table"?>
|
---|
| 229 |
|
---|
| 230 | <varlistentry id="mdadm-prog">
|
---|
| 231 | <term><command>mdadm</command></term>
|
---|
| 232 | <listitem>
|
---|
[29244b7] | 233 | <para>
|
---|
[4c24eb0a] | 234 | manages MD devices aka Linux Software RAID
|
---|
[29244b7] | 235 | </para>
|
---|
[ec9b2d7] | 236 | <indexterm zone="mdadm mdadm-prog">
|
---|
| 237 | <primary sortas="b-mdadm-prog">mdadm</primary>
|
---|
| 238 | </indexterm>
|
---|
| 239 | </listitem>
|
---|
| 240 | </varlistentry>
|
---|
| 241 |
|
---|
| 242 | <varlistentry id="mdmon">
|
---|
| 243 | <term><command>mdmon</command></term>
|
---|
| 244 | <listitem>
|
---|
[29244b7] | 245 | <para>
|
---|
[4c24eb0a] | 246 | monitors MD external metadata arrays
|
---|
[29244b7] | 247 | </para>
|
---|
[ec9b2d7] | 248 | <indexterm zone="mdadm mdmon">
|
---|
| 249 | <primary sortas="b-mdmon">mdmon</primary>
|
---|
| 250 | </indexterm>
|
---|
| 251 | </listitem>
|
---|
| 252 | </varlistentry>
|
---|
| 253 |
|
---|
[12a6d32] | 254 | <!-- Seems to be removed without a trace in 4.1
|
---|
[b6d51d20] | 255 | <varlistentry id="mdassemble">
|
---|
| 256 | <term><command>mdassemble</command></term>
|
---|
| 257 | <listitem>
|
---|
[29244b7] | 258 | <para>
|
---|
| 259 | is a tiny program that can be used to assemble MD devices
|
---|
[4c24eb0a] | 260 | inside an initial ramdisk (initrd) or initramfs
|
---|
[29244b7] | 261 | </para>
|
---|
[b6d51d20] | 262 | <indexterm zone="mdadm mdassemble">
|
---|
| 263 | <primary sortas="b-mdassemble">mdassemble</primary>
|
---|
| 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
[12a6d32] | 267 | -->
|
---|
[b6d51d20] | 268 |
|
---|
[ec9b2d7] | 269 | </variablelist>
|
---|
| 270 |
|
---|
| 271 | </sect2>
|
---|
| 272 |
|
---|
| 273 | </sect1>
|
---|