<?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>Games, Life, and Stuff &#187; raid</title>
	<atom:link href="http://www.techknight.com/blog/tag/raid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techknight.com/blog</link>
	<description>Game development and more</description>
	<lastBuildDate>Thu, 12 Aug 2010 02:37:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fileserver fun</title>
		<link>http://www.techknight.com/blog/2008/03/28/fileserver-fun/</link>
		<comments>http://www.techknight.com/blog/2008/03/28/fileserver-fun/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 17:46:00 +0000</pubDate>
		<dc:creator>techknight</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://www.techknight.com/blog/2008/03/28/fileserver-fun/</guid>
		<description><![CDATA[This week, when I noticed that 500GB drives had gone down to $99 at Canada Computers, I decided to upgrade my file server. I use mdadm, a Linux-based software RAID solution, to handle the array. For the non-technical, this means that if I have four hard drives I can combine them into one big drive [...]]]></description>
			<content:encoded><![CDATA[<p>This week, when I noticed that 500GB drives had gone down to <a href="http://www.canadacomputers.com/index.php?do=ShowProduct&amp;cmd=pd&amp;pid=014525&amp;cid=HD.443.877">$99 at Canada Computers</a>, I decided to upgrade my file server.
<p>I use <a href="http://neil.brown.name/blog/mdadm">mdadm</a>, a Linux-based software <a href="http://en.wikipedia.org/wiki/RAID">RAID</a> solution, to handle the array. For the non-technical, this means that if I have four hard drives I can combine them into one big drive with a certain percentage of the space reserved for parity data. This parity data acts as a safety net: if any one of the hard drives die, the missing contents of that drive can be calculated from the data on the remaining drives. It&#8217;s magic!
<p>When the two extra drives were installed, the array had to be grown to use them. The documentation for doing this is kind of scattered all over the place so I wanted to record the steps I went through in one place:
<p>Notes<br />
<blockquote>
<p>My raid device: <br />/dev/md0 (ext3 filesystem) <br />Existing drives in the array: <br />/dev/sdb, /dev/sdc, /dev/sdd, /dev/sde <br />Newly installed drives: <br />/dev/sdf, /dev/sdg</p>
</blockquote>
<p>Add the two extra drives<br />
<blockquote>
<p>mdadm &#8211;add /dev/md0 /dev/sdf <br />mdadm &#8211;add /dev/md0 /dev/sdg</p>
</blockquote>
<p>Grow the array<br />
<blockquote>
<p>mdadm &#8211;grow /dev/md0 &#8211;raid-devices=6</p>
</blockquote>
<p>Increase the default speed of the growth (For me this meant the difference between taking 125 hours to complete and just 12 hours)<br />
<blockquote>
<p>echo 1000000 &gt; /proc/sys/dev/raid/speed_limit_max <br />echo 50000 &gt; /proc/sys/dev/raid/speed_limit_min</p>
</blockquote>
<p>Watch and wait for the growth of the array to finish<br />
<blockquote>
<p>watch cat /proc/mdstat</p>
</blockquote>
<p>Do a filesystem check<br />
<blockquote>
<p>e2fsck -f /dev/md0</p>
</blockquote>
<p>Resize the filesystem to match the new array size<br />
<blockquote>
<p>resize2fs /dev/md0</p>
</blockquote>
<p>Isn&#8217;t Linux ridiculously simple? If you&#8217;re using /etc/mdadm.conf don&#8217;t forget to update it with the new value for num-devices.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techknight.com/blog/2008/03/28/fileserver-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
