<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sexy Sexy Penguins &#187; RAID</title>
	<atom:link href="http://sexysexypenguins.com/category/raid/feed/" rel="self" type="application/rss+xml" />
	<link>http://sexysexypenguins.com</link>
	<description>I love the smell of &#34;Free Software&#34; in the morning</description>
	<lastBuildDate>Sat, 19 May 2012 20:27:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>RAID 6 &#8211; Fedora Core 6</title>
		<link>http://sexysexypenguins.com/2007/05/22/raid-6-fedora-core-6/</link>
		<comments>http://sexysexypenguins.com/2007/05/22/raid-6-fedora-core-6/#comments</comments>
		<pubDate>Wed, 23 May 2007 03:08:45 +0000</pubDate>
		<dc:creator>herlo</dc:creator>
				<category><![CDATA[RAID]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://fedora-tutorials.com/2007/05/22/raid-6-fedora-core-6/</guid>
		<description><![CDATA[You&#8217;ve probably heard of RAID 0, RAID 1, and even RAID 5. But RAID 6? What is Raid 6 you ask? Well, first we need to take a look at RAID 5 and understand how it works. If you understand &#8230; <a href="http://sexysexypenguins.com/2007/05/22/raid-6-fedora-core-6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve probably heard of RAID 0, RAID 1, and even RAID 5.  But RAID 6?</p>
<p>What is Raid 6 you ask?  Well, first we need to take a look at RAID 5 and understand how it works.  If you understand RAID 5, then RAID 6 is an easy transition.</p>
<p>RAID 5 is  what is referred to as a striped set with distributed <a href="http://en.wikipedia.org/wiki/Parity_bit" title="Parity bit">parity</a>.  Essentially, the data is spread across the disk, and one bit is flipped each time a piece of data is written.  This helps the RAID 5 set compute the missing data if one of the drives fails.</p>
<p>RAID 6 extends this concept one further by providing an additional drive for distributing the parity.  Essentially, there is one more disk that can fail before data is lost.  Comparing this with RAID 5, you get more redundancy.  Comparing this with RAID 10 might be something you&#8217;d consider as well, but RAID 6 is better if for nothing more than the cost and efficiency.</p>
<p><em>So</em> how do you configure linux with Software RAID 6?  With Fedora Core 6 and Red Hat Enterprise Linux 5, RAID 6 is easily configured.  Here&#8217;s how:</p>
<p><em>Four</em> disk drives are recommended (3 are required) to set up the raid, <em>five</em> if you want a hot spare.  This initial sacrifice of two (or three) drives will come in handy later on when something fails.   This demonstration will use 4 512MB usb drives, sdb, sdc, sdd and sde.</p>
<p>First we need to partition the drives and assign them the correct partition type.  As a general rule, partitioning the entire space on the disk is appropriate:</p>
<p><code># fdisk /dev/sdd</code></p>
<p>Create a new partition using the entire disk:</p>
<p><code>Command (m for help): n<br />
Command action<br />
e   extended<br />
p   primary partition (1-4)<br />
p<br />
Partition number (1-4): 1<br />
First cylinder (1-1019, default 1):<br />
Using default value 1<br />
Last cylinder or +size or +sizeM or +sizeK (1-1019, default 1019):<br />
Using default value 1019</code></p>
<p>Change the type of the partition from the default (83 Linux):</p>
<p><code>Command (m for help): t<br />
Selected partition 1<br />
Hex code (type L to list codes): l</code></p>
<p><code>. . . snip . . .</code></p>
<p><code>17  Hidden HPFS/NTF   64  Novell Netware    b7  BSDI fs         fd  Linux raid auto</code></p>
<p><code>Hex code (type L to list codes): fd<br />
Changed system type of partition 1 to fd (Linux raid autodetect)</code></p>
<p>Now the device is created, lets have a look at it and write it out to the partition table:</p>
<p><code>Command (m for help): p</code></p>
<p><code>Disk /dev/sdd: 501 MB, 501088256 bytes<br />
16 heads, 60 sectors/track, 1019 cylinders<br />
Units = cylinders of 960 * 512 = 491520 bytes</code></p>
<p><code>Device      Boot   Start              End           Blocks     Id    System<br />
/dev/sdd1                         1         1019          489090     fd    Linux raid autodetect</code></p>
<p><code>Command (m for help): w<br />
The partition table has been altered!</code></p>
<p>Make sure to do this for each of your devices.  Once that the partitions are created, we need to load the module that will support RAID 6.</p>
<p><code># modprobe raid6<br />
# lsmod | grep raid<br />
raid456               123985  0<br />
xor                    18249  1 raid456</code></p>
<p>Now create the software RAID 6 device:</p>
<p><code># mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sd{b,c,d,e}1<br />
mdadm: array /dev/md0 started.</code></p>
<p>Yes, the array is started, but it does take some time to build.  Try the <strong>watch</strong> command to show the array build in real time (almost).</p>
<p><code>#  watch cat /proc/mdstat</code></p>
<p><code>Every 2.0s: cat /proc/mdstat                                                                                                            Tue May 22 20:12:47 2007</code></p>
<p><code>Personalities : [raid6] [raid5] [raid4]<br />
md0 : active raid6 sde1[3] sdd1[2] sdc1[1] sdb1[0]<br />
978048 blocks level 6, 64k chunk, algorithm 2 [4/4] [UUUU]<br />
[====&gt;................]  resync = 21.3% (104760/489024) finish=23.8min speed=266K/sec</code></p>
<p><code>Personalities : [raid6] [raid5] [raid4]<br />
md0 : active raid6 sde1[3] sdd1[2] sdc1[1] sdb1[0]<br />
978048 blocks level 6, 64k chunk, algorithm 2 [4/4] [UUUU]<br />
[===================&gt;.]  resync = 95.6% (468472/489024) finish=1.2min speed=267K/sec</code></p>
<p><code>Personalities : [raid6] [raid5] [raid4]<br />
md0 : active raid6 sde1[3] sdd1[2] sdc1[1] sdb1[0]<br />
978048 blocks level 6, 64k chunk, algorithm 2 [4/4] [UUUU]</code></p>
<p>Make a filesystem on the new RAID 6:</p>
<p><code># mkfs -t ext3 -b 4096 /dev/md0<br />
. . . snip . . .</code></p>
<p>Mount the new filesytem:</p>
<p><code># mkdir /storage;  mount /dev/md0 /storage</code><br />
<code># mount</code><br />
<code>. . . snip . . .</code><br />
<code>/dev/md0 on /storage type ext3 (rw)</code></p>
<p>Enjoy the RAID 6.  Later on, I&#8217;ll write another tutorial on failing and recovering this RAID 6 and other software raid devices.</p>
<p>RAID 6 will grow more and more as its adopted and understood, get your Software RAID 6 configured soon.</p>
<p>Cheers,</p>
<p>Herlo</p>
]]></content:encoded>
			<wfw:commentRss>http://sexysexypenguins.com/2007/05/22/raid-6-fedora-core-6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

