Author: bdubbs Date: 2012-02-08 16:57:52 -0700 (Wed, 08 Feb 2012) New Revision: 9322
Added: trunk/BOOK/postlfs/filesystems/aboutraid.xml trunk/BOOK/postlfs/filesystems/mdadm.xml Modified: trunk/BOOK/general.ent trunk/BOOK/introduction/welcome/changelog.xml trunk/BOOK/postlfs/filesystems/filesystems.xml Log: Added mdadm Added About RAID Modified: trunk/BOOK/general.ent =================================================================== --- trunk/BOOK/general.ent 2012-02-08 19:46:32 UTC (rev 9321) +++ trunk/BOOK/general.ent 2012-02-08 23:57:52 UTC (rev 9322) @@ -34,6 +34,7 @@ <!-- <!ENTITY lfs-root "http://www.&lfs-domainname;/lfs/view/&lfs-version;"> --> <!ENTITY lfs-root "../../../../lfs/view/&lfs-version;"> <!ENTITY lfs-dev "../../../../lfs/view/development"> +<!ENTITY kernel "http://www.kernel.org/pub/"> <!ENTITY gnu-alpha-ftp "ftp://alpha.gnu.org/gnu/"> <!ENTITY gnu-alpha-http "http://alpha.gnu.org/gnu/"> <!ENTITY sourceforge-repo "http://downloads.sourceforge.net"> @@ -140,6 +141,7 @@ <!-- Chapter 5 --> <!ENTITY lvm2-version "2.02.67"><!-- version from ftp://sources.redhat.com/pub/lvm2/WHATS_NEW_DM --> <!ENTITY jfsutils-version "1.1.15"> +<!ENTITY mdadm-version "3.2.3"> <!ENTITY reiser-version "3.6.21"> <!ENTITY xfsprogs-version "3.1.7"> @@ -160,11 +162,6 @@ <!-- Chapter 7a Virtualization --> <!ENTITY qemu-kvm-version "1.0"> - -<!-- Obsolete -<!ENTITY ash-version "0.4.0"> ---> - <!-- Part III --> <!-- Chapter 8 --> <!ENTITY pcre-version "8.12"> Modified: trunk/BOOK/introduction/welcome/changelog.xml =================================================================== --- trunk/BOOK/introduction/welcome/changelog.xml 2012-02-08 19:46:32 UTC (rev 9321) +++ trunk/BOOK/introduction/welcome/changelog.xml 2012-02-08 23:57:52 UTC (rev 9322) @@ -45,6 +45,12 @@ <para>February 8th, 2012</para> <itemizedlist> <listitem> + <para>[bdubbs] - add mdadm-3.2.2.</para> + </listitem> + <listitem> + <para>[bdubbs] - add section About RAID.</para> + </listitem> + <listitem> <para>[ken] - add librest-0.7.12 from Wayne.</para> </listitem> <listitem> Copied: trunk/BOOK/postlfs/filesystems/aboutraid.xml (from rev 9300, trunk/BOOK/introduction/important/pkgmgt.xml) =================================================================== --- trunk/BOOK/postlfs/filesystems/aboutraid.xml (rev 0) +++ trunk/BOOK/postlfs/filesystems/aboutraid.xml 2012-02-08 23:57:52 UTC (rev 9322) @@ -0,0 +1,180 @@ +<?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; +]> + +<sect1 id="raid"> + <?dbhtml filename="raid.html"?> + + <sect1info> + <othername>$LastChangedBy$</othername> + <date>$Date$</date> + </sect1info> + + <title>About RAID</title> + + <para>The storage technology known as RAID (Redundant Array of + Independent Disks) combines multiple physical disks into a logical + unit. The drives can generally be combined to provide data + redundancy or to extend the size of logical units beyond the + capability of the physical disks or both. The technology + also allows for providing hardware maintenance without powering + down the system.</para> + + <para>The types of RAID organization are descrbed in the <ulink + url="https://raid.wiki.kernel.org/articles/i/n/t/Introduction.html#The_RAID_levels"> + RAID Wiki</ulink>.</para> + + <para>Note that while RAID provides protection against disk + failures, it is not a substitute for backups. A file deleted + is still deleted on all the disks of a RAID array. Modern backups + are generally done via <xref linkend='rsync'/>.</para> + + <para>There are three major types of RAID implementation: + Hardware RAID, BIOS-based RAID, and Software RAID.</para> + + <sect2 id="hwraid"> + <title>Hardware RAID</title> + <para>Hardware based RAID provides capability through proprietary + hardware and data layouts. The control and configuration is generally + done via firmware in conjunction with executable programs made + available by the device manufacturer. The capabilities are + generally supplied via a PCI card, although there are some + instances of RAID components integrated in to the motherboard. + Hardware RAID may also be available ina sthand-alone enclosure.</para> + + <para>One advantage of hardware based RAID is that the drives + are offered to the operating system as a logical drive and no + operating system dependent configuration is needed.</para> + + <para>Disadvantages include difficulties in transferring drives + from one system to another, updating firmware, or replacing + failed RAID hardware.</para> + + </sect2> + + <sect2 id="biosraid"> + <title>BIOS-based RAID</title> + + <para>Some computers offter a hardware-like RAID implementation in the + system BIOS. Sometime this is referred to as 'fake' RAID as the + capabilites are generally incorporated into firmware without any hardware + acceleration.</para> + + <para>The advantages and disadvantages of BIOS-based RAID are generally + the same as hardware RAID with the additional disadvantage that there + is no hardware acceleration.</para> + + <para>In some cases, BIOS-based RAID firmware is enabled by default (e.g. + some DELL systems). If software RAID is desired, this option must be + explicitly disabled in the BIOS.</para> + + </sect2> + + <sect2 id="swraid"> + <title>Software RAID</title> + <para>Software based RAID is the most flexible form of RAID. It is + easy to install and update and provides full capability on all or + part of any drives available to the system. In BLFS, the RAID software + is found in <xref linkend='mdadm'/>.</para> + + <para>Configuring a RAID device is straight forward using + <application>mdadm</application>. Generally devices are created in the + <filename class='directory'>/dev</filename> directory as + <filename>/dev/mdx</filename> where <emphasis>x</emphasis> is an integer. + </para> + + <para>The first step in creating a RAID array is to use partitioning software + such as <userinput>fdisk</userinput> or <xref linkend='parted'/> to define the + partitions needed for the array. Usually, there will be one partition on + each drive participating in the RAID array, but that is not strictly necessary. + For this example, there will be four disk drives: + <filename>/dev/sda</filename>, + <filename>/dev/sdb</filename>, + <filename>/dev/sdc</filename>, and + <filename>/dev/sdd</filename>. They will be partitioned as follows:</para> + +<screen><literal>Partition Size Type Use +sda1: 100 MB fd Linux raid auto /boot (RAID 1) /dev/md0 +sda2: 10 GB fd Linux raid auto / (RAID 1) /dev/md1 +sda3: 2 GB 83 Linux swap swap +sda4 300 GB fd Linux raid auto /home (RAID 5) /dev/md2 + +sdb1: 100 MB fd Linux raid auto /boot (RAID 1) /dev/md0 +sdb2: 10 GB fd Linux raid auto / (RAID 1) /dev/md1 +sdb3: 2 GB 83 Linux swap swap +sdb4 300 GB fd Linux raid auto /home (RAID 5) /dev/md2 + +sdc1: 12 GB fd Linux raid auto /usr/src (RAID 0) /dev/md3 +sdc2: 300 GB fd Linux raid auto /home (RAID 5) /dev/md2 + +sdd1: 12 GB fd Linux raid auto /usr/src (RAID 0) /dev/md3 +sdd2: 300 GB fd Linux raid auto /home (RAID 5) /dev/md2 </literal></screen> + + <para>Is this arrangement, we are creating a separate boot partition as the + first small RAID array and a root filesystem as the secong RAID array, + both mirrored. The third partition is a large (about 1TB) array for the + <filename class='directory'>/home</filename> directory. This provides + an ability to stripe data across multiple devices, improving speed for + botih reading and writing large files. Finally, we create a fourth array + that concatenates two partitions into a larger device.</para> + + <note><para>All <application>mdadm</application> commands must be run + as the <systemitem class="username">root</systemitem> user.</para></note> + + <para>To create these RAID arrays the commands are:</para> + +<screen><userinput>/sbin/mdadm -Cv /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1 +/sbin/mdadm -Cv /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 +/sbin/mdadm -Cv /dev/md3 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdd1 +/sbin/mdadm -Cv /dev/md2 --level=5 --raid-devices=4 \ + /dev/sda4 /dev/sdb4 /dev/sdc2 /dev/sdd2 </userinput></screen> + + <para>The devices created can be examined by device. For example, + to see the details of <filename>/dev/md1</filename>, use + <userinput>/sbin/mdadm --detail /dev/md1</userinput>: </para> + +<screen><literal> Version : 1.2 + Creation Time : Tue Feb 7 17:08:45 2012 + Raid Level : raid1 + Array Size : 10484664 (10.00 GiB 10.74 GB) + Used Dev Size : 10484664 (10.00 GiB 10.74 GB) + Raid Devices : 2 + Total Devices : 2 + Persistence : Superblock is persistent + + Update Time : Tue Feb 7 23:11:53 2012 + State : clean + Active Devices : 2 +Working Devices : 2 + Failed Devices : 0 + Spare Devices : 0 + + Name : core2-blfs:0 (local to host core2-blfs) + UUID : fcb944a4:9054aeb2:d987d8fe:a89121f8 + Events : 17 + + Number Major Minor RaidDevice State + 0 8 1 0 active sync /dev/sda1 + 1 8 17 1 active sync /dev/sdb1</literal></screen> + + <para>From this point, the partitions can be formated with the filesystem of + choice (e.g. ext3, ext4, <xref linkend='xfs'/>, <xref linkend='reiserfs'/>, + etc). The formatted partitions can then be mounted. The + <filename>/etc/fstab</filename> ifile can use the devices created for mounting at + boot time and the linux command line in + <filename>/boot/grub/grub.conf</filename> can specify + <option>root=/dev/md1</option>.</para> + + <note><para>The swap devices should be specified in the <filename>/etc/fstab</filename> + file as normal. The kernel normally stripes swap data accross multiple swap + files and should not be made part of a RAID array.</para></note> + + <para>For further options and management details of RAID devices, refer to + <userinput>man mdadm</userinput>.</para> + + </sect2> + +</sect1> Modified: trunk/BOOK/postlfs/filesystems/filesystems.xml =================================================================== --- trunk/BOOK/postlfs/filesystems/filesystems.xml 2012-02-08 19:46:32 UTC (rev 9321) +++ trunk/BOOK/postlfs/filesystems/filesystems.xml 2012-02-08 23:57:52 UTC (rev 9322) @@ -25,6 +25,8 @@ <!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ext3.xml"/> --> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="lvm2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="jfs.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mdadm.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutraid.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reiser.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xfs.xml"/> Added: trunk/BOOK/postlfs/filesystems/mdadm.xml =================================================================== --- trunk/BOOK/postlfs/filesystems/mdadm.xml (rev 0) +++ trunk/BOOK/postlfs/filesystems/mdadm.xml 2012-02-08 23:57:52 UTC (rev 9322) @@ -0,0 +1,148 @@ +<?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; + + <!ENTITY mdadm-download-http "&kernel;/linux/utils/raid/mdadm/mdadm-&mdadm-version;.tar.xz"> + <!ENTITY mdadm-download-ftp " "> + <!ENTITY mdadm-md5sum "9203afc5c891a39c5a8998b385cb070b"> + <!ENTITY mdadm-size "352 KB"> + <!ENTITY mdadm-buildsize "17 MB"> + <!ENTITY mdadm-time "0.5 SBU"> +]> + +<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> + + <para>The <application>mdadm</application> package contains administration + tools for sorfware RAID.</para> + + &lfs70_checked; + + <bridgehead renderas="sect3">Package Information</bridgehead> + <itemizedlist spacing="compact"> + <listitem> + <para>Download (HTTP): <ulink url="&mdadm-download-http;"/></para> + </listitem> + <listitem> + <para>Download (FTP): <ulink url="&mdadm-download-ftp;"/></para> + </listitem> + <listitem> + <para>Download MD5 sum: &mdadm-md5sum;</para> + </listitem> + <listitem> + <para>Download size: &mdadm-size;</para> + </listitem> + <listitem> + <para>Estimated disk space required: &mdadm-buildsize;</para> + </listitem> + <listitem> + <para>Estimated build time: &mdadm-time;</para> + </listitem> + </itemizedlist> + + <para condition="html" role="usernotes">User Notes: + <ulink url="&blfs-wiki;/xfs"/></para> + + </sect2> + + <sect2 role="kernel" id='mdadm-kernel'> + <title>Kernel Configuration</title> + + <para>Enable the following options in the kernel configuration + and recompile the kernel, if necessary. Only the RAID types desired + are required. </para> + +<screen><literal>File Systems: + Device Drivers: + Multiple devices driver support (RAID and LVM): Y + RAID support: Y or M + Autodetect RAID arrays during kernel boot: Y + Linear (append) mode: Y or M + RAID-0 (striping) mode : Y or M + RAID-1 (mirroring) mode : Y or M + RAID-10 (mirrored striping) mode: Y or M + RAID-4/RAID-5/RAID-6 mode : Y or M</literal></screen> + + <indexterm zone="mdadm mdadm-kernel"> + <primary sortas="d-mdadm">mdadm</primary> + </indexterm> + + </sect2> + + <sect2 role="installation"> + <title>Installation of mdadm</title> + + <para>Install <application>mdadm</application> by running the following + commands:</para> + +<screen><userinput>make everything</userinput></screen> + +<!-- <para>This package does not come with a test suite.</para> --> + + <para>Now, as the <systemitem class="username">root</systemitem> user:</para> + +<screen role="root"><userinput>make install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title>Contents</title> + + <segmentedlist> + <segtitle>Installed Programs</segtitle> + <segtitle>Installed Libraries</segtitle> + <segtitle>Installed Directory</segtitle> + + <seglistitem> + <seg>mdadm and mdmon</seg> + <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> + <para>manages MD devices aka Linux Software RAID.</para> + <indexterm zone="mdadm mdadm-prog"> + <primary sortas="b-mdadm-prog">mdadm</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mdmon"> + <term><command>mdmon</command></term> + <listitem> + <para>monitors MD external metadata arrays.</para> + <indexterm zone="mdadm mdmon"> + <primary sortas="b-mdmon">mdmon</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> Property changes on: trunk/BOOK/postlfs/filesystems/mdadm.xml ___________________________________________________________________ Added: svn:keywords + LastChangedBy Date -- http://linuxfromscratch.org/mailman/listinfo/blfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
