<?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>arfore dot com</title>
	<atom:link href="http://arfore.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://arfore.com</link>
	<description>welcome to the foremind</description>
	<lastBuildDate>Thu, 19 Aug 2010 02:14:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Google calendar, iCal and timezones</title>
		<link>http://arfore.com/2010/08/18/google-calendar-ical-and-timezones/</link>
		<comments>http://arfore.com/2010/08/18/google-calendar-ical-and-timezones/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 02:14:53 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=643</guid>
		<description><![CDATA[Like many people, I am a big fan of Google&#8217;s mail and calendaring tools.  I run all my personal mail and calendaring through Google Apps Personal Edition as well as many of the other domains that I host and/or support. The Zeta Gamma chapter of Phi Mu Alpha Sinfonia, of which I am a member, [...]]]></description>
			<content:encoded><![CDATA[<p>Like many people, I am a big fan of Google&#8217;s mail and calendaring tools.  I run all my personal mail and calendaring through Google Apps Personal Edition as well as many of the other domains that I host and/or support.</p>
<p>The <a href="http://www.vsusinfonia.org/">Zeta Gamma chapter</a> of <a href="http://sinfonia.org/">Phi Mu Alpha Sinfonia</a>, of which I am a member, also uses Google calendar to keep up with the different events that we plan for the chapter.</p>
<p>This semester I noticed something different about the chapter&#8217;s calendar &#8211; the times were all off!  They weren&#8217;t off by a few minutes, but by several hours.  I talked to our chapter president, who is in charge of the calendar, about it and he said that it was working fine for him and that he didn&#8217;t see any issues with the times.</p>
<p>Turns out that it is an issue with the setting of the time zone for the Google calendar in conjunction with a setting in iCal on my Mac.  I connect iCal up to my Google account using CalDav so that I can have my personal calendars appear nicely without resorting to a browser.  Using iCal also lets me get, and set, alarms for events.</p>
<p>Well, I noticed after logging into the Google web interface that my personal calendars are set to GMT -5:00 (aka America/New_York aka Eastern Time), whereas the fraternity calendar has a set time zone of GMT +0:00 (aka GMT).  It just so happens that I also have timezone support enabled in iCal.</p>
<p>The timezone support feature of iCal allows you to set a time zone for each appointment on any calendar (local or not) that you have editing access for.  It just so happens that with timezone support turned on all the events on the fraternity calendar actually show the time using the timezone of the Google event, not my local timezone.  If I turn timezone support off in iCal, then like magic all the times are listed accurately.</p>
<p>So, if you use a shared Google calendar, get the owner to set the timezone correctly for their location, then your events in iCal will be automatically updated to reflect the timezone that your Mac is currently in.</p>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2010/08/18/google-calendar-ical-and-timezones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LDAP Commands on RHEL5</title>
		<link>http://arfore.com/2010/08/06/ldap-commands-on-rhel5/</link>
		<comments>http://arfore.com/2010/08/06/ldap-commands-on-rhel5/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 12:00:06 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[rhel5]]></category>
		<category><![CDATA[sasl]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=637</guid>
		<description><![CDATA[During the migration of a production system from Solaris 10 to RedHat Enterprise Linux 5, I discovered that I had a problem with a couple of my LDAP scripts.  The commands being run were standard ldapsearch and ldapmodify commands in a format similar to the following: ldapsearch -h hostname.domain.com -p 389 -b o=organisation -D cn=admin [...]]]></description>
			<content:encoded><![CDATA[<p>During the migration of a production system from Solaris 10 to RedHat Enterprise Linux 5, I discovered that I had a problem with a couple of my LDAP scripts.  The commands being run were standard ldapsearch and ldapmodify commands in a format similar to the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapsearch <span style="color: #660033;">-h</span> hostname.domain.com <span style="color: #660033;">-p</span> <span style="color: #000000;">389</span> <span style="color: #660033;">-b</span> <span style="color: #007800;">o</span>=organisation <span style="color: #660033;">-D</span> <span style="color: #007800;">cn</span>=admin <span style="color: #660033;">-w</span> password <span style="color: #007800;">cn</span>=foobar</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapmodify <span style="color: #660033;">-h</span> hostname.domain.com <span style="color: #660033;">-p</span> <span style="color: #000000;">389</span> <span style="color: #660033;">-b</span> <span style="color: #007800;">o</span>=organisation <span style="color: #660033;">-D</span> <span style="color: #007800;">cn</span>=admin <span style="color: #660033;">-w</span> password <span style="color: #660033;">-f</span> updates.ldif</pre></div></div>

<p>Each time I ran the commands I got the following error:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SASL<span style="color: #000000; font-weight: bold;">/</span>EXTERNAL authentication started
ldap_sasl_interactive_bind_s: Unknown authentication method <span style="color: #7a0874; font-weight: bold;">&#40;</span>-<span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
	additional info: SASL<span style="color: #7a0874; font-weight: bold;">&#40;</span>-<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: no mechanism available:</pre></div></div>

<p>It turns out that the versions of the ldapsearch and ldapmodify commands that comes with RHEL5 are based on the standard OpenLDAP code.  The OpenLDAP code defaults to expecting an <a title="SASL @ CMU" href="http://asg.web.cmu.edu/sasl/">SASL authentication mechansim</a> on the server-side.  Given that the LDAP server I am connecting to is a iPlanet 5.1 LDAP server, it is not configured to understand the SASL authentication types.</p>
<p>The solution is to add the <em>-x</em> option to the commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapsearch <span style="color: #660033;">-x</span> <span style="color: #660033;">-h</span> hostname.domain.com <span style="color: #660033;">-p</span> <span style="color: #000000;">389</span> <span style="color: #660033;">-b</span> <span style="color: #007800;">o</span>=organisation <span style="color: #660033;">-D</span> <span style="color: #007800;">cn</span>=admin <span style="color: #660033;">-w</span> password <span style="color: #007800;">cn</span>=foobar</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapmodiy <span style="color: #660033;">-x</span> <span style="color: #660033;">-h</span> hostname.domain.com <span style="color: #660033;">-p</span> <span style="color: #000000;">389</span> <span style="color: #660033;">-b</span> <span style="color: #007800;">o</span>=organisation <span style="color: #660033;">-D</span> <span style="color: #007800;">cn</span>=admin <span style="color: #660033;">-w</span> password <span style="color: #660033;">-f</span> updates.ldif</pre></div></div>

<p>This command option specifies that the command should be executed using simple authentication instead of SASL.</p>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2010/08/06/ldap-commands-on-rhel5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Openfiler LVM to RAID conversion</title>
		<link>http://arfore.com/2010/08/02/openfiler-lvm-to-raid-conversion/</link>
		<comments>http://arfore.com/2010/08/02/openfiler-lvm-to-raid-conversion/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 12:00:23 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[openfiler]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=595</guid>
		<description><![CDATA[As many of your know, I have a Plex-based Mac Mini media center setup which has enabled me to to the cord with the cable monopoly. Part of this setup is the Openfiler NAS that I use to store all of the digital copies of my dvd collection. Lately I have been wishing that I [...]]]></description>
			<content:encoded><![CDATA[<p>As many of your know, I have a Plex-based Mac Mini media center setup which has enabled me to to the cord with the cable monopoly.  Part of this setup is the Openfiler NAS that I use to store all of the digital copies of my dvd collection.</p>
<p>Lately I have been wishing that I had configured the NAS with a RAID setup instead of just using an all-eggs-in-one-basket approach with three drives in a LVM configuration.  In the process of cleaning out a bunch of videos that I was never going to watch I managed to free enough space to be able to disband the existing volume group and setup my two 1TB drives in a RAID 1 set.  The happy result was that I was also able to re-purpose the 500GB drive for use with my ever growing iTunes library. (Thanks, Apple and Steve Jobs for making all my music DRM free!)</p>
<p>The problem I ran into was that Openfiler will not allow you to create a RAID set in a degraded state.  This was necessary to enable me to work with the drives I owned and not spend additional funds.  After discovering this I began investigating the possibility of doing the RAID configuration by hand and completing the rest of the setup in the Openfiler web console.  Here is the process I used.</p>
<p>A few steps were left out, mainly the pieces revolving around moving the data from one logical volume to the other then pruning the volume group of the old volume.  Excpet for the copy process, all of this can be easily accomplished in the Openfiler web console.  The only piece that I couldn&#8217;t easily determine from the console interface was which physical devices were used in which logical volume.  That information can be easily found using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># lvdisplay -m</span></pre></div></div>

<h3>Create the RAID 1 set with a missing drive and prepare the physical volume</h3>
<p><strong>Step 1:</strong> SSH as root into your Openfiler setup</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">arfore$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> root<span style="color: #000000; font-weight: bold;">@</span>192.168.2.55</pre></div></div>

<p><strong>Step 2:</strong> As root, partition the RAID member using fdisk.  You will want to create a single, primary partition. Accept the defaults on the partition size so that it uses the whole drive.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># fdisk /dev/sda</span>
&nbsp;
The number of cylinders <span style="color: #000000; font-weight: bold;">for</span> this disk is <span style="color: #000000; font-weight: bold;">set</span> to 121601.
There is nothing wrong with that, but this is larger than <span style="color: #000000;">1024</span>,
and could <span style="color: #000000; font-weight: bold;">in</span> certain setups cause problems with:
<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> software that runs at boot <span style="color: #000000; font-weight: bold;">time</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>e.g., old versions of LILO<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> booting and partitioning software from other OSs
<span style="color: #7a0874; font-weight: bold;">&#40;</span>e.g., DOS FDISK, OS<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span> FDISK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
Command <span style="color: #7a0874; font-weight: bold;">&#40;</span>m <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">help</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: n
Command action
e   extended
p   primary partition <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span>-<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
p
Partition number <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span>-<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #000000;">1</span>
First cylinder <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span>-<span style="color: #000000;">121601</span>, default <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
Using default value <span style="color: #000000;">1</span>
Last cylinder, +cylinders or +<span style="color: #c20cb9; font-weight: bold;">size</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>K,M,G<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span>-<span style="color: #000000;">121601</span>, default <span style="color: #000000;">121601</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
Using default value <span style="color: #000000;">121601</span></pre></div></div>

<p>Next change the partition type to be Linux raid autodetect (Note: the hex code is <em>fd</em>)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Command <span style="color: #7a0874; font-weight: bold;">&#40;</span>m <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">help</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: t
Selected partition <span style="color: #000000;">1</span>
Hex code <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">type</span> L to list codes<span style="color: #7a0874; font-weight: bold;">&#41;</span>: fd
Changed system <span style="color: #7a0874; font-weight: bold;">type</span> of partition <span style="color: #000000;">1</span> to fd <span style="color: #7a0874; font-weight: bold;">&#40;</span>Linux raid autodetect<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
Now <span style="color: #7a0874; font-weight: bold;">exit</span> saving the changes.  This will <span style="color: #c20cb9; font-weight: bold;">write</span> the new partition table to the drive.
&nbsp;
Command <span style="color: #7a0874; font-weight: bold;">&#40;</span>m <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">help</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #c20cb9; font-weight: bold;">w</span>
The partition table has been altered<span style="color: #000000; font-weight: bold;">!</span>
&nbsp;
Calling ioctl<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> to re-read partition table.
Syncing disks.</pre></div></div>

<p><strong>Step 3:</strong> Create the RAID 1 set using your newly partitioned drive.  Normally when creating a RAID 1 set you would specify two drive since this minimum number for a RAID 1 set in a clean, non-degraded state.  However in our case we need to start out with a set containing one drive, which will show up in Openfiler as a RAID 1 set in a clean, degraded state.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 missing</span></pre></div></div>

<p>If it all worked, you should see the following result from the mdadm command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm: array <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 started.</pre></div></div>

<p>To check the status of your newly created RAID 1 set, execute the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /proc/mdstat</span></pre></div></div>

<p>The result should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span>
md0 : active raid1 sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">976759936</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>U_<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
unused devices:</pre></div></div>

<p>What this means is that your system supports RAID levels 1, 4, 5, 6, and 10.  By extension this means it also supports RAID level 0.  The [2/1] entry on the md0 line means that your RAID set is configured for two devices, but only one device exists.  In a clean, non-degraded state, a RAID 1 set would show [2/2].<br />
<strong>Step 4:</strong> Initialize a partition (in this case the RAID 1 partition) for use in a volume group.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># pvcreate /dev/md0</span></pre></div></div>

<p>If the command completed successfully, you should see the following result:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Physical volume <span style="color: #ff0000;">&quot;/dev/md0&quot;</span> successfully created</pre></div></div>

<h3>Create the Volume Group and Logical Volume</h3>
<p><strong><em>Note:</em></strong> The next parts are done in the Openfiler web console.</p>
<p><strong>Step 1:</strong> First check the status of your RAID set by selecting the <strong>Volumes</strong> tab then clicking on <strong>Software RAID</strong> in the <strong>Volumes section</strong>.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img1.jpg"><img class="size-thumbnail wp-image-614 alignnone" title="opfpost_img1" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img1-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img2.jpg"><img class="alignnone size-thumbnail wp-image-615" title="opfpost_img2" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img2-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><strong>Step 2:</strong> On the <strong>Software Raid Management</strong> screen you will see your new RAID 1 set listed with a state of <em>Clean &amp; degraded</em>.  Normally, this would indicate a possible drive failure, however in this instance it is expected.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img3.jpg"><img class="alignnone size-thumbnail wp-image-616" title="opfpost_img3" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img3-150x82.jpg" alt="" width="150" height="82" /></a></p>
<p><strong>Step 3:</strong> The next step is to create a new volume group using the physical volume created during the previous command line steps. Click on the <strong>Volume Groups</strong> link in the <strong>Volumes</strong> section.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img4.jpg"><img class="alignnone size-thumbnail wp-image-617" title="opfpost_img4" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img4-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>Create your new Volume Group and select the physical volume to be added to the group. Then click the <strong>Add volume group</strong> button.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img5.jpg"><img class="alignnone size-thumbnail wp-image-618" title="opfpost_img5" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img5-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>Notice that now your new volume group shows up in the <strong>Volume Group Management</strong> section.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img6.jpg"><img class="alignnone size-thumbnail wp-image-619" title="opfpost_img6" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img6-150x148.jpg" alt="" width="150" height="148" /></a></p>
<p><strong>Step 4:</strong> Next you need to add a new volume to your newly create volume group.  You can do this on the <strong>Add Volume</strong> screen. Click on the <strong>Add Volume</strong> link in the <strong>Volumes</strong> section.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img7.jpg"><img class="alignnone size-thumbnail wp-image-620" title="opfpost_img7" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img7-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>On the <strong>Add Volume</strong> screen, setup your new volume and click the <strong>create</strong> button.  The suggestion from Openfiler is to keep the default filesystem (which currently is <em>xfs</em>).  Also, make sure to increase the volume size or <em>Required Space</em> to create the desired volume.  In my case I am going to select the maximum available space.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img8.jpg"><img class="alignnone size-thumbnail wp-image-621" title="opfpost_img8" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img8-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>The system now sends you to the <strong>Manage Volumes</strong> screen which will show you that you now have a volume group containing one volume.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img9.jpg"><img class="alignnone size-thumbnail wp-image-622" title="opfpost_img9" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img9-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>At this point you can copy all your data over from the old LVM setup into the new LVM with RAID 1 setup.  This may take some time. In my case, given that may hardware is far from the latest and greatest, it took just over an hour to copy 900GB of data.</p>
<h3>Adding the empty drive to the RAID 1 set</h3>
<p>The next steps assume that you have migrated your data from the last remaining volume group from the old setup into you degraded RAID 1 set.  At this point what we are going to do is to add the free disk into the RAID set and start it syncing the disks.</p>
<p>Step 1: The first thing you need to do is to make sure that the partitioning structure of the new disk matches the structure of the RAID 1 member.  In a RAID set the parition structure needs to match.</p>
<p>This can be easily accomplished using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sfdisk -d /dev/sda | sfdisk /dev/sdb</span></pre></div></div>

<p>The output from the command should look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Checking that no-one is using this disk right now ...
OK
&nbsp;
Disk <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb: <span style="color: #000000;">121601</span> cylinders, <span style="color: #000000;">255</span> heads, <span style="color: #000000;">63</span> sectors<span style="color: #000000; font-weight: bold;">/</span>track
Old situation:
Units = cylinders of <span style="color: #000000;">8225280</span> bytes, blocks of <span style="color: #000000;">1024</span> bytes, counting from <span style="color: #000000;">0</span>
&nbsp;
   Device Boot Start     End   <span style="color: #666666; font-style: italic;">#cyls    #blocks   Id  System</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1          <span style="color: #000000;">0</span>+ <span style="color: #000000;">121600</span>  <span style="color: #000000;">121601</span>- <span style="color: #000000;">976760001</span>   fd  Linux raid autodetect
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2          <span style="color: #000000;">0</span>       -       <span style="color: #000000;">0</span>          <span style="color: #000000;">0</span>    <span style="color: #000000;">0</span>  Empty
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb3          <span style="color: #000000;">0</span>       -       <span style="color: #000000;">0</span>          <span style="color: #000000;">0</span>    <span style="color: #000000;">0</span>  Empty
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb4          <span style="color: #000000;">0</span>       -       <span style="color: #000000;">0</span>          <span style="color: #000000;">0</span>    <span style="color: #000000;">0</span>  Empty
New situation:
Units = sectors of <span style="color: #000000;">512</span> bytes, counting from <span style="color: #000000;">0</span>
&nbsp;
   Device Boot    Start       End   <span style="color: #666666; font-style: italic;">#sectors  Id  System</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1            <span style="color: #000000;">63</span> <span style="color: #000000;">1953520064</span> <span style="color: #000000;">1953520002</span>  fd  Linux raid autodetect
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2             <span style="color: #000000;">0</span>         -          <span style="color: #000000;">0</span>   <span style="color: #000000;">0</span>  Empty
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb3             <span style="color: #000000;">0</span>         -          <span style="color: #000000;">0</span>   <span style="color: #000000;">0</span>  Empty
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb4             <span style="color: #000000;">0</span>         -          <span style="color: #000000;">0</span>   <span style="color: #000000;">0</span>  Empty
Warning: no primary partition is marked bootable <span style="color: #7a0874; font-weight: bold;">&#40;</span>active<span style="color: #7a0874; font-weight: bold;">&#41;</span>
This does not matter <span style="color: #000000; font-weight: bold;">for</span> LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table
&nbsp;
Re-reading the partition table ...
&nbsp;
If you created or changed a DOS partition, <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>foo7, say, <span style="color: #000000; font-weight: bold;">then</span> use <span style="color: #c20cb9; font-weight: bold;">dd</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
to zero the first <span style="color: #000000;">512</span> bytes:  <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">if</span></span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>foo7 <span style="color: #007800;">bs</span>=<span style="color: #000000;">512</span> <span style="color: #007800;">count</span>=<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>See fdisk<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>As long as the process doesn&#8217;t throw any wonky error messages then you are good to move on to the next step.</p>
<p><strong>Step 2:</strong> Now we need to add the disk <em>/dev/sdb</em> into the RAID 1 set <em>/dev/md0</em>.</p>
<pre>[root@mangrove ~]# mdadm --manage /dev/md0 --add /dev/sdb1</pre>
<p>If the command completes successfully, you will get the following result:</p>
<pre>mdadm: added /dev/sdb1</pre>
<p><strong>Step 3:</strong> At this point the system show automatically begin syncing the disks.  To check on this run the command:</p>
<pre>[root@mangrove ~]# cat /proc/mdstat</pre>
<p>The result show look like so:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span>
md0 : active raid1 sdb1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">976759936</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>U_<span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;....................<span style="color: #7a0874; font-weight: bold;">&#93;</span>  recovery =  <span style="color: #000000;">0.0</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">535488</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">976759936</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">finish</span>=182.3min <span style="color: #007800;">speed</span>=89248K<span style="color: #000000; font-weight: bold;">/</span>sec
&nbsp;
unused devices:</pre></div></div>

<p>Notice that it now shows that the RAID 1 set is in recovery mode.  This indicates that the set is in the process of being synchronized.  During this process the data shown on the <strong>RAID Management</strong> screen in the Openfiler web console will show that the state of the RAID is <strong>Clean &amp; degraded &amp; recovering</strong>.  It will also show the progress of synchronization.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img10.jpg"><img class="alignnone size-thumbnail wp-image-623" title="opfpost_img10" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img10-150x126.jpg" alt="" width="150" height="126" /></a></p>
<p><strong>Step 4:</strong> Once the RAID set has finished syncing the mdstat results will look as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /proc/mdstat</span>
Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span>
md0 : active raid1 sdb1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">976759936</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>UU<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
unused devices:</pre></div></div>

<p>As you can see, the RAID identity now shows that there are 2 volumes in the set with <em>/dev/sda1</em> being the primary and <em>/dev/sdb1</em> being the mirror.  Also, it now shows that there are 2 fully synced disks, indicated by <strong>[2/2] [UU]</strong>.</p>
<p>In the Openfiler web console the <strong>RAID Management</strong> screen now shows the state of the array as <strong>Clean</strong> with a sync status of <em>Synchronized</em>.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img11.jpg"><img class="alignnone size-thumbnail wp-image-624" title="opfpost_img11" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img11-150x121.jpg" alt="" width="150" height="121" /></a></p>
<h3>Final Steps</h3>
<p><strong>Step 1:</strong> Now that you have a completely clean RAID 1 set you will need to ensure that the <em>/etc/mdadm.conf</em> file has the correct information concerning the array.  Normally this is created automatically for you by the Openfiler administration tool, however since we built the array by hand we will need to add this information into the existing file.  (<strong><em>Note:</em></strong> backup the existing <em>mdadm.conf</em> file!)</p>
<p>This can be accomplished by the following commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cp /etc/mdadm.conf /etc/mdadm.conf_orig</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mdadm --examine --scan &amp;gt;&amp;gt; /etc/mdadm.conf</span></pre></div></div>

<p>The mdadm.conf file now contains the following (<strong><em>Note:</em></strong> the UUID entry will be unique to your system):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!</span>
<span style="color: #666666; font-style: italic;">#   This configuration file was auto-generated</span>
<span style="color: #666666; font-style: italic;">#   by Openfiler. Please do not modify it.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Generated at: Sat Jul 24 19:43:42 EDT 2010</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
DEVICE partitions
PROGRAM <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>openfiler<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mdalert
ARRAY <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 <span style="color: #007800;">level</span>=raid1 num-devices=<span style="color: #000000;">2</span> <span style="color: #007800;">UUID</span>=542fa4dc:c920dae9:c062205a:a8df35f1</pre></div></div>

<h3>Testing the RAID set</h3>
<p>Testing the RAID set is the next step that I would recommend.  Now, if something really bad(TM) goes wrong here, then you could end up losing data.  If you are extremely worried, make sure that you have a backup of it all somewhere else, however if you don&#8217;t actually test the mirror then you don&#8217;t know that it all works and then you could be relying on a setup that will fail you when you need it the most.</p>
<p><strong>Step 1:</strong> Get the details of your existing RAID set first prior to testing the removal of a device, that way you will have something to compare it to.</p>
<p>[root@mangrove ~]# mdadm &#8211;detail /dev/md0</p>
<p>This should yield some valuable data on the health of the array.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0:
        Version : 00.90.03
  Creation Time : Sat Jul <span style="color: #000000;">24</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">55</span>:<span style="color: #000000;">44</span> <span style="color: #000000;">2010</span>
     Raid Level : raid1
     Array Size : <span style="color: #000000;">976759936</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">931.51</span> GiB <span style="color: #000000;">1000.20</span> GB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  Used Dev Size : <span style="color: #000000;">976759936</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">931.51</span> GiB <span style="color: #000000;">1000.20</span> GB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
   Raid Devices : <span style="color: #000000;">2</span>
  Total Devices : <span style="color: #000000;">2</span>
Preferred Minor : <span style="color: #000000;">0</span>
    Persistence : Superblock is persistent
&nbsp;
    Update Time : Sun Jul <span style="color: #000000;">25</span> <span style="color: #000000;">13</span>:<span style="color: #000000;">41</span>:07 <span style="color: #000000;">2010</span>
          State : clean
 Active Devices : <span style="color: #000000;">2</span>
Working Devices : <span style="color: #000000;">2</span>
 Failed Devices : <span style="color: #000000;">0</span>
  Spare Devices : <span style="color: #000000;">0</span>
&nbsp;
           UUID : 542fa4dc:c920dae9:c062205a:a8df35f1
         Events : <span style="color: #000000;">0.3276</span>
&nbsp;
    Number   Major   Minor   RaidDevice State
       <span style="color: #000000;">0</span>       <span style="color: #000000;">8</span>        <span style="color: #000000;">1</span>        <span style="color: #000000;">0</span>      active <span style="color: #c20cb9; font-weight: bold;">sync</span>   <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1
       <span style="color: #000000;">1</span>       <span style="color: #000000;">8</span>       <span style="color: #000000;">17</span>        <span style="color: #000000;">1</span>      active <span style="color: #c20cb9; font-weight: bold;">sync</span>   <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1</pre></div></div>

<p><strong>Step 2</strong>: The next step is to actually remove a device from the array.  Now, since /dev/sda was the initial disk I put into my set, I am going to remove it and see what happens.</p>
<p>To remove the device from the array and mark it as failed, use the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mdadm --manage --fail /dev/md0 /dev/sda1</span></pre></div></div>

<p>You should receive the following result:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm: <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1 faulty <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0</pre></div></div>

<p><strong>Step 3:</strong> Check the status of the array by using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /proc/mdstat</span></pre></div></div>

<p>You will see that the device <em>/dev/sda1</em> is now marked as failed and that the status of the array is degraded:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span>
md0 : active raid1 sdb1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>F<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      <span style="color: #000000;">976759936</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>_U<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
unused devices:</pre></div></div>

<p>Also, in the <strong>RAID Management</strong> screen in the Openfiler web console you will see the state of the array change to be <strong>Clean &amp; degraded</strong>.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/08/opfpost_img12.jpg"><img class="alignnone size-thumbnail wp-image-625" title="opfpost_img12" src="http://arfore.com/wp-content/uploads/2010/08/opfpost_img12-150x120.jpg" alt="" width="150" height="120" /></a></p>
<p><strong>Step 4:</strong> The next step is to test the mirroring of the data. What you should do now is to remove the drive that you marked as failed, then add the drive back into the mirror. In a real world scenario you would also replace the actual drive itself, however that is not necessary in this test. Also, if you were replacing the actual drive you would need to repeat the duplication of the partitioning structure.</p>
<p>First, remove the failed drive from the set <em>/dev/md0</em> using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mdadm --manage --remove /dev/md0 /dev/sda1</span></pre></div></div>

<p>The result that you get back will show a <strong>hot remove</strong> since this command was executed while the system was live.  In an enterprise environment where the storage array supported hotplug devices you could then replace the failed drive without shutting the system down.</p>
<p>Next, add the <em>new</em> drive into the array like so:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mdadm --manage --add /dev/md0 /dev/sda1</span></pre></div></div>

<p>The result from this command will be:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm: re-added <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1</pre></div></div>

<p>Step 5: If nothing has gone horribly wrong with the test, the array will now begin the mirroring process again.  As you can see from the output of mdstat, the recovery process will be indicated in the same manner as the initial mirror was:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>mangrove ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /proc/mdstat</span>
Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span>
md0 : active raid1 sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sdb1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">976759936</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>_U<span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;....................<span style="color: #7a0874; font-weight: bold;">&#93;</span>  recovery =  <span style="color: #000000;">0.0</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">834432</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">976759936</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">finish</span>=175.4min <span style="color: #007800;">speed</span>=92714K<span style="color: #000000; font-weight: bold;">/</span>sec
&nbsp;
unused devices:</pre></div></div>

<p><strong><em>Note:</em></strong> this is not a <em>smart</em> recovery process.  When you break the mirror, the entire mirroring process has to complete, even if it was a test where the data had not actually disappeared.  As you can see, the recovery process is going to take about the same length of time that initial build of the mirror did.</p>
<p>Also, in the <strong>RAID Management</strong> screen, the state of the array will now be shown as <strong>Clean &amp; degraded &amp; recovering</strong>, just as before when we built the mirror in the first place.</p>
<p><strong>Step 6:</strong> Once the mirroring process of the testing has completed, the results of mdstat should look similar to the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span>
md0 : active raid1 sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sdb1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">976759936</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>UU<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
unused devices:</pre></div></div>

<p>If you had actually replaced a drive you might need to update mdadm.conf to reflect the changes.  At the very least it is wise to run the scan command again to ensure that the UUID of the array matches the file after the rebuild has completed.</p>
<h3>Final Thoughts</h3>
<p>One of the big lessons that I learned from this whole process, both using Openfiler and with handling storage arrays in general, is that more thought and planning on the frontend can save you a lot of tedium later.  Had I initially planned my storage setup, I would have configured the drives in a RAID 1 set in the beginning.  Another thing I learned is that while managing your NAS with an appliance type of setup (whether you use ClarkConnet, FreeNAS or Openfiler) is a great convenience, it doesn&#8217;t give you the insight and understanding that can be gained by doing everything, at least once, the manual way.  I now have a much better understanding of how the software raid functions work in Linux and of the LVM process as a whole.</p>
<h3>References</h3>
<p>This whole process would have been much more difficult had it not been for the input of a friend as well as a series of postings on the Internet.  Thanks, Joe for your help on this, given that it was my first foray into software raid on Linux.</p>
<ol>
<li>InstallationRAID1+LVM. Ubuntu Community Documentation, <a title="InstallationRAID1+LVM" href="https://help.ubuntu.com/community/Installation/RAID1%2BLVM">https://help.ubuntu.com/community/Installation/RAID1%2BLVM</a>.</li>
<li>Managing Physical &amp; Logical Volumes. Jeffrey M. Hunter, Senior DBA at The DBA Zone, Piitsburgh, PA, <a title="Managing Physical &amp; Logical Volumes" href="http://www.idevelopment.info/data/Unix/Linux/LINUX_ManagingPhysicalLogicalVolumes.shtml">http://www.idevelopment.info/data/Unix/Linux/LINUX_ManagingPhysicalLogicalVolumes.shtml</a>.</li>
<li>Linux Create Software RAID 1 (Mirror) Array. nixCraft, Vivek Gite, <a title="Linux Create Software RAID 1 (Mirror) Array" href="http://www.cyberciti.biz/faq/linux-creating-software-raid-one-arrays/">http://www.cyberciti.biz/faq/linux-creating-software-raid-one-arrays/</a>.</li>
<li>How To Set Up Software RAID1 On A Running System (Incl. GRUB Configuration) (Debian Etch). HowtoForge Linux Howtos and Tutorials, Falko Timme, <a title="How To Set Up Software RAID1 On A Running System (Incl. GRUB Configuration) (Debian Etch)" href="http://www.howtoforge.com/software-raid1-grub-boot-debian-etch">http://www.howtoforge.com/software-raid1-grub-boot-debian-etch</a>.</li>
<li>various linux man pages on the LVM and mdadm commands</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2010/08/02/openfiler-lvm-to-raid-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad for the sysadmin</title>
		<link>http://arfore.com/2010/07/26/ipad-for-the-sysadmin/</link>
		<comments>http://arfore.com/2010/07/26/ipad-for-the-sysadmin/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 12:00:51 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=579</guid>
		<description><![CDATA[A few weekends ago I had the privilege of being assigned to evaluate an iPad for use as a support tool by my boss. (thanks Ike!) The first order of business was to figure out some basic tasks that we would need to accomplish as sysadmins that we could realistically use the iPad for. Remote [...]]]></description>
			<content:encoded><![CDATA[<h5><img class="alignleft size-full" src="http://arfore.com/wp-content/uploads/2010/06/l_300_300_50B5F6BF-F8CD-48A5-A623-17F53C20E7C8.jpeg" alt="" width="300" height="300" /></h5>
<p>A few weekends ago I had the privilege of being assigned to evaluate an iPad for use as a support tool by my boss. <em>(thanks Ike!)</em></p>
<p>The first order of business was to figure out some basic tasks that we would need to accomplish as sysadmins that we could realistically use the iPad for.</p>
<h3>Remote control via ssh for a unix server</h3>
<p>For ssh I already had the <a title="iSSH by Zinger-Soft" href="http://www.zinger-soft.com/iSSH_features.html">iSSH</a> application by Zinger-Soft [<a title="iSSH in the AppStore" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=287765826&amp;mt=8">iTunes</a>].  Fortunately they updated the application to be a universal application for both the iPhone and the iPad.  I had used it with a fair amount of success on my iPhone in the past to reboot several servers over both WiFi and 3G data, most notably when I needed to reboot a MySQL server will on the way to Atlanta on I-75.</p>
<p>I was pleased with the changes that they made for the expanded screen real estate of the iPad.  The split screen function when in portrait mode is quite useful when you need to juggle two connections at the same time, even if it can be a bit confusing at first.</p>
<p>The ability to handle X11 forwarding is also a nice touch, because there are some administration activities that require the GUI even on a unix system (think that favorite Oracle installer that we all know and love).</p>
<h3>Remote access via RDP to Windows servers and desktops</h3>
<p>Generally this is actually an easier task to sort out, due to the number of RDP clients that exist of the iPad.  There are more clients out to handle this than you can shake a stick at, however they don&#8217;t all have the same features.  The fly in the ointment with RDP support is the ability to work with the widest variety of server and desktop os installations, with encryption, etc.  The large majority of them did state that they supported Server 2003, 2008 as well as Windows XP, Vista and 7.</p>
<p>What took some doing to was to find a client that would work in our security environment.  Currently we require that all off-site RDP connections be tunneled through SSH.  It turns out that none of the RDP clients out there support this yet.  One of the most promising from this standpoint looks like <a href="http://itap.mobi/itap-rdp">iTap RDP</a> by Honeder Lacher Wallner Softwareentwicklung OEG [<a href="http://clk.tradedoubler.com/click?p=24380&amp;a=1576033&amp;url=http%3A%2F%2Fitunes.apple.com%2FWebObjects%2FMZStore.woa%2Fwa%2FviewSoftware%3Fid%3D317062064%26mt%3D8%26uo%3D6%26partnerId%3D2003">iTunes</a>].  This client supports FIPS and NLA.  They have a nice compression algorithm that makes the connection work well even on a 3G network.  While they don&#8217;t currently support RDP over SSH tunnels this is a planned feature in a future release.</p>
<p>Another possibility, depending on where we go with our VDI initiative is <a href="http://www.wyse.com/products/software/pocketcloud/ipad/index.asp">Wyse PocketCloud</a> by Wyse Technology [<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=326512817&amp;mt=8">iTunes</a>].  PocketCloud for iPad supports both VMWare View connections and standard RDP connections.  This is the application I ended up testing, and I must say, I was pretty happy with it.  The manner in which it handles the mouse functionality is superb.  The support for the application seems a little subpar, but there is a fairly active forum.</p>
<p>Currently the only solution that I was able to find was to use iSSH for a tunneled VNC connection, since iSSH supports this.  Of course, this means that you will need to install a VNC server on your desktop or server, but in my testing it did seem to work fairly well if a little sluggishly.  One advantage to this is the fact that Mac OS X includes a VNC server by default, making connections to Mac servers and clients a fairly easy thing to accomplish.  With WIndows 2008, it was a little more challenging due to the changes in security that were added by the UAC system from MS.  I was unsuccessful in getting RealVNC Enterprise trial to work properly, however the beta of TightVNC worked nicely.  The latest version of iSSH does support ssh tunnels.  When you combine this with multitasking support on iOS 4 you then have ability to access a remote machine through a perimeter firewall without the need for VNC server. Unfortunately, this support is useless on the iPad until we get iOS 4, but it is nice to know that it is there.</p>
<h3>Access to various web-based support services</h3>
<p>This is not really much of a challenge, however it is worth mentioning that there are a number of web-based systems that don&#8217;t cooperate easily with Mobile Safari for various reasons.  Some of them are Flash-based, which obviously won&#8217;t work, others are just not designed to work properly on a touchscreen device.  Your mileage may vary.</p>
<h3>Password storage</h3>
<p>As is the case with most system admins, I have way too many passwords to keep up with than I can easily remember.  When you combine that with the necessity of locking accounts after a certain number of failed attempts, it becomes rapidly necessary that I have a secure method of carrying passwords with me.</p>
<p>On my iPhone I have been using Lockbox Pro by <a href="http://www.geetechnologies.com/">GEE! Technologies</a> [<a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=285681310&amp;mt=8">iTunes</a>] for a while now, however in investigating an app for the iPad I spent a fair amount of time playing around with <a href="http://splashdata.com/splashid/index.asp">SplashID</a> by SplashData [<a href="http://itunes.apple.com/us/app/splashid-password-manager/id362663914?mt=8">iTunes</a>]. (Also, it looks like GEE! Technologies is having issues, since the company website link for their app in the AppStore doesn&#8217;t work and the support website looks fairly similar to the myriad of web-squatter websites that are out there.) Now if you use password managers, you most likely have run into SplashID before.  One of the major points in it&#8217;s favor is the use of both 256-bit Blowfish encryption.  New for the iPad version is the ability to use a swipe pattern to unlock the application, similar to the process that you can use to unlock some Android-based devices.  It also supports numeric and alpha passwords for unlocking the database.</p>
<p>One of my favorite features of Lockbox Pro is the ability to have a large number of additional fields for an entry, not just a username and password.  SplashID also has this feature.  Also, another great advantage to SplashID is the ability to have a desktop application (both Mac and Windows) that you can sync your mobile device to.  Not only does SplashID support the iPhone, iPad and iPod Touch, they also have clients for Android, WebOS, PalmOS, Blackberry and Series 60.  The simple fact that I can sync my password data between multiple devices as well as my desktop makes this an ideal application.  SplashID also supports auto-fill for websites, if that is your thing.  Of course, if you want it all on your the iPhone, iPad and the desktop your are going to have to fork out a lot of money, since each application is a separate charge.</p>
<h3>Access to notes, procedures and documentation</h3>
<p>As an admin, one of the most useful applications is one that allows me to have notes, procedures and documentation available when I need it.  It can be difficult the juggle a keyboard, serial cable and a big fat, dead tree manual when in a datacenter, so having the essential docs on hand in a mobile environment is a must.</p>
<p>I think there are actually more possibilities in this particular category than any other I researched for this post.  I have been a big fan of <a href="http://www.evernote.com/">Evernote</a> by Evernote Corp [<a href="http://itunes.apple.com/us/app/evernote/id281796108?mt=8">iTunes</a>] since it was released.  It syncs to both the iPhone and iPad, as well as to the client on my desktop.  Combine those abilities with web-clipping functionality in both Safari and Firefox on the desktop and you have a great tool for support.</p>
<p>Of course, sometimes you will need to store large documents, and unless you feel like paying for storage with Evernote, it might not work to upload the entire Solaris 10 reference, or the latest edition of the PHP function reference.  To begin with I started searching for the perfect sysadmin application in the App Store, then I realized that I already had it, <a href="http://www.apple.com/ipad/features/ibooks.html">iBooks</a> [<a href="http://itunes.apple.com/us/app/ibooks/id364709193?mt=8">iTunes</a>].  With iBooks 1.1, Apple made PDF storage easy.  Just drag the PDF into your Books section in iTunes and sync.  Voila!  Of course to make the docs more useful, they need to be converted into eBook format so that you can use the highlighting and search features, but in a pinch a raw PDF is quite handy.</p>
<h3>I wish I could do that</h3>
<p>There are still somethings that I wish I could do with the iPad, however I doubt I will get them.  One item on my wishlist would be a mechanism to allow me to use the iPad as a serial terminal.  Frequently I have to use a laptop with a serial port (or USB-to-serial adapter) to connect to a server in order to access the console.  It would be really nice to be able to do this from the iPad.  Another feature that would be nice would be something along the lines of the certificate management that you have in the Keychain Access application on the Mac.  I can see where it could come in handy to be able to import and export SSL certs from the device.</p>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2010/07/26/ipad-for-the-sysadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Life without cable &#8211; Part 3</title>
		<link>http://arfore.com/2010/07/25/life-without-cable-part-3/</link>
		<comments>http://arfore.com/2010/07/25/life-without-cable-part-3/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 23:17:35 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[plex]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=553</guid>
		<description><![CDATA[This is the third in a series of articles on my trials and travails about living the cable-free life. The first part dealt with moving to Apple&#8217;s AppleTV platform by way of MythTV and Tivo.  In part two talked about the reasons why I moved from an AppleTV to a Mac Mini-based HTCP setup. This [...]]]></description>
			<content:encoded><![CDATA[<p>This is the third in a series of articles on my trials and travails about living the cable-free life.  The <a title="Life without cable - Part 1" href="http://arfore.com/2010/01/20/life-without-cable-part-1/">first part</a> dealt with moving to Apple&#8217;s AppleTV platform by way of MythTV and Tivo.  In <a title="Life without cable - Part 2" href="http://arfore.com/2010/01/21/life-without-cable-part-2/">part two</a> talked about the reasons why I moved from an AppleTV to a Mac Mini-based HTCP setup.  This article will focus on the software I am running to make all of this palatable along with a few hardware and OS tips thrown in for good measure.</p>
<p>I am going to start out with a few hardware and OS items, because these will be important in deciding where to go with the software.</p>
<h4>Video Output</h4>
<p>As I noted in part two, I purchased an Apple Mac Mini 2.26GHz (Late 2009) to replace the 40GB AppleTV.  This particular model has two video output options:</p>
<ul>
<li>Mini-DVI</li>
<li>Mini DisplayPort</li>
</ul>
<p>This allows for easy conversion to S-Video, DVI, or VGA.  In the box you receive an adapter that will allow you to connect directly to a DVI-D (dual link or single link) cable or port.  Unfortunately the adapter does not allow you to connect a DVI-D cable.  If you want to use the Mini DisplayPort output (instead of or in addition to the Mini-DVI port) you will need to buy an additional adapter.  Apple sells several different ones to accomplish different goals:</p>
<ul>
<li><a href="http://store.apple.com/us/product/MB570Z/A" target="_blank">Mini DisplayPort to DVI Adapter</a></li>
<li><a href="http://store.apple.com/us/product/MB572Z/A">Mini DisplayPort to VGA Adapter</a></li>
<li><a href="http://store.apple.com/us/product/MB571Z/A" target="_blank">Mini DisplayPort to Dual-Link DVI Adapter</a></li>
</ul>
<p>For some reason, while Apple sells an adapter to allow for conversion to VGA from Mini DisplayPort they do not sell one to convert to S-VIDEO or composite video, in fact it doesn&#8217;t appear that anyone does.  If that is your goal, then you will need to daisy chain the <a href="http://store.apple.com/us/product/M9319G/A" target="_blank">Apple Mini-DVI to Video Adapter</a> adapter to the included Mini-DVI adapter.</p>
<p>If you want to connect the Mac Mini directly to an HDMI component then you will need to buy either a Mini-DVI to HDMI adapter, Mini DisplayPort to HDMI adapter, or add a DVI-D to HDMI adapter to the included Mini-DVI to DVI adapter.  Initially I was using a <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16882379032&amp;cm_re=dvi_to_hdmi_cable-_-82-379-032-_-Product" target="_blank">Belkin DVI-D to HDMI adapter</a>, however I have since moved to using a single piece Mini DisplayPort to HDMI cable from monoprice.</p>
<h3>Audio Output</h3>
<p>When it comes to audio output from the Mini, your choices are a lot simpler, at least in the beginning.  The Mac Mini supports two audio output options from a combined port:</p>
<ul>
<li>standard stereo analog via a 1/8&#8243; inch (3.5mm) cable</li>
<li>S/PDIF format optical via a mini-toslink adapter or cable to a toslink input</li>
</ul>
<p>Most people won&#8217;t have any issues, however in my case I had a problem where my receiver disabled the digital input jack when I connected the Mini to HDMI on the receiver (either by using a Mini DisplayPort to HDMI cable, or when running through the Mini-DVI/DVI-D HDMI adapter/HDMI cable combo).  Here&#8217;s what I got from Sony on this one:</p>
<blockquote><p>This issue can occur with an Audio/Video (A/V) receiver that has HDMI® Active Intelligence. HDMI communicates with all of the HDMI-connected devices and requires authentication (a.k.a. handshake) from each device. Since the DVI jack on the TV is not HDMI, authentication cannot occur and may cause the A/V receiver to not produce any audio.</p></blockquote>
<p>In my case I ended up connecting the digital audio to the receiver and the video to the second HDMI input on my television.</p>
<p>One possible solution to this would be to purchase an adapter that will take the Mini DisplayPort video signal and combine it with the digital audio signal to a single HDMI output.  Both <a href="http://monoprice.com/" target="_blank">monoprice</a> and <a href="http://kanexlive.com/" target="_blank">Kanex</a> make an adapter to accomplish this.  Kanex also makes an adapter that will take analog audio and add it into a combined signal.  I have yet to actually purchase either and test it, however I will be doing so in the future.</p>
<h3>Software Choices</h3>
<p>Back in the good old days I was using a <a title="MythTV" href="http://www.mythtv.org/">MythTV</a> setup and I really liked the interface (up to a point anyway, it wasn&#8217;t near as polished as some of the commercial options, but at that point I was gung-ho on opensource movement).  After moving to the AppleTV, I became spoiled by the polish that I was seeing with the Apple interface as well as the Boxee project.  After settling on the hardware choice of the Mac Mini, I then began looking for a suitable software product.  Now I know several folks that use iTunes, Safari and FrontRow to handle most of this, however I wanted an all-in-one solution as much as possible.  I settled on using <a title="Plex Media Center for Mac OS X" href="http://plexapp.com/">Plex</a>.  This is a Mac OS centric fork of the XBMC project, so it may look familiar to some of you out there (Hey Joe Newton!).</p>
<p>The Plex application is quite similar to Boxee in that it maintains the XBMC application structure.  There is a <a title="Plex Developer Center" href="http://dev.plexapp.com/">developer SDK available</a> and you can easily write small apps to fill the holes in the ether.  For instance, there is a rather nice application for viewing the TED Talks.</p>
<p>Unfortunately there are still somethings that a standalone application does better.  I prefer the Hulu Desktop application, especially since Hulu goes out of their way to shun all third-party integration into their ecosystem.  I also prefer using the NetFlix web interface over the Plex app.  There are just some pieces to the integration that doesn&#8217;t function to my satisfaction.  Also, to listen to my SACD and Digital Audio content, I am forced to use iTunes.  This is due to a bug in the way that audio content is handled with respect to the frequency settings for digital audio in Plex.  According to the developers this will be fixed in the release of version 0.9.</p>
<h3>Getting Your Content</h3>
<p>Here is one area where we are still at the mercy of the content creators and providers.  If all the content you watch is ripped from legally purchased dvds and cds then you should have no problems, since Plex has been able to handle every format I have thrown at it.  If you buy or rent video content from the iTunes store, then you are going to have to use FrontRow or iTunes, since the video content (unlike the music) is still encapsulated with DRM encryption.  If you are in search of current tv show episodes, then your best bet is going to be to use Safari and watch the shows through the browser or to use Hulu (which is even better now that Hulu Plus has come into being).</p>
<h3>Controlling the HTPC</h3>
<p>When it comes to controlling your media center, most people expect that they will be able to use the ubiquitous remote control that we all seem to have so many of these days.  Some of use still remember when you had to get up and physically change the channel on the television (seems like a quaint notion nowadays).  Then we progressed to having wired remote controls, then on to infrared remotes, then to RF remotes that can work through walls!  Well, I have a Logitech Harmony 550 remote that is programmable and can control all of my components.  I can setup macros (or activities, as Logitech calls them) to do certain things, like go from tv watching mode into listening to the turntable mode (yeah, I still own a turntable and LPs).  One of the nice things about the Mac Mini (like the AppleTV) is that it has a built-in infrared port, so that I can control Plex using my Harmony.  Plex comes with built-in support for either the Apple Remote or the Logitech Harmony.</p>
<p>As for browsing the web, I still use a keyboard and mouse.  Thankfully Apple makes this easy with their built-in bluetooth support.  Currently I am using the new Apple wireless keyboard and a Might Mouse.  At some point I plan on trying out the Logitech PS3 keyboard, since it has a built-in trackpad for cursor control.</p>
<h3>Final Thoughts</h3>
<p>Having been cable free for almost two years now, I can definitely say that it was a journey worth taking.  Not only have a I reduced the financial costs associated with watching media, I also pay more attention to exactly what I am watching.  Since my media storage is not infinite, I have to care more about what I keep and what I don&#8217;t.  With the advent of NetFlix instant streaming, Hulu, and the prevalence of companies like ESPN, CBS and others that allow you to watch current content over the web, the storage burden has been lessened, but it is still something to keep in mind.</p>
<p>The main problem with this solution is for content that hasn&#8217;t made it to the new media generation.  Many of the media providers still have the idea that cable is king and that they need to charge outrageous prices in order to maintain the monopoly.  What they should be doing is allowing us access to the content, no matter how we want to watch it.  One example of the bone-headed thinking out there is the way that Hulu has handled the interaction with systems like Plex and Boxee.  The claim is that the content owners (NBC, ABC, CBS, etc.) have directed them to attempt to block usage that will conflict with standard transmission methods, such as cable and satellite.  What they don&#8217;t seem to understand is that the way in which I watch the content is less important than if I watch it at all.  On Hulu the content is ad-supported.  On the ABC website, the content is ad-supported.  I don&#8217;t think that it should really matter where the ads are seen, as long as they are, but apparently this is not the belief of the big-wigs in the boardrooms.</p>
<h3>References</h3>
<ul>
<li>Digital Visual Interface &#8211; <a title="Digital Visual Interface (DVI)" href="http://en.wikipedia.org/wiki/Digital_Visual_Interface">http://en.wikipedia.org/wiki/Digital_Visual_Interface</a></li>
<li>Mini-DVI &#8211; <a title="Mini-DVI" href="http://en.wikipedia.org/wiki/Mini-DVI">http://en.wikipedia.org/wiki/Mini-DVI</a></li>
<li>Mini DisplayPort &#8211; <a title="Mini DisplayPort" href="http://en.wikipedia.org/wiki/Mini_DisplayPort">http://en.wikipedia.org/wiki/Mini_DisplayPort</a></li>
<li>Plex Media Center for Mac OS X &#8211; <a title="Plex Media Center for Mac OS X" href="http://plexapp.com">http://plexapp.com</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2010/07/25/life-without-cable-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
