2012-02-09 07:57:52 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2017-08-16 02:49:48 +08:00
|
|
|
<!ENTITY mdadm-download-http "&kernel-dl;/linux/utils/raid/mdadm/mdadm-&mdadm-version;.tar.xz">
|
2012-02-09 07:57:52 +08:00
|
|
|
<!ENTITY mdadm-download-ftp " ">
|
2019-09-23 04:01:56 +08:00
|
|
|
<!ENTITY mdadm-md5sum "51bf3651bd73a06c413a2f964f299598">
|
|
|
|
<!ENTITY mdadm-size "432 KB">
|
|
|
|
<!ENTITY mdadm-buildsize "4.9 MB (10 MB with tests)">
|
|
|
|
<!ENTITY mdadm-time "0.1 SBU (tests take about an hour, only partially processor dependent)">
|
2012-02-09 07:57:52 +08:00
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="mdadm" xreflabel="mdadm-&mdadm-version;">
|
|
|
|
<?dbhtml filename="mdadm.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>mdadm-&mdadm-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="mdadm">
|
|
|
|
<primary sortas="a-mdadm">mdadm</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to mdadm</title>
|
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
The <application>mdadm</application> package contains administration
|
|
|
|
tools for software RAID.
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
2020-08-24 06:03:29 +08:00
|
|
|
&lfs10_checked;
|
2012-02-09 07:57:52 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&mdadm-download-http;"/>
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&mdadm-download-ftp;"/>
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Download MD5 sum: &mdadm-md5sum;
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Download size: &mdadm-size;
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Estimated disk space required: &mdadm-buildsize;
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Estimated build time: &mdadm-time;
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2019-12-06 23:59:29 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">mdadm Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
|
|
|
A <xref linkend="server-mail"/>
|
|
|
|
</para>
|
|
|
|
<!-- Contains -DSendmail=/usr/sbin/sendmail in the build procedure -->
|
2012-02-09 07:57:52 +08:00
|
|
|
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
2012-02-11 22:56:32 +08:00
|
|
|
<ulink url="&blfs-wiki;/mdadm"/></para>
|
2016-02-22 04:38:55 +08:00
|
|
|
<caution>
|
2015-10-28 05:31:05 +08:00
|
|
|
<para>
|
2016-02-22 04:38:55 +08:00
|
|
|
Kernel versions in series 4.1 through 4.4.1 have a broken RAID
|
|
|
|
implementation. Use a kernel with version at or above 4.4.2.
|
2015-10-28 05:31:05 +08:00
|
|
|
</para>
|
2016-02-22 04:38:55 +08:00
|
|
|
</caution>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="kernel" id='mdadm-kernel'>
|
|
|
|
<title>Kernel Configuration</title>
|
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Enable the following options in the kernel configuration
|
|
|
|
and recompile the kernel, if necessary. Only the RAID types desired
|
|
|
|
are required.
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
2015-02-12 23:35:57 +08:00
|
|
|
<screen><literal>Device Drivers --->
|
|
|
|
[*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
|
|
|
|
<*> RAID support [CONFIG_BLK_DEV_MD]
|
|
|
|
[*] Autodetect RAID arrays during kernel boot [CONFIG_MD_AUTODETECT]
|
|
|
|
<*/M> Linear (append) mode [CONFIG_MD_LINEAR]
|
|
|
|
<*/M> RAID-0 (striping) mode [CONFIG_MD_RAID0]
|
|
|
|
<*/M> RAID-1 (mirroring) mode [CONFIG_MD_RAID1]
|
|
|
|
<*/M> RAID-10 (mirrored striping) mode [CONFIG_MD_RAID10]
|
|
|
|
<*/M> RAID-4/RAID-5/RAID-6 mode [CONFIG_MD_RAID456]</literal></screen>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
|
|
|
<indexterm zone="mdadm mdadm-kernel">
|
|
|
|
<primary sortas="d-mdadm">mdadm</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of mdadm</title>
|
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Fix a build error introduced by gcc-7.1:
|
|
|
|
</para>
|
2017-06-25 23:07:28 +08:00
|
|
|
|
|
|
|
<screen><userinput>sed 's@-Werror@@' -i Makefile</userinput></screen>
|
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Build <application>mdadm</application> by running the following
|
|
|
|
command:
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
2017-01-11 02:17:16 +08:00
|
|
|
<screen><userinput>make</userinput></screen>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
If you wish to run the tests, ensure that your kernel supports RAID
|
|
|
|
and that a version of mdadm is not already running. As many as 9 out
|
|
|
|
of 124 tests may fail.
|
|
|
|
</para>
|
2016-02-22 04:38:55 +08:00
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<caution>
|
|
|
|
<para>
|
|
|
|
The tests edit values in /proc and run tests on software raid devices.
|
|
|
|
They shouldn't be run on systems with active software RAID devices.
|
|
|
|
</para>
|
|
|
|
</caution>
|
2019-09-24 01:08:47 +08:00
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Run the tests as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
2016-02-22 04:38:55 +08:00
|
|
|
|
2019-08-13 21:50:16 +08:00
|
|
|
<screen role="root"
|
|
|
|
remap="test"><userinput>./test --keep-going --logdir=test-logs --save-logs</userinput></screen>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
|
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
2013-09-11 07:12:35 +08:00
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2015-08-06 06:24:48 +08:00
|
|
|
<para>
|
|
|
|
<command>make everything</command>: This optional target creates extra
|
|
|
|
programs, particularly a statically-linked version of
|
|
|
|
<command>mdadm</command> and also versions of
|
|
|
|
<command>mdassemble</command>. These all need to be manually installed.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--keep-going</parameter>: Run the tests to the end, even if one
|
|
|
|
or more tests fail.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2018-01-10 18:44:47 +08:00
|
|
|
<parameter>--logdir=test-logs</parameter>: Defines the directory
|
2016-02-22 04:38:55 +08:00
|
|
|
where test logs are saved.
|
2015-08-06 06:24:48 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--save-logs</parameter>:
|
|
|
|
Instructs the test suite to save the logs.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<option>--tests=<replaceable><test1,test2,...></replaceable></option>:
|
|
|
|
Optional comma separated list of tests to be executed
|
|
|
|
(all tests, if this option is not passed).
|
2013-09-11 07:12:35 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
|
2012-02-09 07:57:52 +08:00
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directory</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
2013-09-11 07:12:35 +08:00
|
|
|
<seg>mdadm, mdmon and optionally mdassemble</seg>
|
2012-02-09 07:57:52 +08:00
|
|
|
<seg>None</seg>
|
|
|
|
<seg>None</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="mdadm-prog">
|
|
|
|
<term><command>mdadm</command></term>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
manages MD devices aka Linux Software RAID.
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
<indexterm zone="mdadm mdadm-prog">
|
|
|
|
<primary sortas="b-mdadm-prog">mdadm</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="mdmon">
|
|
|
|
<term><command>mdmon</command></term>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
monitors MD external metadata arrays.
|
|
|
|
</para>
|
2012-02-09 07:57:52 +08:00
|
|
|
<indexterm zone="mdadm mdmon">
|
|
|
|
<primary sortas="b-mdmon">mdmon</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2013-09-11 07:12:35 +08:00
|
|
|
<varlistentry id="mdassemble">
|
|
|
|
<term><command>mdassemble</command></term>
|
|
|
|
<listitem>
|
2020-03-26 05:46:27 +08:00
|
|
|
<para>
|
|
|
|
is a tiny program that can be used to assemble MD devices
|
|
|
|
inside an initial ramdisk (initrd) or initramfs.
|
|
|
|
</para>
|
2013-09-11 07:12:35 +08:00
|
|
|
<indexterm zone="mdadm mdassemble">
|
|
|
|
<primary sortas="b-mdassemble">mdassemble</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-02-09 07:57:52 +08:00
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|