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