<?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>Frozen Industries &#187; file systems</title>
	<atom:link href="http://www.frozenindustries.com/category/file-systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frozenindustries.com</link>
	<description>A Project Blog</description>
	<lastBuildDate>Wed, 09 Nov 2011 01:58:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>parted</title>
		<link>http://www.frozenindustries.com/2011/04/25/parted/</link>
		<comments>http://www.frozenindustries.com/2011/04/25/parted/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 03:55:02 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/?p=330</guid>
		<description><![CDATA[Create a single, aligned partition on a drive larger than 2TB. % sudo parted /dev/sdx &#40;parted&#41;% mklabel gpt &#40;parted&#41;% mkpart primary 1 -1]]></description>
			<content:encoded><![CDATA[<p>Create a single, aligned partition on a drive larger than 2TB.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> parted <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdx
<span style="color: #7a0874; font-weight: bold;">&#40;</span>parted<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">%</span> mklabel gpt
<span style="color: #7a0874; font-weight: bold;">&#40;</span>parted<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">%</span> mkpart primary <span style="color: #000000;">1</span> <span style="color: #660033;">-1</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2011/04/25/parted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Software RAID10 Benchmarks</title>
		<link>http://www.frozenindustries.com/2010/01/31/linux-software-raid10-benchmarks/</link>
		<comments>http://www.frozenindustries.com/2010/01/31/linux-software-raid10-benchmarks/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 21:55:34 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/?p=205</guid>
		<description><![CDATA[Tests are done across four 7200RPM SATAII drives on a PCI-X card sitting on a PCI (32-bit, 133MB/sec theoretical max) bus, probably the slowest bus configuration possible, and then again after being moved to a motherboard with dual PCI-X slots. Server is running Ubuntu 9.10 AMD64 Server. Benchmark is a simple &#8216;dd&#8217; sequential read and [...]]]></description>
			<content:encoded><![CDATA[<p>Tests are done across four 7200RPM SATAII drives on a PCI-X card sitting on a PCI (32-bit, 133MB/sec theoretical max) bus, probably the slowest bus configuration possible, and then again after being moved to a motherboard with dual PCI-X slots. Server is running Ubuntu 9.10 AMD64 Server.</p>
<p>Benchmark is a simple &#8216;dd&#8217; sequential read and write.</p>
<blockquote><p>write: dd if=/dev/zero of=/dev/md2 bs=1M<br />
read: dd if=/dev/md2 of=/dev/null bs=1M</p></blockquote>
<p>mdadm &#8211;create /dev/md2 &#8211;verbose &#8211;level=10 &#8211;layout=n2 &#8211;raid-devices=4 /dev/sd[ftlm]1</p>
<table>
<tbody>
<tr>
<td></td>
<td>PCI</td>
<td>PCI-X</td>
</tr>
</tbody>
<tbody>
<tr>
<td>write:</td>
<td>13.2 MB/s</td>
<td>144 MB/s</td>
</tr>
<tr>
<td>read:</td>
<td>4.0 MB/s</td>
<td>89.3 MB/s</td>
</tr>
</tbody>
</table>
<p>mdadm &#8211;create /dev/md2 &#8211;verbose &#8211;level=10 &#8211;layout=f2 &#8211;raid-devices=4 /dev/sd[ftlm]1</p>
<table>
<tbody>
<tr>
<td></td>
<td>PCI</td>
<td>PCI-X</td>
</tr>
</tbody>
<tbody>
<tr>
<td>write:</td>
<td>48.3 MB/s</td>
<td>131 MB/s</td>
</tr>
<tr>
<td>read:</td>
<td>92.7 MB/s</td>
<td>138 MB/s</td>
</tr>
</tbody>
</table>
<p>mdadm &#8211;create /dev/md2 &#8211;verbose &#8211;level=10 &#8211;layout=o2 &#8211;raid-devices=4 /dev/sd[ftlm]1</p>
<table>
<tbody>
<tr>
<td></td>
<td>PCI</td>
<td>PCI-X</td>
</tr>
</tbody>
<tbody>
<tr>
<td>write:</td>
<td>47.4 MB/s</td>
<td>135 MB/s</td>
</tr>
<tr>
<td>read:</td>
<td>98.7 MB/s</td>
<td>142 MB/s</td>
</tr>
</tbody>
</table>
<p>And more comparisons:</p>
<p>RAID1 (PCI)</p>
<blockquote><p>write: 38.9 MB/s<br />
read: 64.8 MB/s</p></blockquote>
<p>Single Disk (PCI)</p>
<blockquote><p>write: 59.4 MB/s<br />
read: 71.9 MB/s</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2010/01/31/linux-software-raid10-benchmarks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remove Stale LVM Devices</title>
		<link>http://www.frozenindustries.com/2010/01/23/remove-stale-lvm-devices/</link>
		<comments>http://www.frozenindustries.com/2010/01/23/remove-stale-lvm-devices/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 06:47:04 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/?p=182</guid>
		<description><![CDATA[Have an LVM device left on your system from a drive that was removed before pvremove was run? 1 $ sudo dmsetup remove /dev/mapper/removed-device]]></description>
			<content:encoded><![CDATA[<p>Have an LVM device left on your system from a drive that was removed before pvremove was run?</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> dmsetup remove <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>removed-device</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2010/01/23/remove-stale-lvm-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace an LVM Drive with a Larger One</title>
		<link>http://www.frozenindustries.com/2009/03/21/replace-an-lvm-drive-with-a-larger-one/</link>
		<comments>http://www.frozenindustries.com/2009/03/21/replace-an-lvm-drive-with-a-larger-one/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 06:56:19 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/?p=125</guid>
		<description><![CDATA[LVM allows you to hot add devices to expand volume space. It also allows you to hot remove devices, as long as there are enough free extents in the volume group (vgdisplay) to move data around. Here I&#8217;m going to replace a 400 GB drive (sdg) with a 750 GB one (sdf) from logical volume [...]]]></description>
			<content:encoded><![CDATA[<p>LVM allows you to hot add devices to expand volume space. It also allows you to hot remove devices, as long as there are enough free extents in the volume group (vgdisplay) to move data around. Here I&#8217;m going to replace a 400 GB drive (sdg) with a 750 GB one (sdf) from logical volume &#8220;backup&#8221; on volume group &#8220;disks&#8221;. It does not matter how many hard drives are in the volume group, and the filesystem can stay mounted.</p>
<ol>
<li>Partition and create a physical volume on the device

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pvcreate <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdh1</pre></td></tr></table></div>

</li>
<li>Add the new drive to the volume group

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> vgextend disks <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdh1</pre></td></tr></table></div>

</li>
<li>Move all extents from the old drive to the new one (this step may take hours)

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$  <span style="color: #c20cb9; font-weight: bold;">sudo</span> pvmove <span style="color: #660033;">-v</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdg1</pre></td></tr></table></div>

</li>
<li>Remove the old drive

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> vgreduce disks <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdg1</pre></td></tr></table></div>

</li>
<li>Expand the logical volume to use the rest of the disk. In this case, another 350GB.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> lvextend -l+<span style="color: #000000;">83463</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disks<span style="color: #000000; font-weight: bold;">/</span>backup</pre></td></tr></table></div>

</li>
<li>Expand the file system

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> resize2fs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disks<span style="color: #000000; font-weight: bold;">/</span>backup</pre></td></tr></table></div>

</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2009/03/21/replace-an-lvm-drive-with-a-larger-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mdadm Cheatsheet</title>
		<link>http://www.frozenindustries.com/2008/11/04/building-and-finding-raid-arrays/</link>
		<comments>http://www.frozenindustries.com/2008/11/04/building-and-finding-raid-arrays/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 18:49:15 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/?p=101</guid>
		<description><![CDATA[Scan a system for RAID arrays and save findings so the array reappears across reboots: 1 # mdadm --detail --scan &#62;&#62; /etc/mdadm/mdadm.conf Create a RAID5 array out of sdm1, sdj1, and a missing disk (all partitioned with raid-autodetect partitions) 1 # mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sd[mj]1 missing Create a RAID1 array 1 # mdadm [...]]]></description>
			<content:encoded><![CDATA[<p>Scan a system for RAID arrays and save findings so the array reappears across reboots:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mdadm --detail --scan &gt;&gt; /etc/mdadm/mdadm.conf</span></pre></td></tr></table></div>

<p>Create a RAID5 array out of sdm1, sdj1, and a missing disk (all partitioned with raid-autodetect partitions)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sd[mj]1 missing</span></pre></td></tr></table></div>

<p>Create a RAID1 array</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sd[ts]1</span></pre></td></tr></table></div>

<p>Remove a RAID array</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mdadm --stop /dev/md1</span>
<span style="color: #666666; font-style: italic;"># mdadm --zero-superblock /dev/sd[ts]1</span></pre></td></tr></table></div>

<p>Replace a failed drive that has been removed from the system</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mdadm /dev/md3  --add /dev/sdc1 --remove detached</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2008/11/04/building-and-finding-raid-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hdparm -t /dev/md0</title>
		<link>http://www.frozenindustries.com/2007/06/22/hdparm-t-devmd0/</link>
		<comments>http://www.frozenindustries.com/2007/06/22/hdparm-t-devmd0/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 14:25:49 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/2007/06/22/hdparm-t-devmd0/</guid>
		<description><![CDATA[/dev/md0: Timing buffered disk reads: 1248 MB in 3.00 seconds = 415.65 MB/sec]]></description>
			<content:encoded><![CDATA[<blockquote><p><code>/dev/md0:<br />
Timing buffered disk reads:  1248 MB in  3.00 seconds = 415.65 MB/sec</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2007/06/22/hdparm-t-devmd0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MDADM Versions</title>
		<link>http://www.frozenindustries.com/2007/06/16/mdadm-versions/</link>
		<comments>http://www.frozenindustries.com/2007/06/16/mdadm-versions/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 20:36:24 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/2007/06/16/mdadm-versions/</guid>
		<description><![CDATA[distro kernel version mdadm version Ubuntu 6.06 LTS 2.6.15 1.12.0 Ubuntu 7.04 2.6.20 2.5.6 Ubuntu 8.04 LTS 2.6.24 2.6.3 Ubuntu 8.10 2.6.27 2.6.7 Ubuntu 9.04 2.6.28 2.6.7.1 Ubuntu 10.04 LTS 2.6.32 2.6.7.1 Ubuntu 10.10 2.6.35 2.6.7.1 Ubuntu 11.04 2.6.38 3.1.4 CentOS 4.5 2.6.9 1.12.0 CentOS 5.0 2.6.18 2.5.4 CentOS 6.0 2.6.32 3.1.3 Debian 4.0 2.6.18 [...]]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td>distro</td>
<td>kernel version</td>
<td>mdadm version</td>
</tr>
<tr>
<td>Ubuntu 6.06 LTS</td>
<td>2.6.15</td>
<td>1.12.0</td>
</tr>
<tr>
<td>Ubuntu 7.04</td>
<td>2.6.20</td>
<td>2.5.6</td>
</tr>
<tr>
<td>Ubuntu 8.04 LTS</td>
<td>2.6.24</td>
<td>2.6.3</td>
</tr>
<tr>
<td>Ubuntu 8.10</td>
<td>2.6.27</td>
<td>2.6.7</td>
</tr>
<tr>
<td>Ubuntu 9.04</td>
<td>2.6.28</td>
<td>2.6.7.1</td>
</tr>
<tr>
<td>Ubuntu 10.04 LTS</td>
<td>2.6.32</td>
<td>2.6.7.1</td>
</tr>
<tr>
<td>Ubuntu 10.10</td>
<td>2.6.35</td>
<td>2.6.7.1</td>
</tr>
<tr>
<td>Ubuntu 11.04</td>
<td>2.6.38</td>
<td>3.1.4</td>
</tr>
<tr>
<td>CentOS 4.5</td>
<td>2.6.9</td>
<td>1.12.0</td>
</tr>
<tr>
<td>CentOS 5.0</td>
<td>2.6.18</td>
<td>2.5.4</td>
</tr>
<tr>
<td>CentOS 6.0</td>
<td>2.6.32</td>
<td>3.1.3</td>
</tr>
<tr>
<td>Debian 4.0</td>
<td>2.6.18</td>
<td>2.5.6</td>
</tr>
<tr>
<td>Debian 5.0</td>
<td>2.6.26</td>
<td>2.6.7.2</td>
</tr>
<tr>
<td>Debian 6.0</td>
<td>2.6.32</td>
<td>3.1.4</td>
</tr>
<tr>
<td>Fedora 7</td>
<td>2.6.21</td>
<td>2.6.1</td>
</tr>
<tr>
<td>Fedora 15</td>
<td>2.6.38</td>
<td>3.1.5</td>
</tr>
</tbody>
</table>
<p>MDADM 2.x on kernels &gt;2.6.17 supports online resizing of RAID 5 arrays <img src='http://www.frozenindustries.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2007/06/16/mdadm-versions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed Up Rebuilding Linux Software RAID Arrarys</title>
		<link>http://www.frozenindustries.com/2007/05/16/speed-up-rebuilding-linux-raid-arrarys/</link>
		<comments>http://www.frozenindustries.com/2007/05/16/speed-up-rebuilding-linux-raid-arrarys/#comments</comments>
		<pubDate>Wed, 16 May 2007 17:16:41 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/2007/05/16/speed-up-rebuilding-linux-raid-arrarys/</guid>
		<description><![CDATA[# cat /proc/mdstat md0 : active raid5 sdf1[7] sdb1[0] sde1[5] sdg1[4] sdh1[3] sdd1[2] sdc1[1] 1465175424 blocks level 5, 64k chunk, algorithm 2 [7/6] [UUUUUU_] [&#62;....................] recovery = 1.3% (3331200/244195904) finish=2357.0min speed=1700K/sec Ouch. Two files are used to control the speed of rebuilding RAID arrays in Linux. /proc/sys/dev/raid/speed_limit_min /proc/sys/dev/raid/speed_limit_max Even though my _max file is set [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p># cat /proc/mdstat</p></blockquote>
<blockquote><p>md0 : active raid5 sdf1[7] sdb1[0] sde1[5] sdg1[4] sdh1[3] sdd1[2] sdc1[1]<br />
1465175424 blocks level 5, 64k chunk, algorithm 2 [7/6] [UUUUUU_]<br />
[&gt;....................]  recovery =  1.3% (3331200/244195904) <strong>finish=2357.0min speed=1700K/sec</strong></p></blockquote>
<p>Ouch. Two files are used to control the speed of rebuilding RAID arrays in Linux.</p>
<blockquote><p>/proc/sys/dev/raid/speed_limit_min<br />
/proc/sys/dev/raid/speed_limit_max</p></blockquote>
<p>Even though my _max file is set to 200,000K/sec and my system is not doing anything, my RAID 5 rebuild process is hovering around the _min rebuild speed, of 1,000K/sec. With my setup this will take approximately 40 hours to complete, which is too long for me to wait.  So, I pushed the _min speed up to 10,000K/sec, which will now take 6 hours to finish, and use slightly more of my system&#8217;s idle resources.</p>
<blockquote><p>root# echo &#8220;10000&#8243; &gt; /proc/sys/dev/raid/speed_limit_min</p></blockquote>
<p>Later I set _min to 50,000K/sec, and the rebuild speed topped out at 25,000K/sec.</p>
<blockquote><p> #cat /proc/mdstat</p>
<p>Personalities : [raid5]<br />
md0 : active raid5 sdf1[7] sdb1[0] sde1[5] sdg1[4] sdh1[3] sdd1[2] sdc1[1]<br />
1465175424 blocks level 5, 64k chunk, algorithm 2 [7/6] [UUUUUU_]<br />
[=&gt;...................]  recovery =  5.1% (12661840/244195904) <strong>finish=149.9min speed=25726K/sec</strong></p></blockquote>
<p>The rebuild took less than 3 hours, down from the original 40.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2007/05/16/speed-up-rebuilding-linux-raid-arrarys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Swap Hard Drives with Ubuntu 6.10</title>
		<link>http://www.frozenindustries.com/2007/01/16/swap-hard-drives-with-ubuntu-610/</link>
		<comments>http://www.frozenindustries.com/2007/01/16/swap-hard-drives-with-ubuntu-610/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 20:50:01 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/2007/01/16/swap-hard-drives-with-ubuntu-610/</guid>
		<description><![CDATA[I recently upgrade my main workstation&#8217;s hard drive under Ubuntu 6.10 and noticed a couple things changed during the process. Here are my instructions for a fast and reliably hard drive swap. I&#8217;m using SATA drives without LVM using the default Ubuntu install and partition options for this howto. Prepare Shutdown your machine and install [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgrade my main workstation&#8217;s hard drive under Ubuntu 6.10 and noticed a couple things changed during the process. Here are my instructions for a fast and reliably hard drive swap. I&#8217;m using SATA drives without LVM using the default Ubuntu install and partition options for this howto.</p>
<ol>
<li>Prepare</li>
<ol>
<li>Shutdown your machine and install your new hard drive. Don&#8217;t mess with your current hard drive (yet)</li>
<li>Find a LiveCD, I used the Ubuntu 6.10 LiveCD, it matched my OS, but it doesn&#8217;t have to. Knoppix should work fine.</li>
<li>Boot using your LiveCD</li>
<li>After booting, open a terminal and &#8220;sudo su&#8221; to become root</li>
</ol>
<li>Setup your new drive</li>
<ol>
<li>Use <strong>cfdisk /dev/sda</strong> to look at your partitions on your current drive. I have sda1 of type linux as most of my current drive, and a 6 GB sda5 as linux swap at the end</li>
<li>Duplicate this on your new drive using <strong>cfdisk /dev/sdb</strong>, adjusting for space as necessary. I created a new primary partition using cfdisk using all but 6 GB of space, then a new logical partition using the rest of the space. You must create the partitions in this order to get the right numbering</li>
<li>make the primary partition to bootable</li>
<li>set the swap partition as type 82 (linux swap)</li>
<li>save and quit</li>
<li>create filesystems on the new partitions using <strong>mkfs.ext3 /dev/sdb1</strong> and <strong>mkswap /dev/sdb5</strong></li>
</ol>
<li>Copy data</li>
<ol>
<li>Make directories to mount your old and new partitions, in this case, /mnt/sda1 and /mnt/sdb1</li>
<li>Mount your drives to these partitions using <strong>mount /dev/sda1 /mnt/sda1</strong> and <strong>mount /dev/sdb1 /mnt/sdb1</strong></li>
<li>Copy all your data from your old drive to your new drive using <strong>cp -a /mnt/sda1/* /mnt/sdb1/ </strong>. The -a will preserve owners, permissions, date, etc.</li>
<li>Get up and do something else. It took 70 minutes for my machine to copy about 150 GB of data from one drive to the other</li>
</ol>
<li>Fix the boot options</li>
<ol>
<li>This is where Ubuntu 6.10 differs from previous versions. Fstab and menu.lst both use UUID numbers to find partitions. To get the UUID number of your new partitions, run <strong>vol_id /dev/sdb1</strong> and <strong>vol_id /dev/sdb5</strong> . Copy these numbers into their appropriate places in your /mnt/sdb1/etc/fstab and /mnt/sdb1/boot/grub/menu.lst files. You may need to dig around the menu.lst to find all the entries.</li>
<li>Now install grub onto the MBR of the new drive to make it bootable. To do this I first chroot into my new system using <strong>chroot /mnt/sdb1 /bin/bash</strong> . Now that you&#8217;re in the new system, run <strong>grub</strong>. Inside grub, run <strong>setup (hd1,0)</strong> then <strong>root (hd1)</strong> . This will differ if you have a different drive setup. Quit grub (<strong>quit</strong>).</li>
</ol>
<li>Finish up</li>
<ol>
<li>Logout of your chroot (<strong>logout</strong>), unmount your mounted drives <strong>umount /dev/sda1</strong> and <strong>umount /dev/sdb1</strong>, and shutdown your computer. Disconnect your old drive, plug your new drive into the old drive&#8217;s cable, and start your computer back up. If everything went well, it will boot back up as if nothing happened.</li>
</ol>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2007/01/16/swap-hard-drives-with-ubuntu-610/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Couple Ways to Run FSCK on Ubuntu</title>
		<link>http://www.frozenindustries.com/2006/11/19/a-couple-ways-to-run-fsck-on-ubuntu/</link>
		<comments>http://www.frozenindustries.com/2006/11/19/a-couple-ways-to-run-fsck-on-ubuntu/#comments</comments>
		<pubDate>Sun, 19 Nov 2006 19:32:08 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[file systems]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.frozenindustries.com/2006/11/19/a-couple-ways-to-run-fsck-on-ubuntu/</guid>
		<description><![CDATA[My server decided that an executable file didn&#8217;t really exist on the file system, or so I thought. Lack of sleep was the main problem, but here are some things I did to check my file system for errors. I setup this file system on a Ubuntu 6.06 AMD64 install with LVM, so everything is [...]]]></description>
			<content:encoded><![CDATA[<p>My server decided that an executable file didn&#8217;t really exist on the file system, or so I thought. Lack of sleep was the main problem, but here are some things I did to check my file system for errors. I setup this file system on a Ubuntu 6.06 AMD64 install with LVM, so everything is in LVM instead of standard partitions.</p>
<blockquote><p># sudo e2fsck -n /dev/mapper/Ubuntu-root</p></blockquote>
<p>This was showing errors, but I ran it while the system was mounted and running, so there were open files, so this was normal. The -n kept e2fsck from attempting to fix anything, which was good because later I ran the command after booting from an Ubuntu LiveCD and found no errors.</p>
<p>Before booting from the LiveCD I tried to get the system to fix itself by running fsck on boot. Two methods I used to do this on Ubuntu were running these from the live system before rebooting, they both accomplish the same thing, so only one was really needed.</p>
<blockquote><p># sudo touch /forcefsck</p>
<p># sudo tune2fs -C 40 /dev/mapper/Ubuntu-root</p></blockquote>
<p>These appeared to have no affect, probably because the filesystem was fine, but I took down the system and ran fsck from a LiveCD instead. Of course, this wasn&#8217;t as simple as it should have been, the LiveCD did not detect my LVM volumes, so /dev/mapper/Ubuntu-root was missing. The fix was to install LVM2 and start it up.</p>
<blockquote><p># sudo apt-get install lvm2<br />
# sudo /etc/init.d/lvm start</p></blockquote>
<p>The /dev/mapper/ entries then appeared and I could run all the fscks I wanted. At this point my fsck checks were coming out clean, so file system corruption was not to blame.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozenindustries.com/2006/11/19/a-couple-ways-to-run-fsck-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

