<?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>Roo's View &#187; Computing</title>
	<atom:link href="http://www.lowtek.ca/roo/category/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lowtek.ca/roo</link>
	<description>A clever tagline should go here</description>
	<lastBuildDate>Mon, 02 Aug 2010 02:25:07 +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>Review: Cooler Master Elite 335</title>
		<link>http://www.lowtek.ca/roo/2010/review-cooler-master-elite-335/</link>
		<comments>http://www.lowtek.ca/roo/2010/review-cooler-master-elite-335/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 01:57:29 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=673</guid>
		<description><![CDATA[When I initially planned my upgrade to a Core I3 system I was going to re-use my existing mid-tower case.  I knew I needed a larger (and more modern) power supply, but assumed wrongly that the new motherboard would match up.  The plan changed when I realized that the front mounted USB connectors and power [...]]]></description>
			<content:encoded><![CDATA[<p>When I initially planned my <a href="http://www.lowtek.ca/roo/2010/core-i3-frugal-upgrade/">upgrade to a Core I3 system</a> I was going to re-use my existing mid-tower case.  I knew I needed a larger (and more modern) power supply, but assumed wrongly that the new motherboard would match up.  The plan changed when I realized that the front mounted USB connectors and power button were not going to match up to the new motherboard without some surgery.</p>
<p>Having already invested in a new power supply, I decided to pick up just a case.  In hindsight I could have probably found a good deal on a case + power supply.  This post was inspired by the fact that I really couldn&#8217;t find any reviews of the case I did select: <a href="http://www.canadacomputers.com/product_info.php?cPath=6_112&amp;item_id=020103&amp;sid=bccp3dujbq7t7faqmjaouaa2o5">CoolerMaster Elite 335</a> &#8211; currently $42.99.  There was a review of the <a href="http://benchmarkreviews.com/index.php?option=com_content&amp;task=view&amp;id=297&amp;Itemid=61">CoolerMaster Elite 330</a> which is a very similar case.</p>
<p>Summary: After using this case for some time I&#8217;m quite happy with it, especially given the price.  There are some minor improvements that could be made, but you get a nice looking case with a useful feature set and high level of compatibility.</p>
<p>Read on for a full review..</p>
<p>(...)<br/>Read the rest of <a href="http://www.lowtek.ca/roo/2010/review-cooler-master-elite-335/">Review: Cooler Master Elite 335</a> (731 words)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lowtek.ca/roo/2010/review-cooler-master-elite-335/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Core i3 frugal upgrade</title>
		<link>http://www.lowtek.ca/roo/2010/core-i3-frugal-upgrade/</link>
		<comments>http://www.lowtek.ca/roo/2010/core-i3-frugal-upgrade/#comments</comments>
		<pubDate>Sat, 01 May 2010 04:18:04 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=646</guid>
		<description><![CDATA[When I was a teenager and into my early 20&#8242;s my computer gear was always bleeding edge.  If I had forgone most of the computer gear, I probably could have had a car during university &#8211; but having the coolest setup was what it was all about. Once I started work full-time, my work supplied [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lowtek.ca/roo/wp-content/uploads/2010/04/IMG_0295.jpg"><img class="aligncenter size-full wp-image-649" title="IMG_0295" src="http://www.lowtek.ca/roo/wp-content/uploads/2010/04/IMG_0295.jpg" alt="" width="500" height="375" /></a></p>
<p>When I was a teenager and into my early 20&#8242;s my computer gear was always bleeding edge.  If I had forgone most of the computer gear, I probably could have had a car during university &#8211; but having the coolest setup was what it was all about. Once I started work full-time, my work supplied hardware far outpaced what I could justify at home. Somewhere between then and my 30&#8242;s I lost the drive to have the coolest stuff and got by with trailing edge gear. Until recently my desktop was a refurbished <a href="http://en.wikipedia.org/wiki/Celeron#Cedar_Mill-512">Celeron 3.06GHz</a> machine that I picked up a couple of years ago for $200.</p>
<p>The issue is that even a horribly dated machine can still run everything you need, just not very fast. Especially given that your average home computing is about surfing the web and maybe some simple file management (let&#8217;s ignore the gamer machine which is a totally different story). Having recently upgraded Jenn to a dual core iMac, and also getting a dual-core laptop for work &#8211; the celeron was feeling really slow. The straw that broke the camels back was the insanely poor performance of iTunes under VMWare hosting WindowsXP.</p>
<p>Trent had pointed me at <a href="http://techreport.com">techreport.com</a>, specifically the <a href="http://techreport.com/system/">system guide</a> as a good source for reviews and advice. I had initially thought I&#8217;d get an <a href="http://en.wikipedia.org/wiki/Advanced_Micro_Devices">AMD</a> based system until the introduction of the lower cost <a href="http://en.wikipedia.org/wiki/Intel_Core#Core_i3">Core i3</a> early this year. After some extensive online pricing/shopping I settled on a very frugal upgrade plan.</p>
<p>$129.77 <a href="http://pccyber.com/?v=Product&amp;i=CPU-BX80616I3530">Intel Core i3</a><br />
$114.99 <a href="http://www.canadacomputers.com/product_info.php?cPath=26_583&amp;item_id=028765&amp;sid=3nk4ljo6cvf8665lk6kemnsb07">Gigabyte GA-H55M-USB3</a><br />
$53.77 <a href="http://pccyber.com/?v=Product&amp;i=RAM-EVM-1333">2GB DDR3 1333MHz</a> (1 stick)<br />
$54.99 <a href="http://www.canadacomputers.com/product_info.php?cPath=33_442&amp;item_id=019950&amp;sid=djmrjme5nkem8jkgp82k37k3r0">Corsair CMPSU-400CX 400W Power Supply</a><br />
$42.99 <a href="http://www.canadacomputers.com/product_info.php?cPath=6_112&amp;item_id=020103&amp;sid=bccp3dujbq7t7faqmjaouaa2o5">Cooler Master Elite 335 Black ATX Mid Tower Case</a></p>
<p>Total: 396.51 + 51.55 tax</p>
<p><a href="http://www.lowtek.ca/roo/wp-content/uploads/2010/04/IMG_0283.jpg"><img class="aligncenter size-full wp-image-647" title="IMG_0283" src="http://www.lowtek.ca/roo/wp-content/uploads/2010/04/IMG_0283.jpg" alt="" width="500" height="329" /></a></p>
<p>Initially I had planned to re-use the current mid-tower case my celeron system was in, however the front panel plug connectors were not compatible and I didn&#8217;t want to start splicing wires to hack things to fit. (Leaving the case intact, gives me a completely functional but slower machine to pass on)</p>
<p>At the top of this post the picture is a close up of the i3 chip installed on the motherboard prior to the installation of the CPU heat sink/fan. If you haven&#8217;t built a system from the ground up previously, it may look complicated but its really quite simple. I chose to install the CPU/heat sink prior to installing the motherboard into the case.</p>
<p>Some of my friends teased me for only going with 2GB of RAM, but with my Ubuntu based desktop and my usage (even with VMWare hosting WindowsXP) I rarely use even half of my RAM. I do plan to upgrade to more in the future (6GB or more) but I&#8217;m waiting for the price of DDR3 to drop to a reasonable cost. The single 2GB stick was cheaper than some of the 2x1GB options and provides the most flexibility for later upgrades.</p>
<p><a href="http://www.lowtek.ca/roo/wp-content/uploads/2010/04/IMG_0285.jpg"><img class="aligncenter size-full wp-image-648" title="IMG_0285" src="http://www.lowtek.ca/roo/wp-content/uploads/2010/04/IMG_0285.jpg" alt="" width="500" height="341" /></a></p>
<p>The power supply was a bit of a pleasant surprise. It came with cable ties, nylon sleeved cables, and a power cord. This power supply is also <a href="http://www.80plus.org/">80+ certified</a> which was one of my requirements for a new power supply. The single large fan keeps the noise level to a minimum.</p>
<p>My motherboard selection was based primarily on the <a href="http://techreport.com/articles.x/18747/3">techreport.com recommendation</a>.  However, this is one of the few <a href="http://en.wikipedia.org/wiki/Usb3.0#USB_3.0">USB3.0</a> capable motherboards that offers integrated graphics support (when used with i3 or i5 processors).  It has 4 slots of DDR3 memory (up to 16GB), Gigabit ethernet, PCI Express x16, IDE and SATA support as well as external SATA. This is a great foundation for my new system allowing plenty of future expandability.  The only feature I noticed it was missing was <a href="http://en.wikipedia.org/wiki/SATA3#SATA_Revision_3.0_.28SATA_6_Gb.2Fs.29">SATA3</a>.</p>
<p>Future upgrades will be to add a graphics card, a large SATA drive and of course more RAM. Looking further into the future, I may consider upgrading to an i7 when the prices drop. While this is still a budget system, it has legs and I&#8217;m back on the leading edge for a short while.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lowtek.ca/roo/2010/core-i3-frugal-upgrade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu on Core i3</title>
		<link>http://www.lowtek.ca/roo/2010/ubuntu-on-core-i3/</link>
		<comments>http://www.lowtek.ca/roo/2010/ubuntu-on-core-i3/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 01:57:56 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=627</guid>
		<description><![CDATA[I wanted to document my upgrade success to an Intel Core i3 based system, this will focus on running Ubuntu on this hardware configuration. The hardware is very simple: Gigabyte GA-H55M-USB3 with Intel Core i3, in general terms I followed the recommendations from techreport.com for their econobox. I was pleased that after assembly the box [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to document my upgrade success to an Intel Core i3 based system, this will focus on running Ubuntu on this hardware configuration. The hardware is very simple: <a href="http://www.canadacomputers.com/product_info.php?cPath=26_583&amp;item_id=028765&amp;sid=atllpbslh25q71svnst5oc1ps1">Gigabyte GA-H55M-USB3</a> with <a href="http://pccyber.com/?v=Product&amp;i=CPU-BX80616I3530">Intel Core i3</a>, in general terms I followed the recommendations from <a href="http://techreport.com/system/">techreport.com</a> for their econobox.</p>
<p>I was pleased that after assembly the box booted on the 1st try! Having simply moved my drive over from my previous system, I was running an up to date <a href="http://releases.ubuntu.com/karmic/">32-bit Ubuntu 9.10</a> system. I started to exercise the box and after about 30mins got my first hang. The hang was a bit odd, the keyboard stopped working (numlock didn&#8217;t work) and the graphics froze. I was able to ssh into the box and issue a reboot. The hangs persisted, and seemed more frequent.</p>
<p>It turns out upgrading to Lucid Lynx (<a href="http://www.ubuntu.com/testing/lucid/beta2">Ubuntu 10.04</a>) was the solution to the following <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/516909">bug report</a>. There was a problem with the drive for the on-board graphics which the later versions of the kernel contain updated drivers. It seems that I&#8217;ve gone from having trailing edge hardware to bleeding edge hardware. Upgrading was simple &#8211; hit ALT-F2 and enter &#8220;update-manager -d&#8221; (no quotes), the -d flag allows you to upgrade to the latest development release.</p>
<p>The next stumbling block was that suspend and hibernate didn&#8217;t seem to work. Fortunately <a href="http://ubuntuforums.org/showthread.php?t=1445763&amp;page=2">someone in the forums</a> had already solved this problem. The USB3.0 support seems to not quite be suspend friendly, so you can optionally disable it in the BIOS or modify your Lucid configuration as follows &#8211; create a script /etc/pm/sleep.d/05_xhci that contains:</p>
<p><code>#!/bin/sh<br />
# Fix some issues with USB3</code></p>
<p><code> </code></p>
<p><code>case "$1" in<br />
hibernate|suspend)<br />
modprobe -r xhci<br />
;;<br />
thaw|resume)<br />
modprobe xhci<br />
;;<br />
*)<br />
exit<br />
;;<br />
esac</code></p>
<p>and set the permissions appropriately (chmod 755). Now when the system goes to sleep, it will disable USB support and re-enable on resume (or hibernate).</p>
<p>Now that I had the system going to sleep, I wanted to be able to wake it up. The Gigabyte BIOS provides an option to wake up via PS/2 keyboard by typing in a password. I also wanted to have <a href="http://en.wikipedia.org/wiki/Wake-on-LAN">wake-on-lan</a> (WOL) working, something I&#8217;ve <a href="http://www.lowtek.ca/roo/2009/wake-on-lan/">posted about previously</a>. The new motherboard needed new magic to enable WOL.</p>
<p>First use lspci to find the address of the ethernet contoller:</p>
<p><code>$ lspci -tv<br />
+-1c.1-[0000:03]----00.0  Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller</code></p>
<p>Then match that to the contents of /proc/acpi/wakeup</p>
<p><code>$ cat /proc/acpi/wakeup<br />
Device	S-state	  Status   Sysfs node<br />
PCI0	  S5	 disabled  no-bus:pci0000:00<br />
PEX0	  S5	 disabled  pci:0000:00:1c.0<br />
<strong>PEX1	  S5	 disabled  pci:0000:00:1c.1	&lt;- this one!</strong><br />
PEX2	  S5	 disabled<br />
PEX3	  S5	 disabled<br />
PEX4	  S5	 disabled<br />
PEX5	  S5	 disabled<br />
PEX6	  S5	 disabled<br />
PEX7	  S5	 disabled<br />
HUB0	  S5	 disabled  pci:0000:00:1e.0<br />
UAR1	  S3	 disabled  pnp:00:07<br />
USB0	  S3	 disabled  pci:0000:00:1d.0<br />
USB1	  S3	 disabled  pci:0000:00:1d.1<br />
USB2	  S3	 disabled  pci:0000:00:1d.2<br />
USB3	  S3	 disabled<br />
USB4	  S3	 disabled  pci:0000:00:1a.0<br />
USB5	  S3	 disabled  pci:0000:00:1a.1<br />
USB6	  S3	 disabled  pci:0000:00:1a.2<br />
USBE	  S3	 disabled  pci:0000:00:1d.7<br />
USE2	  S3	 disabled  pci:0000:00:1a.7<br />
AZAL	  S5	 disabled  pci:0000:00:1b.0</code></p>
<p>So my new /etc/init.d/wakeonlan file looks like:</p>
<p><code>#! /bin/sh<br />
### BEGIN INIT INFO<br />
# Provides:          wake on lan<br />
# Required-Start:    $network<br />
# Required-Stop:<br />
# Default-Start:     2 3 4 5<br />
# Default-Stop:      0 1 6<br />
# Short-Description: Configures WOL<br />
# Description:       Configures Wake-On-Lan<br />
### END INIT INFO<br />
#<br />
ethtool -s eth1 wol g<br />
echo PEX1 &gt; /proc/acpi/wakeup</code></p>
<p>If you want to understand WOL in more detail, please review my <a href="http://www.lowtek.ca/roo/2009/wake-on-lan/">previous post</a> on the topic.</p>
<p>The last thing I needed was to make <a href="http://en.wikipedia.org/wiki/Vmware_player">VMWare Player</a> happy. During its normal detect a new kernel level and re-install itself process, I encountered an error:</p>
<p><code>Apr 17 12:07:23.497: app-3079280320| Building module vmnet.<br />
Apr 17 12:07:23.497: app-3079280320| Extracting the sources of the vmnet module.<br />
Apr 17 12:07:23.556: app-3079280320| Building module with command: /usr/bin/make -C /tmp/vmware-root/modules/vmnet-only auto-build SUPPORT_SMP=1 HEADER_DIR=/lib/modules/2.6.32-21-generic/build/include CC=/usr/bin/gcc GREP=/usr/bin/make IS_GCC_3=no VMCCVER=4.4.3<br />
Apr 17 12:07:29.384: app-3079280320| Failed to compile module vmnet!</code></p>
<p>The above is a snippet from the log file and it indicates a problem with the network module. Again, someone else had run into the problem and <a href="http://communities.vmware.com/message/1401588#1401588">provided a solution</a>. This worked fine for my VMWware Player version 3.0.0 build-203739.</p>
<p>The system has been stable over the last couple of days, if I run into any serious problem I will revise this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lowtek.ca/roo/2010/ubuntu-on-core-i3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to: resize a mirrored volume</title>
		<link>http://www.lowtek.ca/roo/2010/how-to-resize-a-mirrored-volume/</link>
		<comments>http://www.lowtek.ca/roo/2010/how-to-resize-a-mirrored-volume/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 03:22:56 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=616</guid>
		<description><![CDATA[by  lindztrom Having recently setup mirrored volumes with a pair of 1TB drives, I could now migrate data off the pair of 250Gb data drives to allow me to combine those two drives into a single volume.  Way back when I purchased these drives I had intended to run a mirrored setup, but at the [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://www.flickr.com/photos/lindztrom/2964704126/" target="_blank"><img title="Apple &amp; Orange by lindztrom, on Flickr" src="http://farm4.static.flickr.com/3253/2964704126_3ecf791022.jpg" border="0" alt="Apple &amp; Orange by lindztrom, on Flickr" /></a><br />
<a href="http://creativecommons.org/licenses/by-nc-nd/2.0/" target="_blank"><img title="Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 Generic License" src="http://i.creativecommons.org/l/by-nc-nd/2.0/80x15.png" border="0" alt="Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 Generic License" align="left" /></a> by <a href="http://www.flickr.com/people/lindztrom/" target="_blank"> lindztrom</a><a href="http://www.imagecodr.org/" target="_blank"> </a></div>
<p>Having recently <a href="http://www.lowtek.ca/roo/2010/mirrored-drives-with-ubuntu/">setup mirrored volumes with a pair of 1TB drives</a>, I could now migrate data off the pair of 250Gb data drives to allow me to combine those two drives into a single volume.  Way back when I purchased these drives I had intended to run a mirrored setup, but at the time decided that having more storage was more important.  I had &#8220;cleverly&#8221; purchased two 250Gb drives from different manufacturers, in theory to avoid concurrent failures.  It turns out that not all 250Gb drives are made the same.</p>
<p>Following the instructions from my <a href="http://www.lowtek.ca/roo/2010/mirrored-drives-with-ubuntu/">previous posting</a>, all went well up to where I tried to add the 2nd volume to the mirrored set.  If you run into a similar problem you&#8217;ll likely see one of the two following errors:</p>
<p><code>mdadm: add new device failed for /dev/hda1 as 2: No space left on device<br />
mdadm: add new device failed for /dev/hda1 as 2: Invalid argument</code></p>
<p>I found some good <a href="http://www.tgunkel.de/it/software/doc/linux_server.en">hints on how to diagnose the problem</a>, it turns out you can check the partition sizes manually</p>
<p><code><strong>$ cat /proc/partitions</strong><br />
major minor  #blocks  name</code></p>
<p><code> </code></p>
<p><code>8    17  244196001 sdb1<br />
8    65  244198552 sde1</code></p>
<p>Close, but not quite the same.  As it was, I had unluckily chosen /dev/sdb as the 1st drive in the mirrored set.  It turns out that fdisk tells an even more interesting story.</p>
<p><code><strong>$ sudo fdisk -l /dev/sdb</strong></code></p>
<p><code>Disk /dev/sdb: 250.0 GB, 250059350016 bytes<br />
255 heads, 63 sectors/track, 30401 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x000c0f4f</code></p>
<p><code>Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1               1       30401   244196001   83  Linux</code></p>
<p><code> </code></p>
<p><code><strong>$ sudo fdisk -l /dev/sde</strong></code></p>
<p><code>Disk /dev/sde: 250.0 GB, 250059350016 bytes<br />
16 heads, 63 sectors/track, 484521 cylinders<br />
Units = cylinders of 1008 * 512 = 516096 bytes<br />
Disk identifier: 0x00000000</code></p>
<p><code> </code></p>
<p><code> Device Boot      Start         End      Blocks   Id  System<br />
/dev/sde1               1      484521   244198552+  83  Linux</code></p>
<p>Yuck, looks messy. At this point I&#8217;ve got some of my live data sitting on one half of the mirrored set, and no suitable 2nd drive to act as the mirror.  Somewhat predictably <a href="http://www.howtoforge.com/how-to-resize-raid-partitions-shrink-and-grow-software-raid">there is a solution</a> that minimizes downtime and avoids copying all of the data to a new location.</p>
<p>First you unmount the volume and run resize2fs on it.  We don&#8217;t need to know the correct size, just any size smaller than the 2nd volume &#8211; so I used 200Gb.</p>
<p><code><strong>$ sudo umount /media/data/</strong><br />
<strong> $ sudo e2fsck -f /dev/md2</strong><br />
e2fsck 1.40.8 (13-Mar-2008)<br />
Pass 1: Checking inodes, blocks, and sizes<br />
Pass 2: Checking directory structure<br />
Pass 3: Checking directory connectivity<br />
Pass 4: Checking reference counts<br />
Pass 5: Checking group summary information<br />
/dev/md2: 1890279/15269888 files (0.2% non-contiguous), 32742192/61049616 blocks<br />
<strong> $ sudo resize2fs /dev/md2 200G</strong><br />
resize2fs 1.40.8 (13-Mar-2008)<br />
Resizing the filesystem on /dev/md2 to 52428800 (4k) blocks.<br />
The filesystem on /dev/md2 is now 52428800 blocks long.</code></p>
<p>Now we need to calculate what the correct size of the mirrored partition should be.  I looked at two bits of data: the size the mdadm -D reported for the partition I wanted to resize, and the size that was in /proc/partitions for the same.  These differed by 88 blocks, so I used the value 88 as a <a href="http://en.wikipedia.org/wiki/Fudge_factor">fudge factor</a> &#8211; it may not be required but it worked for me.  I then also ensured that I supplied a value that was an even multiple of 64 (blocks).</p>
<p>So starting with 244196001 from /proc/partitions:</p>
<p><code>(244196001 - 88) / 64 = 3815561.14<br />
</code><br />
Drop the decimal places and multiply by 64 to get the number of blocks.</p>
<p><code>3815561 * 64 = 244195904</code></p>
<p>Now we feed this new size into mdadm and specify the &#8211;grow flag (which can also be used to shrink if you specify a block size smaller than the current which is what we are doing in this case).  We then re-run resize2fs without a specified size, which will cause it to expand the filesystem to fill the partition.</p>
<p><code><strong>$ sudo mdadm --grow /dev/md2 --size=244195904</strong><br />
<strong> $ sudo resize2fs /dev/md2</strong><br />
resize2fs 1.40.8 (13-Mar-2008)<br />
Resizing the filesystem on /dev/md2 to 61048976 (4k) blocks.<br />
The filesystem on /dev/md2 is now 61048976 blocks long.</code></p>
<p>Now all that is left is to run a filesystem check, and remount it.</p>
<p><code><strong>$sudo e2fsck -f /dev/md2</strong><br />
e2fsck 1.40.8 (13-Mar-2008)<br />
Pass 1: Checking inodes, blocks, and sizes<br />
Pass 2: Checking directory structure<br />
Pass 3: Checking directory connectivity<br />
Pass 4: Checking reference counts<br />
Pass 5: Checking group summary information<br />
/dev/md2: 1890279/15269888 files (0.2% non-contiguous), 32742192/61048976 blocks<br />
<strong> $ sudo mount -a</strong></code></p>
<p>Now when you attempt to add the 2nd volume, it will be a matching size and the mirror will work.  In the future, I intend to be a little more careful when I plan to setup mirrored drives and pick the smaller volume as the starting point.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lowtek.ca/roo/2010/how-to-resize-a-mirrored-volume/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mirrored Drives with Ubuntu</title>
		<link>http://www.lowtek.ca/roo/2010/mirrored-drives-with-ubuntu/</link>
		<comments>http://www.lowtek.ca/roo/2010/mirrored-drives-with-ubuntu/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 03:27:09 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=582</guid>
		<description><![CDATA[Mirrored drives are also known as a RAID 1 configuration.  It is important to note that running mirrored drives should not be used as a substitute for doing backups.  My motivation for running a RAID 1 is simply that with the drive densities today, I expect these drives to fail.  A terabyte unit is cheap [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lowtek.ca/roo/wp-content/uploads/2010/03/IMG_0005.jpg"><img class="aligncenter size-full wp-image-583" title="IMG_0005" src="http://www.lowtek.ca/roo/wp-content/uploads/2010/03/IMG_0005.jpg" alt="" width="500" height="379" /></a></p>
<p>Mirrored drives are also known as a <a href="http://en.wikipedia.org/wiki/RAID#RAID_1">RAID 1</a> configuration.  It is important to note that running mirrored drives should not be used as a substitute for doing backups.  My motivation for running a RAID 1 is simply that with the drive densities today, I expect these drives to fail.  A terabyte unit is <a href="http://redflagdeals.pricecanada.com/p.php/Western-Digital-Caviar-Green-1TB-SATA2-WD10EADS-579400/">cheap enough</a> that multiplying the cost by two isn&#8217;t a big deal, and it gives my data a better chance of surviving a hardware failure.</p>
<p>I purchased two identical drives several months apart &#8211; in the hopes of getting units from different batches. I even put them into use staggered by a few months as well.  The intent here was to try to avoid simultaneous failure of the drives due to similarities in manufacture date / usage.  In the end, the environment they are in is probably a bigger factor in leading to failure but what can you do?</p>
<p>Linux has reasonable <a href="http://en.wikipedia.org/wiki/RAID#Operating_system_based_.28.22software_RAID.22.29">software raid</a> support.  There is a debate of the merits of software raid vs. hardware raid, as well as which level of raid is most useful.  I leave this as an exercise up to the reader.  The remainder of this posting will be the details of setting up a raid 1 on a live system.  I found two forum <a href="http://ubuntuforums.org/showthread.php?t=1027240">postings that talked about this process</a>, the <a href="http://ubuntuforums.org/showthread.php?t=705780">latter being most applicable</a>.</p>
<p>We will start with the assumption that you do have the drive physically installed into your system.  The first step is to partition the disk.  I prefer using <a href="http://en.wikipedia.org/wiki/Cfdisk">cfdisk</a>, but <a href="http://en.wikipedia.org/wiki/Fdisk">fdisk</a> will work too.  This is always a little scary, but if this is a brand new drive it should not have an existing partition table.  In my scenario I wanted to split the 1TB volume into two partitions, a 300Gb and a 700Gb.</p>
<p>Now let&#8217;s use fdisk to dump the results of our partitioning work:</p>
<p><code>$ sudo fdisk -l /dev/sdd</code></p>
<p><code>Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes<br />
255 heads, 63 sectors/track, 121601 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x00000000</code></p>
<p><code> </code></p>
<p><code>Device Boot         Start         End      Blocks   Id  System<br />
/dev/sdd1               1       36473   292969341   83  Linux<br />
/dev/sdd2           36474      121601   683790660   83  Linux<br />
</code></p>
<p>Next we need to install the RAID tools if you don&#8217;t have them already:</p>
<p><code>$ sudo apt-get install mdadm initramfs-tools</code></p>
<p>Now recall that we are doing this in a live system, I&#8217;ve already got another 1TB volume (/dev/sda) partitioned and full of data I want to keep.   So we&#8217;re going to create the RAID array in a degraded state, this is the reason for the use of the &#8216;missing&#8217; option.  As I have two partitions I need to run the create command twice, once for each of them.</p>
<p><code>$ sudo mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 missing /dev/sdd1<br />
$ sudo mdadm --create --verbose /dev/md1 --level=mirror --raid-devices=2 missing /dev/sdd2</code></p>
<p>Now we can take a look at /proc/mdstat to see how things look:</p>
<p><code>$ cat /proc/mdstat<br />
Personalities : [raid1]<br />
md1 : active raid1 sdd2[1]<br />
683790592 blocks [2/1] [_U]</code></p>
<p><code> </code></p>
<p><code>md0 : active raid1 sdd1[1]<br />
292969216 blocks [2/1] [_U]</code></p>
<p><code>unused devices: &lt;none&gt;</code></p>
<p>Now we format the new volumes. I&#8217;m using <a href="http://en.wikipedia.org/wiki/Ext3">ext3 filesystems</a>, feel free to choose your favorite.</p>
<p><code>$ sudo mkfs -t ext3 /dev/md0<br />
$ sudo mkfs -t ext3 /dev/md1</code></p>
<p>Mount the newly formatted partitions and copy data to it from the existing drive.  I used <a href="http://en.wikipedia.org/wiki/Rsync">rsync</a> to perform this as it is an easy way to maintain permissions, and as I&#8217;m working on a live system I can re-do the rsync later to grab any updated files before I do the actual switch over.</p>
<p><code>$ sudo mount /dev/md0 /mntpoint<br />
$ sudo rsync -av /source/path /mntpoint<br />
</code></p>
<p>Once the data is moved, and you need to make the new copy of the data on the new degraded mirror volume the live one.  Now unmount the original 1TB drive.  Assuming things look ok on your system (no lost data) now we partition that drive we just unmounted (double and triple check the device names!) and format those new partitions.</p>
<p>All that is left to do is add the new volume(s) to the array:</p>
<p><code>$ sudo mdadm /dev/md0 --add /dev/sda1<br />
$ sudo mdadm /dev/md1 --add /dev/sda2</code></p>
<p>Again we can check /proc/mdstat to see the status of the array.  Or use the <a href="http://en.wikipedia.org/wiki/Watch_(Unix)">watch command</a> on the same file to monitor the progress.</p>
<p><code>$ cat /proc/mdstat<br />
Personalities : [raid1]<br />
md1 : active raid1 sdd2[1]<br />
683790592 blocks [2/1] [_U]</code></p>
<p><code>md0 : active raid1 sda1[2] sdd1[1]<br />
292969216 blocks [2/1] [_U]</code><code> [&gt;....................]  recovery =  0.6% (1829440/292969216) finish=74.2min speed=65337K/sec</code></p>
<p><code>unused devices: &lt;none&gt;</code></p>
<p>That&#8217;s all there is to it.  Things get a bit more complex if you are working on your root volume, but in my case I was simply mirroring one of my data volumes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lowtek.ca/roo/2010/mirrored-drives-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Earning Trust for Your Email Server</title>
		<link>http://www.lowtek.ca/roo/2009/earning-trust-for-your-email-server/</link>
		<comments>http://www.lowtek.ca/roo/2009/earning-trust-for-your-email-server/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 03:49:53 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=549</guid>
		<description><![CDATA[I host my own email server, this in itself is a very odd thing to do in this day and age.  If you want email to come from your domain, Google offers this for free and provides the same interface as Gmail. If you insist on running your own mail server, then setting it up [...]]]></description>
			<content:encoded><![CDATA[<p>I host my own email server, this in itself is a very odd thing to do in this day and age.  If you want email to come from your domain, <a href="http://en.wikipedia.org/wiki/Google_Apps">Google offers this for free</a> and provides the same interface as Gmail. If you insist on running your own mail server, then setting it up to use your ISP as a <a href="http://en.wikipedia.org/wiki/Smart_host">smarthost</a> is the easy way to go (<a href="http://embraceubuntu.com/2005/09/07/setting-a-smarthost-in-postfix/">very easy</a> with <a href="https://help.ubuntu.com/9.04/installation-guide/i386/mail-setup.html">Ubuntu</a>), of course I didn&#8217;t take that path.</p>
<p>As an aside, setting up a mail server that uses <a href="http://fetchmail.berlios.de/">fetchmail</a> to gather email from the various accounts you have, and using a smarthost configuration to send email does give you most of the benefits of running your own mail server with very few headaches.  The reason to do this might be that you don&#8217;t want to trust Google (or someone else) to hold all your email, and/or you don&#8217;t want the individual PCs in your house to be the storage for your email (hard to migrate to a new machine, recover from disaster).  This is how I started down the path of running my own true email server. [I keep thinking that someone should create an easy to install <a href="http://en.wikipedia.org/wiki/Network-attached_storage">NAS</a> add-on that provides exactly this type of email server]</p>
<p>Ok, maybe you don&#8217;t want to run your own email server but you&#8217;re interested in knowing what is involved&#8230; Having a static IP address is handy, mostly to save you from DNS issues.  While you can manage to have a domain name tied to a dynamic IP, many <a href="http://en.wikipedia.org/wiki/DNSBL#Uses_of_DNSBLs">blacklists</a> include the IP ranges used by ISP for dynamic addresses.  Of course you need a domain name, and a DNS server too.  You might also want to consider a <a href="http://en.wikipedia.org/wiki/MX_record#The_backup_MX">secondary MX record</a>, in case your connection goes down.  You&#8217;ll also want to check that your ISP isn&#8217;t blocking <a href="http://en.wikipedia.org/wiki/Port_25">port 25</a> outgoing, and having a <a href="http://www.lowtek.ca/roo/2008/reverse-dns/">valid reverse DNS</a> is important too.</p>
<p>So you&#8217;ve followed the <a href="https://help.ubuntu.com/community/MailServer">Ubuntu documentation</a> and setup a mail server, great.  Assuming your IP address is &#8220;clean&#8221; (ie: not on a blacklist), then you can probably send email just fine.  Until you start hitting problems where spam filters have taken a dislike to your system &#8211; in my case it was <a href="http://www.rogers.com/internet">Rogers</a> (email provided by <a href="http://yahoo.com">Yahoo</a>) that treating my outgoing as spam.  One solution is to have the recipient add your email address to their address book so they do still get to see your email.  It may still get tagged as [Bulk] but it won&#8217;t get lost.  This isn&#8217;t a great solution for someone new you want to contact, or a friend who isn&#8217;t terribly technical.</p>
<p>It turns out there are some additional measures you can take on the email server side to add more trust.  There are three I&#8217;ve implemented:</p>
<ul>
<li><a href="http://www.openspf.org/">Sender Policy Framework (SPF)</a></li>
<li><a href="https://help.ubuntu.com/community/Postfix/DKIM">Domain Keys Identified Mail (DKIM)</a></li>
<li><a href="https://help.ubuntu.com/community/Postfix/Domain">Domain Keys</a></li>
</ul>
<p>All of them rely on the same basic &#8216;trick&#8217; of adding a TXT record to your DNS information that serves to validate the email.  This works for the simple reason that spammers tend to use botnets made up of machines without valid DNS records.  SPF simply is a declaration that the IP address sending the email is allowed to send email for the specified domain.  DKIM is an updated version of DomainKeys, but both can be used concurrently and some systems only know one.  Both DKIM and DomainKeys have the email server sign the email with a secret (private) key, and the DNS record has a public key that will validate the signature.</p>
<p>After implementing all three, it turns out Yahoo was still tagging my email as spam.  Very frustrating.  One solution I did consider was to avoid the problem entirely and <a href="http://forum.soft32.com/linux2/postfix-smarthost-relayhost-domain-ftopict29748.html">selectively smarthost</a> email going to rogers.com (and yahoo.com, etc).  In the end, it turns out that Yahoo maintains their own blacklist of sorts and you can request to be removed.  To check this, you need access to a yahoo email account that you can send test messages to.  By examining the header you will see X-YahooFilteredBulk if your IP is on their blacklist, this appears to be independent of the status of your SPF/DKIM/DomainKeys authentication that should show as a pass.  The solution is to fill in the <a href="http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulk.html ">Yahoo form</a>, and be persistent.  Much of the form will not apply but you do need to fill it in with something reasonable (and valid).  After a couple of exchanges over several days I was rewarded with this reply:</p>
<blockquote><p><tt><span style="color: #1a1a1a;">While we cannot fully exempt your mail server from our SpamGuard </span></tt><br />
<tt><span style="color: #1a1a1a;">technology, we have however, made appropriate changes to this IP address</span></tt><br />
<tt><span style="color: #1a1a1a;">in our database. This should help with delivering mail to the </span></tt><br />
<tt><span style="color: #1a1a1a;">appropriate Yahoo! folders.</span></tt></p></blockquote>
<p>Now email sent to yahoo.com is not tagged as spam or [Bulk] &#8211; I did a little victory dance once this happened.</p>
<p>The remainder of this post goes into some of the details of getting the three (SPF, DKIM, DomainKeys) implemented.</p>
<p>(...)<br/>Read the rest of <a href="http://www.lowtek.ca/roo/2009/earning-trust-for-your-email-server/">Earning Trust for Your Email Server</a> (341 words)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lowtek.ca/roo/2009/earning-trust-for-your-email-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
