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