[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 " ">
|
---|
[b15359cd] | 9 | <!ENTITY mdadm-md5sum "2cb4feffea9167ba71b5f346a0c0a40d">
|
---|
| 10 | <!ENTITY mdadm-size "424 KB">
|
---|
| 11 | <!ENTITY mdadm-buildsize "6.7 MB (10 MB with tests)">
|
---|
| 12 | <!ENTITY mdadm-time "less than 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 | <othername>$LastChangedBy$</othername>
|
---|
| 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 |
|
---|
| 32 | <para>The <application>mdadm</application> package contains administration
|
---|
[6fcb1b9] | 33 | tools for software RAID.</para>
|
---|
[ec9b2d7] | 34 |
|
---|
[110272ed] | 35 | &lfs81_checked;
|
---|
[ec9b2d7] | 36 |
|
---|
| 37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 38 | <itemizedlist spacing="compact">
|
---|
| 39 | <listitem>
|
---|
| 40 | <para>Download (HTTP): <ulink url="&mdadm-download-http;"/></para>
|
---|
| 41 | </listitem>
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (FTP): <ulink url="&mdadm-download-ftp;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download MD5 sum: &mdadm-md5sum;</para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download size: &mdadm-size;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Estimated disk space required: &mdadm-buildsize;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Estimated build time: &mdadm-time;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | </itemizedlist>
|
---|
| 58 |
|
---|
| 59 | <para condition="html" role="usernotes">User Notes:
|
---|
[0ec71e95] | 60 | <ulink url="&blfs-wiki;/mdadm"/></para>
|
---|
[4b92d8d] | 61 | <caution>
|
---|
[09765cf] | 62 | <para>
|
---|
[4b92d8d] | 63 | Kernel versions in series 4.1 through 4.4.1 have a broken RAID
|
---|
| 64 | implementation. Use a kernel with version at or above 4.4.2.
|
---|
[09765cf] | 65 | </para>
|
---|
[4b92d8d] | 66 | </caution>
|
---|
[ec9b2d7] | 67 |
|
---|
| 68 | </sect2>
|
---|
| 69 |
|
---|
| 70 | <sect2 role="kernel" id='mdadm-kernel'>
|
---|
| 71 | <title>Kernel Configuration</title>
|
---|
| 72 |
|
---|
| 73 | <para>Enable the following options in the kernel configuration
|
---|
| 74 | and recompile the kernel, if necessary. Only the RAID types desired
|
---|
[ee42033] | 75 | are required.</para>
|
---|
[ec9b2d7] | 76 |
|
---|
[ee42033] | 77 | <screen><literal>Device Drivers --->
|
---|
| 78 | [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
|
---|
| 79 | <*> RAID support [CONFIG_BLK_DEV_MD]
|
---|
| 80 | [*] Autodetect RAID arrays during kernel boot [CONFIG_MD_AUTODETECT]
|
---|
| 81 | <*/M> Linear (append) mode [CONFIG_MD_LINEAR]
|
---|
| 82 | <*/M> RAID-0 (striping) mode [CONFIG_MD_RAID0]
|
---|
| 83 | <*/M> RAID-1 (mirroring) mode [CONFIG_MD_RAID1]
|
---|
| 84 | <*/M> RAID-10 (mirrored striping) mode [CONFIG_MD_RAID10]
|
---|
| 85 | <*/M> RAID-4/RAID-5/RAID-6 mode [CONFIG_MD_RAID456]</literal></screen>
|
---|
[ec9b2d7] | 86 |
|
---|
| 87 | <indexterm zone="mdadm mdadm-kernel">
|
---|
| 88 | <primary sortas="d-mdadm">mdadm</primary>
|
---|
| 89 | </indexterm>
|
---|
| 90 |
|
---|
| 91 | </sect2>
|
---|
| 92 |
|
---|
| 93 | <sect2 role="installation">
|
---|
| 94 | <title>Installation of mdadm</title>
|
---|
| 95 |
|
---|
[4d0c38b] | 96 | <para>Fix a build error introduced by GCC-7.1:</para>
|
---|
| 97 |
|
---|
| 98 | <screen><userinput>sed 's@-Werror@@' -i Makefile</userinput></screen>
|
---|
| 99 |
|
---|
[ec9b2d7] | 100 | <para>Install <application>mdadm</application> by running the following
|
---|
| 101 | commands:</para>
|
---|
| 102 |
|
---|
[b15359cd] | 103 | <screen><userinput>make</userinput></screen>
|
---|
[ec9b2d7] | 104 |
|
---|
[b6d51d20] | 105 | <para>If you wish to run the tests, ensure that your kernel supports
|
---|
[b15359cd] | 106 | RAID and that a version of mdadm is not already running. As many as 9 out
|
---|
| 107 | of 124 tests may fail.</para>
|
---|
[4b92d8d] | 108 |
|
---|
| 109 | <para>First fix the test script to avoid a bogus error message when
|
---|
| 110 | tests fail and build the supporting programs:</para>
|
---|
| 111 |
|
---|
| 112 | <screen><userinput>sed -i 's# if.* == "1"#& -a -e $targetdir/log#' test &&
|
---|
| 113 | make test</userinput></screen>
|
---|
| 114 |
|
---|
| 115 | <para>Run the tests as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 116 |
|
---|
[487bdfe6] | 117 | <screen role="root"><userinput>./test --keep-going --logdir=test-logs --save-logs</userinput></screen>
|
---|
[ec9b2d7] | 118 |
|
---|
| 119 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 120 |
|
---|
| 121 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 122 |
|
---|
| 123 | </sect2>
|
---|
| 124 |
|
---|
[b6d51d20] | 125 | <sect2 role="commands">
|
---|
| 126 | <title>Command Explanations</title>
|
---|
| 127 |
|
---|
[a0e6e8dd] | 128 | <para>
|
---|
| 129 | <command>make everything</command>: This optional target creates extra
|
---|
| 130 | programs, particularly a statically-linked version of
|
---|
| 131 | <command>mdadm</command> and also versions of
|
---|
| 132 | <command>mdassemble</command>. These all need to be manually installed.
|
---|
| 133 | </para>
|
---|
| 134 |
|
---|
| 135 | <para>
|
---|
| 136 | <parameter>--keep-going</parameter>: Run the tests to the end, even if one
|
---|
| 137 | or more tests fail.
|
---|
| 138 | </para>
|
---|
| 139 |
|
---|
| 140 | <para>
|
---|
[4b92d8d] | 141 | <parameter>--logdir=test-logs</parameter>: Defines that the directory
|
---|
| 142 | where test logs are saved.
|
---|
[a0e6e8dd] | 143 | </para>
|
---|
| 144 |
|
---|
| 145 | <para>
|
---|
| 146 | <parameter>--save-logs</parameter>:
|
---|
| 147 | Instructs the test suite to save the logs.
|
---|
| 148 | </para>
|
---|
| 149 |
|
---|
| 150 | <para>
|
---|
| 151 | <option>--tests=<replaceable><test1,test2,...></replaceable></option>:
|
---|
| 152 | Optional comma separated list of tests to be executed
|
---|
| 153 | (all tests, if this option is not passed).
|
---|
[b6d51d20] | 154 | </para>
|
---|
| 155 |
|
---|
| 156 | </sect2>
|
---|
| 157 |
|
---|
| 158 |
|
---|
[ec9b2d7] | 159 | <sect2 role="content">
|
---|
| 160 | <title>Contents</title>
|
---|
| 161 |
|
---|
| 162 | <segmentedlist>
|
---|
| 163 | <segtitle>Installed Programs</segtitle>
|
---|
| 164 | <segtitle>Installed Libraries</segtitle>
|
---|
| 165 | <segtitle>Installed Directory</segtitle>
|
---|
| 166 |
|
---|
| 167 | <seglistitem>
|
---|
[b6d51d20] | 168 | <seg>mdadm, mdmon and optionally mdassemble</seg>
|
---|
[ec9b2d7] | 169 | <seg>None</seg>
|
---|
| 170 | <seg>None</seg>
|
---|
| 171 | </seglistitem>
|
---|
| 172 | </segmentedlist>
|
---|
| 173 |
|
---|
| 174 | <variablelist>
|
---|
| 175 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 176 | <?dbfo list-presentation="list"?>
|
---|
| 177 | <?dbhtml list-presentation="table"?>
|
---|
| 178 |
|
---|
| 179 | <varlistentry id="mdadm-prog">
|
---|
| 180 | <term><command>mdadm</command></term>
|
---|
| 181 | <listitem>
|
---|
| 182 | <para>manages MD devices aka Linux Software RAID.</para>
|
---|
| 183 | <indexterm zone="mdadm mdadm-prog">
|
---|
| 184 | <primary sortas="b-mdadm-prog">mdadm</primary>
|
---|
| 185 | </indexterm>
|
---|
| 186 | </listitem>
|
---|
| 187 | </varlistentry>
|
---|
| 188 |
|
---|
| 189 | <varlistentry id="mdmon">
|
---|
| 190 | <term><command>mdmon</command></term>
|
---|
| 191 | <listitem>
|
---|
| 192 | <para>monitors MD external metadata arrays.</para>
|
---|
| 193 | <indexterm zone="mdadm mdmon">
|
---|
| 194 | <primary sortas="b-mdmon">mdmon</primary>
|
---|
| 195 | </indexterm>
|
---|
| 196 | </listitem>
|
---|
| 197 | </varlistentry>
|
---|
| 198 |
|
---|
[b6d51d20] | 199 | <varlistentry id="mdassemble">
|
---|
| 200 | <term><command>mdassemble</command></term>
|
---|
| 201 | <listitem>
|
---|
| 202 | <para>is a tiny program that can be used to assemble MD devices
|
---|
| 203 | inside an initial ramdisk (initrd) or initramfs.</para>
|
---|
| 204 | <indexterm zone="mdadm mdassemble">
|
---|
| 205 | <primary sortas="b-mdassemble">mdassemble</primary>
|
---|
| 206 | </indexterm>
|
---|
| 207 | </listitem>
|
---|
| 208 | </varlistentry>
|
---|
| 209 |
|
---|
[ec9b2d7] | 210 | </variablelist>
|
---|
| 211 |
|
---|
| 212 | </sect2>
|
---|
| 213 |
|
---|
| 214 | </sect1>
|
---|