<?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>Wes Kroesbergen&#039;s Portfolio &#187; Ubuntu</title>
	<atom:link href="http://www.kroesbergens.com/portfolio/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kroesbergens.com/portfolio</link>
	<description>my opinions, conjectures, and thoughts</description>
	<lastBuildDate>Tue, 10 Aug 2010 13:51:45 +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>ESXi, ZFS, and Home Server Data Storage &#8211; Part 1</title>
		<link>http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/</link>
		<comments>http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/#comments</comments>
		<pubDate>Wed, 12 May 2010 13:45:12 +0000</pubDate>
		<dc:creator>Wes Kroesbergen</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Nexenta]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[raidz]]></category>
		<category><![CDATA[SAN]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/</guid>
		<description><![CDATA[UPDATE: It seems I may be re-evaluating my choice of OpenSolaris vs. Nexenta. I&#8217;ve experienced a lot of issues with SMB/CIFS authentication on OpenSolaris, and have not been able to get it to work properly. I&#8217;ve also had a reply from a commenter assuring me as to the stability of Nexenta 3. I&#8217;ll post again [...]


Related posts:<ol><li><a href='http://www.kroesbergens.com/portfolio/2010/08/update-re-esxi-zfs-storage/' rel='bookmark' title='Permanent Link: Update re: ESXi &#038; ZFS Storage'>Update re: ESXi &#038; ZFS Storage</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/' rel='bookmark' title='Permanent Link: VMWare ESXi as a Media Server'>VMWare ESXi as a Media Server</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>UPDATE:</strong> It seems I may be re-evaluating my choice of OpenSolaris vs. Nexenta. I&#8217;ve experienced a lot of issues with SMB/CIFS authentication on OpenSolaris, and have not been able to get it to work properly. I&#8217;ve also had a reply from a commenter assuring me as to the stability of Nexenta 3. I&#8217;ll post again once I&#8217;ve re-evaluated my choice of SAN OS.</p></blockquote>
<p>A few months ago I wrote<sup class='footnote'><a rel="nofollow" target="_blank" href='#fn-298-1' id='fnref-298-1'>1</a></sup> about a new home server I was setting up. I designed the server from ground up to handle VMware ESXi 4.0. When I built it I did not build in data redundancy, as I had two mismatched drives (a 1.5TB and a 1TB). Also, because I was relatively new to ESXi, I created the datastore with default block sizes, limiting me to 256GB virtual disk file sizes. I used Ubuntu Linux to link the virtual disks together with Logical Volume Manager (LVM), and create one big mount for my data storage. Unfortunately, the 2.5TB volume is now full. <span id="more-298"></span></p>
<p>With a full server volume, nothing would seem more obvious than to go out and buy more storage. So, I went out and bought two 1.5TB disks (I don&#8217;t believe that 2TB drive sizes have hit the optimal price point yet). On my way home however, I realized that I now have the capacity for almost 5.5TB of storage. If one physical drive were to crash, I would not only lose the data that was on that drive, I would also lose my entire dataset. LVM does not handle missing drives, so the entire logical volume, with all my data on it, would be gone. This is far too much risk, and I decided to build in data redundancy.</p>
<p>With that in mind, I began to consider various options. The motherboard&#8217;s BIOS supports RAID 1,0, 10, and 5. Of those options, I would prefer a RAID5 configuration, as it offers the best capacity/redundancy ratio. Unfortunately however, I&#8217;ve already got ESXi installed on the existing 1.5TB drive, and the data between it and the second drive must remain intact. I don&#8217;t know how well ESXi would handle a sudden BIOS change to a RAID configuration. Also, after some reading, I found that it was likely that drivers would be required in the OS install to support the RAID configuration. There are too many unknown variables to risk my data with a BIOS RAID configuration change. </p>
<p>The next option I considered was a software level RAID5 implementation, one where I&#8217;d have a virtual machine handle the RAID5 control. Unfortunately however, this approach also has its drawbacks. RAID5 requires 3 drives of the same size to setup. I have 3 1.5TB drives right now, but one of them is full of data, including my ESXi host install. I would have to create a deteriorated RAID5 array with two drives, install another physical drive for the ESXi host install, import my original ESXi host configuration to the new host install, move my data to the new array, then move the actual client OS virtual disk to the new physical drive. After that point I could wipe the original 1.5TB and add it to the RAID5 array. I would be left with the 1TB to use for other purposes. During this whole process praying that something does not mess up the LVM i  the Linux install. All in all, a very messy endeavor. Too much risk, both with the data itself as well as with the host/client OS installations.</p>
<p>Since a RAID configuration seemed to be out, I looked for other &#8216;outside-the-box&#8217; solutions. Obviously it would have to be a disk/file level solution, as LVM with virtual disks wasn&#8217;t going to cut it. Then I remembered looking at ZFS<sup class='footnote'><a rel="nofollow" target="_blank" href='#fn-298-2' id='fnref-298-2'>2</a></sup> (a file system format) a couple years ago. ZFS offers great data redundancy for little disk cost, flexibility, compression, good performance, and a host of other things (things most non-technical people wouldn&#8217;t care about). The stability of the filesystem has come a long way since I first looked at it (it was more proof of concept at the time), to the point where I would trust my data with it. ZFS seemed to fit my current needs and network conditions perfectly.</p>
<p>Now that I&#8217;d decided on ZFS as my new network storage solution, I had to decide how I was going to implement it. Because it was developed by SUN Microsystems, there are licensing quirks that have kept it from being incorporated into the Linux kernel. There is however, an implementation via the FUSE project. I could potentially install it into my Ubuntu media server virtual machine, and have a relatively easy transition. After some investigation however, I felt that ZFS-fuse was still too much of a hack for me to trust my data with.</p>
<p>The only other real ZFS options were FreeBSD, OpenSolaris, and a project called Nexenta<sup class='footnote'><a rel="nofollow" target="_blank" href='#fn-298-3' id='fnref-298-3'>3</a></sup>. Nexenta is a Gnome (Ubuntu-like) user land built around the OpenSolaris kernel. This initially attracted me quite a bit, as it seemed to perhaps be the easiest way forward. Two things kept me back however. One, the version of Nexenta that offers deduplication support for ZFS is currently labeled beta. Two, because it was built around the OpenSolaris kernel, there would be a lot more hacking required if I was going to try to replicate my Ubuntu media serving services. At this point I realized that it would be easiest to keep my Ubuntu media server, and just point its data volumes to another VM&#8217;s network share, as though the other VM was a SAN. So, I decided that Nexenta was more than I needed, and that it was targeting a different person than I. Add to that the lack of deduplication, and Nexenta was out.</p>
<p>The other two ZFS options were OpenSolaris and FreeBSD. Since I&#8217;m a Max OS X (built around BSD Unix) power user, it seemed the most attractive option. On doing some analysis however, it seemed that OpenSolaris had better support and a better-performing ZFS implementation. Consequently, I&#8217;ve decided to go the OpenSolaris route for my virtual SAN.</p>
<p>I&#8217;ll post Part 2 over the next week or so. Part 2 will cover the actual implementation (still in progress), and some of the challenges encountered.</p>
<div class='footnotes'><div class='footnotedivider'></div><ol><li id='fn-298-1'><a href="http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server">http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server</a>  <span class='footnotereverse'><a rel="nofollow" target="_blank" href='#fnref-298-1'>&#8617;</a></span></li><li id='fn-298-2'><a href="http://en.wikipedia.org/wiki/ZFS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ZFS?referer=');">http://en.wikipedia.org/wiki/ZFS</a>  <span class='footnotereverse'><a rel="nofollow" target="_blank" href='#fnref-298-2'>&#8617;</a></span></li><li id='fn-298-3'><a href="http://www.nexenta.org" onclick="pageTracker._trackPageview('/outgoing/www.nexenta.org?referer=');">http://www.nexenta.org</a>  <span class='footnotereverse'><a rel="nofollow" target="_blank" href='#fnref-298-3'>&#8617;</a></span></li></ol></div>

<p>Related posts:<ol><li><a href='http://www.kroesbergens.com/portfolio/2010/08/update-re-esxi-zfs-storage/' rel='bookmark' title='Permanent Link: Update re: ESXi &#038; ZFS Storage'>Update re: ESXi &#038; ZFS Storage</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/' rel='bookmark' title='Permanent Link: VMWare ESXi as a Media Server'>VMWare ESXi as a Media Server</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VMWare ESXi as a Media Server</title>
		<link>http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/</link>
		<comments>http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:53:28 +0000</pubDate>
		<dc:creator>Wes Kroesbergen</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://www.kroesbergens.com/portfolio/?p=235</guid>
		<description><![CDATA[In the last little while, I&#8217;ve begun to work a lot more with VMware ESXi, in an attempt to understand virtualization better. Along with the benefits it brings to larger companies, I began to see some benefits that it would bring to my personal life. At home, I am constantly developing or experimenting with new [...]


Related posts:<ol><li><a href='http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/' rel='bookmark' title='Permanent Link: ESXi, ZFS, and Home Server Data Storage &#8211; Part 1'>ESXi, ZFS, and Home Server Data Storage &#8211; Part 1</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/08/update-re-esxi-zfs-storage/' rel='bookmark' title='Permanent Link: Update re: ESXi &#038; ZFS Storage'>Update re: ESXi &#038; ZFS Storage</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/04/thoughts-on-the-ipad/' rel='bookmark' title='Permanent Link: Thoughts on the iPad'>Thoughts on the iPad</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In the last little while, I&#8217;ve begun to work a lot more with VMware ESXi, in an attempt to understand virtualization better. Along with the benefits it brings to larger companies, I began to see some benefits that it would bring to my personal life. At home, I am constantly developing or experimenting with new technologies in an attempt to understand them and build my skills. The problem is that I tend to do a lot of my experimentation on our home server (an old Dell 5150, with lots of extra hard drives). Since we are using this as a media server, things tend to become difficult for those using the media or data when I need to reboot/install something new. This resulted in much of our data being scattered among our other machines (two MacBook Pro&#8217;s and an iMac). All in all, a very messy setup.<span id="more-235"></span></p>
<p>Enter ESXi. Virtualized machines brings me the ability to leave a media server up and running while I add, build, or reconfigure other machines, without the expense of all the hardware. It also brings all those machines into a single console, making it really convenient for me to manage. Along with that, I can now easily allocate more storage to the virtual machine as I have need!</p>
<p>Of course, this presented a problem. There is a <strong>lot</strong> of data that needed to be migrated. 1TB on the iMac, 320GB + 500GB + 160GB + 160GB on the existing media server, 160GB on the other MacBook Pro, and ~100GB on my MacBook Pro. How do you migrate all this data over? I budgeted for 1 new hard drive, but not more than one.</p>
<p>I purchased new server components (see below) on Boxing Day, and spent about ~$600 on what would have been an ~$830 server.</p>
<p>Components:</p>
<ul>
<li>Motherboard: Asus P5Q Pro Turbo</li>
<li>CPU: Intel E7500 Boxed (mid-late 2009 versions have VT-x, a requirement for 64bit host VM&#8217;s)</li>
<li>Ram: 4GB OCZ DDR2 800</li>
<li>Hard-drive: WD 1.5TB</li>
<li>Case: Antec P183</li>
<li>PSU: Antec TruePower 650 New</li>
<li>Video Card: Asus EAH4350 (Asus motherboard doesn&#8217;t have on-board video)</li>
<li>NIC: Intel EXPI9301CT (Required, as ESXi 4 didn&#8217;t support the integrated Atheros-based NIC)</li>
</ul>
<p>I began the new ESXi build by assembling the new hardware. As I wasn&#8217;t installing from USB and instead opted for the lower-hassle CD installation method, I borrowed a CD drive from my spare hardware box (I also borrowed keyboard/mouse/monitor). When I tried to boot ESXi for the first time, it informed me that the integrated NIC was not compatible. I nipped out to Canada Computers and purchased a new one, and the installation proceeded smoothly from that point on. Once installation was completed, I enabled SSH to ESXi by doing the following:</p>
<ol>
<li>alt-f1 (Note: As pointed out below, you will not see your typing on this screen, just trust us, it is there).</li>
<li>unsupported</li>
<li>root pw</li>
<li>vi /etc/inetd.conf</li>
<li>delete the “#” from ssh</li>
<li>services.sh restart</li>
</ol>
<p>I rebooted the machine, and went to my Windows box (no Mac ESXi/vSphere client yet) to manage the server. (If you haven&#8217;t installed the vSphere client yet, you can download it by going to your ESXi installation&#8217;s IP in your web browser) I setup a new VM for Ubuntu Linux 9.10, allocating 16GB to the VM hard drive, and configuring it with thin provisioning (dynamically expands). All my data would be on a second virtual drive. I then proceeded to install Ubuntu and install all the updates. Now it was time to add space for my data.</p>
<p>It was at this point that I hit a snag. VMware ESXi only supports 256GB virtual disks. I have terabytes of data, so how am I supposed to store all this information? </p>
<p>Enter LVM (Logical Volume Manager). LVM is a great technology that has seen a lot of use in Linux, allowing you to create volumes that span multiple hard-drives/partitions. I added 5 256GB thin provisioned disks to the Ubuntu installation, and proceeded to mount them as a single ext3 volume under /mnt/Shares. I set the volume to auto-mount on reboot in my /etc/fstab file, and proceeded to create the directories inside /mnt/Shares that would serve up my data. You can see a list of my shares below.</p>
<ul>
<li>Backup (To be used for Time Machine)</li>
<li>Data (To be used for miscellaneous data, like eBooks)</li>
<li>Movies</li>
<li>Music</li>
<li>Photos (Will contain an rsync-ed folder of my Adobe Lightroom photos, as well as a folder for miscellaneous images (scans, etc))</li>
<li>Software (Will contain a copy of my software. I have directories created Windows and Mac, and the respective software in each)</li>
<li>TV</li>
</ul>
<p>The next interesting bit. How to actually share these shares. Obviously I don&#8217;t want to just open everything up to the world, and I also happen to have a multi-platform environment here, with Windows clients, Mac clients, and my landlord&#8217;s Linux clients. I elected to share all the shares using AFP (for my Macs), and the Movies, TV, and Software directories via SMB (for my Windows clients and the Linux clients). I created a user account called &#8216;main&#8217; for my use, &#8216;kidd&#8217; for my landlord, and &#8216;visitor&#8217; for any guests that may be over. All three are password protected. &#8216;main&#8217; has access to all shares, &#8216;kidd&#8217; has access to Movies, TV, and Software, and &#8216;visitor&#8217; has access to Movies and TV.</p>
<p>I shared the AFP shares to my Macs using a custom-compiled version of netatalk, following the great tutorial <a rel="nofollow" target="_blank" href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/" onclick="pageTracker._trackPageview('/outgoing/www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/?referer=');">here</a>. SMB configuration was fairly straightforward, and everything went well. I copied over as much data as possible (from the old server), before running out of disk space. At this point, I copied over data from the iMac 1TB into the now-empty old server, and popped the 1TB drive into the server. At this point I ran into the second snag. ESXi did not want to format the drive! I did some digging, and found that it was due to having been formatted as GUID before (in the Mac). I used dd to wipe out the first and last sectors of the drive, and tried to create a new partition via fdisk as per <a rel="nofollow" target="_blank" href="http://www.vm-help.com/esx/esx3i/ESXi_35_common_issues.php#unable_to_read_partition_information" onclick="pageTracker._trackPageview('/outgoing/www.vm-help.com/esx/esx3i/ESXi_35_common_issues.php_unable_to_read_partition_information?referer=');">these</a> instructions. Again, no go. After several attempts, I discovered that immediately after creating the partition table with fdisk, I had to reboot before using the vmkfstools command to create a datastore. After rebooting the server, I was able to format the drive appropriately. I logged into the Windows GUI console and deleted the new datastore. I then added the drive to the existing datastore, and fired up Ubuntu. I created several more 256GB thin-provisioned disks, and added them to the LVM. </p>
<p>I&#8217;ve installed &#8216;forked-daapd&#8217; as a service on Ubuntu. This allows me to open Front Row and select the server as a source. I&#8217;ve also &#8216;tightvncserver&#8217; set to run on startup, and have advertised the service in Avahi/Bonjour. This allows me to see the &#8216;Share Screen&#8230;&#8217; button in OS X finder, and control the MediaServer via Screen Sharing, rather than a dedicated VNC client.</p>
<p>It&#8217;s been a great experiment, and now a great production home-media server. I&#8217;m looking forward to setting up my lab environment in other VM&#8217;s on ESXi. Feel free to leave me any questions/comments below that you might have on the process.</p>


<p>Related posts:<ol><li><a href='http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/' rel='bookmark' title='Permanent Link: ESXi, ZFS, and Home Server Data Storage &#8211; Part 1'>ESXi, ZFS, and Home Server Data Storage &#8211; Part 1</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/08/update-re-esxi-zfs-storage/' rel='bookmark' title='Permanent Link: Update re: ESXi &#038; ZFS Storage'>Update re: ESXi &#038; ZFS Storage</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/04/thoughts-on-the-ipad/' rel='bookmark' title='Permanent Link: Thoughts on the iPad'>Thoughts on the iPad</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
