<?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>klein2 blog &#187; zfs</title>
	<atom:link href="http://www.klein2.de/tag/zfs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klein2.de</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 10:16:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Backup #ZFS Server</title>
		<link>http://www.klein2.de/2011/12/20/backup-zfs-server/</link>
		<comments>http://www.klein2.de/2011/12/20/backup-zfs-server/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 19:51:41 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[illumos]]></category>
		<category><![CDATA[openindiana]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2574</guid>
		<description><![CDATA[It&#8217;s a long time since I was using ZFS. I had some bad luck with ZFS in the past. No &#8211; that&#8217;s not 100% true, it was not the ZFS itself, but a damaged controller. Meanwhile I managed to get a replacement for the controller (Intel SASUC8i) which works fine in my main server (Risu) [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a long time since I was using ZFS. I had some bad luck with ZFS in the past. No &#8211; that&#8217;s not 100% true, it was not the ZFS itself, but a damaged controller. Meanwhile I managed to get a replacement for the controller (Intel SASUC8i) which works fine in my main server (Risu) since September. <span id="more-2574"></span></p>
<p>Yesterday, I called the Intel hotline and after 1h of very very good support (seriously, I was surprised!), I got a ticket ID and some instructions. The broken Intel SASUC8i will be picked up on Friday via DHL Express. I will receive a replacement Intel SASUC8i in a few days. Oh! The controller in the main server is a new one I bought back in September &#8211; so we&#8217;re talking about 2 different.</p>
<p>As long-term readers, you know about my little external cases &#8211; these Onnto DataTales. 4 bays per box with USB2, FW400/800 and eSATA. They became unreliable in the last months &#8211; kicking out some of the hard disks randomly, so I decided it&#8217;s enough. Additionally, I hate to split things &#8211; some stuff was on the box, the other stuff on the other one. D&#8217;oh. No. I wanted a better, more reliable and bigger solution.</p>
<p>I checked my hardware stock in the basement and found all stuff I need to create a backup server. Surfing a bit too much <a href="http://hardforum.com/forumdisplay.php?f=29">Data Storage Systems</a> of the [H]ard|Forum, I read so much about ZFS, the new Illumos Kernel and napp-it, that I decided to get back to ZFS for the backup server.</p>
<p>After plumbing the PC parts to a server for a few hours, I had a running system with these specs:</p>
<table cellspacing="0">
<tbody>
<tr>
<th>Part</th>
<th>Brand/Model</th>
</tr>
<tr>
<td>CPU</td>
<td>AMD Athlon X2 245e</td>
</tr>
<tr>
<td>Board</td>
<td>Asus M4A78LT-M</td>
</tr>
<tr>
<td>RAM</td>
<td>6GB ECC</td>
</tr>
<tr>
<td>NIC</td>
<td>Intel Desktop 1000 CT</td>
</tr>
<tr>
<td>Controller</td>
<td>Sil3132 eSATA/SATA Controller</td>
</tr>
<tr>
<td>Sys HD</td>
<td>160GB IDE WD</td>
</tr>
<tr>
<td>Storage HDs</td>
<td>8x 1TB SATA-II WDs</td>
</tr>
<tr>
<td>Case</td>
<td>Chieftec Mesh Midi Tower</td>
</tr>
<tr>
<td>PSU</td>
<td>CoolerMaster 450W</td>
</tr>
</table>
<p><img alt="" src="http://show.dev.klein2.net/a338bdced86f7ecd2d4ad740b5c35bbd.png" class="aligncenter" width="640" height="383" /></p>
<p>I installed <a href="http://openindiana.org/">OpenIndiana</a> (151a with Illumos Kernel) and created a RAIDz(1) pool of the 8x 1TB HDs which was online and usable after a few seconds &#8211; the joy of ZFS <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Of course, I wanted to have a nice GUI, even if I like to work on terminals. My choice is the awesome &#038; free <a href="http://www.napp-it.org">napp-it</a>.</p>
<p><img alt="napp-it" src="http://show.dev.klein2.net/01040ebaa67752d2171dab242a47f6d7.png" class="aligncenter" width="640" height="433" /></p>
<p>The server is currently getting loaded via rsync from the main server &#8211; because rsync via SSH was very slow (~20-30MB/s on the Gbit LAN), I now use an NFS share that is directly mounted on the main filer. It will take some time to backup all our stuff to the server &#8211; there are meanwhile ~5TB of important (well &#8211; more or less <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) stored. With the new server, ~6TB usable backup storage, ECC RAM &#038; ZFS, I&#8217;ve a very good and secure feeling.</p>
<p>The main server currently runs a pure Debian system, which I like, but maybe I will put ESXi back on again once I received the replacement controller from Intel, create a hardware RAID1 of my 2x 640GB HDs, install ESXi and an OpenIndiana VM onto this array. This setup is called the &#8220;<a href="http://www.napp-it.de/napp-it/all-in-one/index_en.html">All-In-One-Box</a>&#8221; and my SuperMicro board is ready for this, supporting PCI(e)-PassThrough very well. But more on this later <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>PS. The gateway is nearly done, unfortunately, I couldn&#8217;t use the HD inside this box, because of heat &#8211; but it works fine externally &#8211; USB2 is USB2. More on this, also later &#8211; so please stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/12/20/backup-zfs-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server back to Debian</title>
		<link>http://www.klein2.de/2011/04/08/server-back-to-debian/</link>
		<comments>http://www.klein2.de/2011/04/08/server-back-to-debian/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 09:35:34 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ext4]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1924</guid>
		<description><![CDATA[You maybe remember my happiness with ZFS. Well, how should I say? Using ZFS as a private person has it&#8217;s drawbacks. When you run OpenSolaris, OpenIndiana, Nexenta or even (brrr) Solaris 11 Express &#8211; you mostly use it for ZFS. Sure &#8211; you can virtualize stuff using VirtualBox, but I personally still missed the &#8220;easy&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>You maybe remember my happiness with ZFS. Well, how should I say? Using ZFS as a private person has it&#8217;s drawbacks. When you run OpenSolaris, OpenIndiana, Nexenta or even (brrr) Solaris 11 Express &#8211; you mostly use it for ZFS. Sure &#8211; you can virtualize stuff using VirtualBox, but I personally still missed the &#8220;easy&#8221; things I can do with the &#8220;real&#8221; Debian for example hddtemp &#8211; as simple as this sounds! <span id="more-1924"></span></p>
<p>This week, my OpenIndiana presented me this message:</p>
<pre> pool: storage
 state: UNAVAIL
status: One or more devices could not be used because the label is missing
        or invalid.  There are insufficient replicas for the pool to continue
        functioning.
action: Destroy and re-create the pool from
        a backup source.
   see: http://www.sun.com/msg/ZFS-8000-5E
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        storage     UNAVAIL      0     0     0  insufficient replicas
          raidz2-0  UNAVAIL      0     0     0  insufficient replicas
            c1t0d0  FAULTED      0     0     0  corrupted data
            c1t1d0  FAULTED      0     0     0  corrupted data
            c1t2d0  FAULTED      0     0     0  corrupted data
            c1t3d0  FAULTED      0     0     0  corrupted data
            c1t4d0  ONLINE       0     0     0
            c1t5d0  ONLINE       0     0     0
            c1t6d0  ONLINE       0     0     0
            c1t7d0  ONLINE       0     0     0
            c2t1d0  ONLINE       0     0     0
            c2t2d0  ONLINE       0     0     0</pre>
<p>Hmm.. had no clue what&#8217;s going on. I&#8217;ve seen the speed of data transfer and accessing the the files via AFP went slower in the last days, I guess this was an indicator for what happend. Luckily, when moving from Nexenta to OpenIndiana, I had done backups on 2 HDs in my Mac Pro &#8211; those were still available, and so I lost nearly no data. Luckily! I was a bit shocked by this super-secure filesystem and so I took a look on Google and look what I found: <a href="http://www.techfak.uni-bielefeld.de/ags/rbg/de/dienste-daten-dateiserver.html">Dateiserver Uni Bielefeld</a>. This text is German, sorry &#8211; it describes that their 100TB storage, based on ZFS crashed 2x and they now switched back to Debian and ext4. Interesting!</p>
<p>While being more a fan of Debian than of Solaris (and knowing it much better as I use it as development platform for <a href="http://www.ctrltweet.com">ctrltweet</a> every day), I decided to stop messing around with a system and filesystem that seems to be done for bigger arrays than my home server usage. So I went with Debian, kicked out the 1.5TB HDs and installed some 1TB HDs.</p>
<p>The system looks mostly the same, but for completeness &#8211; here&#8217;s a hardware overview:<br />
- AMD Athlon 245e (2.9GHz, DualCore, &#8220;energy efficient&#8221;)<br />
- 6x Hitachi 1TB 24/7 drives<br />
- 5x WD10EADS 1TB &#8220;Green&#8221; drives<br />
- 1x WD1001FALS 1TB &#8220;Black&#8221; drive<br />
- 16GB ECC RAM<br />
- System (Debian Squeeze) installed on an Intel 80GB SSD<br />
- Intel PCIe x1 GBit Ethernet card (CT)<br />
- Intel SASUC8i (LSI) controller with IT Firmware<br />
- old ATI PCI graphics card which is fine for console and up to 800&#215;600</p>
<p>Everything is cooled by fans and the temperatures of the HDs are between 25 and 28°C under load.</p>
<p>Creating the RAID10 took a while &#8211; 8h&#8217;s to be exact and I&#8217;ve postponed ANY action on it until it&#8217;s done &#8211; heard that this should work out better. Later in the evening, it was finished and I formatted the &#8220;md0&#8243; with ext4. Very nice and fast (and meanwhile stable) filesystem. As result I have 6TB (or 5.4TB) available for my data.</p>
<p>I went the RAID10 road because of 3 reasons:<br />
- Security<br />
- Performance<br />
- have just 3.2TB of data at the moment and grows not THAT fast</p>
<p>Backup is done to one of the Onnto DataTales that I still have NOT sold. I first had some issues with an eSATA PCIe x1 card and it was terrible slow. For another project I wanted to do in the past, I had 2x SATA to eSATA cables laying around in the basement. Hmm&#8230; I had one port unused left on the board, so I connected it, opened up a &#8220;COM&#8221; port hole in the case and moved it to the outside. The Onnto box now stays on top of the case, having 4x 1.5TB in RAID5 (4.5TB available) and connected directly to the mainboard. The performance is VERY good. <strong>hdparm -tT</strong> get&#8217;s 180MB/s <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  YEY! That&#8217;s fine for a nightly rsync backup.</p>
<p>More on this later <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Still rsyncing my stuff over to the server from my Mac Pro.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/04/08/server-back-to-debian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Karinka upgraded</title>
		<link>http://www.klein2.de/2011/02/08/karinka-upgraded/</link>
		<comments>http://www.klein2.de/2011/02/08/karinka-upgraded/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 13:09:17 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[16GB]]></category>
		<category><![CDATA[ECC]]></category>
		<category><![CDATA[kingston]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[ram]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1678</guid>
		<description><![CDATA[End of 2010, after some fails with building a reliable fileserver and way too much redesigns in the office, I said that I&#8217;m happy with the Mac Pro, the screens and the fileserver. That&#8217;s true until today The Nexenta Core is an awesome OS for a fileserver, it&#8217;s fast, very solid and stable. Last week, [...]]]></description>
			<content:encoded><![CDATA[<p>End of 2010, after some fails with building a reliable fileserver and way too much redesigns in the office, I said that I&#8217;m happy with the Mac Pro, the screens and the fileserver. That&#8217;s true until today <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The Nexenta Core is an awesome OS for a fileserver, it&#8217;s fast, very solid and stable. <span id="more-1678"></span></p>
<p>Last week, I managed to install VirtualBox on this machine. The reason: I wanted to virtualize my VMs (and a real server) on this machine. Read my last 2 posts about that.</p>
<p>Today, I&#8217;ve got some RAM to upgrade Karinka. Previously, I had 6GB ECC RAM (DDR3-1333) installed, but ZFS + VirtualMachines boosted the RAM usage up to 97% and it started swapping to the syspool (IDE HD). I then bought 16GB ECC RAM (2x Kits of 8GB (2x4GB each)).</p>
<p>Here are some photos:</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/02/boxes.jpg" alt="" title="boxes" class="aligncenter size-full wp-image-1679" /></div>
</div>
<p>Before: 2x2GB ECC RAM + 2x1GB ECC RAM</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/02/ram-6gb.jpg" alt="" title="ram-6gb" class="aligncenter size-full wp-image-1683" /></div>
</div>
<p>Removed the old memory</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/02/noram.jpg" alt="" title="noram" class="aligncenter size-full wp-image-1682" /></div>
</div>
<p>Installed 4x4GB ECC RAM <img src='http://www.klein2.de/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/02/ram-16gb.jpg" alt="" title="ram-16gb" class="aligncenter size-full wp-image-1684" /></div>
</div>
<p>Booting it up and&#8230; hui&#8230; everything as hoped <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/02/DSC02617.jpg" alt="" title="DSC02617" class="aligncenter size-full wp-image-1680" /></div>
</div>
<p>saidar -c -d 1 shows this in Nexenta</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/02/DSC02623.jpg" alt="" title="DSC02623" class="aligncenter size-full wp-image-1681" /></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/02/08/karinka-upgraded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/02/boxes-150x150.jpg" length="9591" type="image/jpg" />	</item>
		<item>
		<title>Move a VMware Fusion VM to VirtualBox on NexentaCore</title>
		<link>http://www.klein2.de/2011/02/04/move-a-vmware-fusion-vm-to-virtualbox-on-nexentacore/</link>
		<comments>http://www.klein2.de/2011/02/04/move-a-vmware-fusion-vm-to-virtualbox-on-nexentacore/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 21:49:52 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vmware fusion]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1648</guid>
		<description><![CDATA[I&#8217;m still very satisfied with my Nexenta ZFS server &#8220;Karinka&#8221;. It has an uptime of 28 days, just interrupted 28 days ago to put in 4 more HDs (4x 1.5TB) for an internal backup. Next week, I will have to shorty shut it down again &#8211; the reason: More memory. Karinka now runs with 6GB [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still very satisfied with my Nexenta ZFS server &#8220;Karinka&#8221;. It has an uptime of 28 days, just interrupted 28 days ago to put in 4 more HDs (4x 1.5TB) for an internal backup. Next week, I will have to shorty shut it down again &#8211; the reason: More memory. <span id="more-1648"></span></p>
<p>Karinka now runs with 6GB of RAM, which was nice fast for ZFS only. Today in the late afternoon, I decided to give VirtualBox a try. I currently run a Virtual Machine for my development stuff on my Mac mini server using VMware Fusion and a real intranet server in the rack. That worked fine and I have nothing negative to say about that. But wouldn&#8217;t it make sense to have the VMs also running on Karinka? I mean &#8211; ZFS is a reason alone. Don&#8217;t have to run those 2 machines 24/7 + the ZFS server is also a good one. So I googled a bit and quickly found a manual for NexentaStor, not Core or NCP, but I checked very single package with &#8220;apt-search cache
<packagename>&#8221; and all were found.</p>
<p>You will find this awesome guide <a href="http://hype-o-thetic.com/2010/08/06/how-to-install-virtualbox-3-1-6-on-nexentastor-3-0-4/">over here</a>.</p>
<p><strong>Installation of X forwarding to the Mac</strong><br />
While the installation was pretty easy, I needed <a href="http://jacekdominiak.com/">Jacek&#8217;s</a> help to get the X forwarding to work on my Mac Pro. In the end, it was pretty easy to get it to work, if you know what you need to do. So I tell you <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>On your Server:</p>
<pre class="brush:bash">$ export $DISPLAY="localhost:10.0"</pre>
<pre class="brush:bash"># apt-get install xorg</pre>
<p>On your Mac:<br />
Install X11 from the system DVD. Reboot your system! This is mandatory!<br />
In the terminal, you should receive a similar output:</p>
<pre class="brush:bash">kurumi:~ dieta$ echo $DISPLAY
/tmp/launch-qXH2MK/org.x:0</pre>
<p>Now, type:</p>
<pre class="brush:bash">$ ssh -X [serverip/name]
[...]
# VirtualBox &#038;</pre>
<p><strong>VirtualBox and basic configuration of a new VM</strong><br />
This should push VirtualBox after 2-3 seconds on your Mac screen.<br />
<img src="http://www.klein2.de/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-04-um-22.20.58.png" alt="" title="Bildschirmfoto 2011-02-04 um 22.20.58" class="aligncenter size-full wp-image-1650" /></p>
<p>Now you can go on and create a VirtualBox VM. Put the ISOs on a reachable path on your server &#8211; oh &#8211; and maybe run it NOT as root but as your user!</p>
<p>Of course, closing VirtualBox or the VM window would STOP your VM from working, so we can just use it for basic configuration, but that&#8217;s fine. VirtualBox has some very nice CLI tools available. Once you&#8217;ve installed your fresh Debian/Windows/Solaris&#8230; whatever &#8211; you can shut it down.</p>
<p>Go back to the terminal and type:</p>
<pre class="brush:bash">$ VBoxHeadless -s "[VMName]" &#038;</pre>
<p>It is very important to be aware of the case sensivity! Also the &#8220;&#038;&#8221; at the end of line is important. It will put your task to the background, so it will not close down when you leave the terminal.</p>
<p><strong>Importing a VMware Fusion VM to VirtualBox</strong><br />
Believe me guys, this costed me some more grey hairs <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  So &#8211; here we go.</p>
<p>First &#8211; open up your VMware Fusion with your VM, create a NEW Snapshot (sorry, you can&#8217;t take them with you) and DELETE the old ones!). If you won&#8217;t do this, the oldest Snapshot will appear on VirtualBox and you can&#8217;t do anything against it.</p>
<p>Done? Great! Now do a right click on your VMware Fusion file and show the package contents, enter the folder and copy all files. Open the folder on your server (doesn&#8217;t matter if that&#8217;s SMB, NFS, FTP, SCP or AFP <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) and create a new folder with the name of the virtual machine. Paste the files into.</p>
<p>I was using my Debian development platform (copy of course!) and copied it. There are some things you should know. VirtualBox loves IDE &#8211; so every imported and fresh created virtual disk will be IDE. VMware Fusion loves SATA. So you see &#8211; if you run Debian &#8211; it won&#8217;t boot because it looks for /dev/sda1 and /dev/hda1 exist <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>But &#8211; step by step.</p>
<p>When you&#8217;ve copied the files over to your Nexenta server, click on &#8220;File&#8221; -> &#8220;Virtual Media Manager&#8221;.<br />
<img src="http://www.klein2.de/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-04-um-22.31.55.png" alt="" title="Bildschirmfoto 2011-02-04 um 22.31.55" class="aligncenter size-full wp-image-1652" /></p>
<p>Click the &#8220;Add&#8221; icon and select the main vmdk file in the directory of your virtual machine. In my case it was dev.vmdk, as the name of my VM is Dev. Hit &#8220;Ok&#8221;.</p>
<p>Next, we need to create a BLANK VM to import the virtual harddisk into. Click the &#8220;New&#8221; button, then &#8220;Next&#8221; and enter the name of the new/imported VM. Be careful! Case sensitive! I use &#8220;Dev&#8221;, &#8220;Linux&#8221;, &#8220;Debian&#8221; (32bit) for my Development VM. And hit &#8220;Next&#8221;.</p>
<p>256MB is fine for my Dev Machine, so &#8220;Next&#8221;.</p>
<p>Then I select the &#8220;Use existing hard disk&#8221; radio and select my &#8220;dev.vmdk&#8221;.<br />
<img src="http://www.klein2.de/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-04-um-22.35.10.png" alt="" title="Bildschirmfoto 2011-02-04 um 22.35.10" class="aligncenter size-full wp-image-1653" /></p>
<p>On the last screen accept all settings. Done! <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Now we need to edit some settings.</p>
<p>First of all, we need to move from IDE to SATA. Click your imported VM and then the button &#8220;Settings&#8221;, then on &#8220;Storage&#8221;. Hit the 3rd icon (white with green plus) on the bottom of the box and select &#8220;Add SATA controller&#8221;. Click the SATA controller and hit the first icon (data with green plus) and click it until the &#8220;dev.vmdk&#8221; appears. Delete the not used datasets, also, you can remove the Floppy and CD/DVD drive if you don&#8217;t need them. On my site it looks like that:<br />
<img src="http://www.klein2.de/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-04-um-22.38.13.png" alt="" title="Bildschirmfoto 2011-02-04 um 22.38.13" class="aligncenter size-full wp-image-1654" /></p>
<p>I have also removed USB2 and Audio support. I&#8217;ve set the network to &#8220;bridged&#8221; and the graphic card memory to 16MB. That&#8217;s why I get the message &#8220;Non-optimal settings detected&#8221;, but that&#8217;s fine. Hit &#8220;Ok&#8221; and you&#8217;re done!</p>
<p>Now we need to launch the VM from the terminal, but first, we need to make one more settings to the VM itself.</p>
<p>If I would run it now, I would receive this error message:</p>
<pre class="brush:bash">dieta@karinka:~$ nohup VBoxHeadless -s "Dev" &#038;
Sun VirtualBox Headless Interface 3.1.6
(C) 2008-2010 Sun Microsystems, Inc.
All rights reserved.

VRDP server failed to start.
VRDP server is inactive.</pre>
<p>We will have to set the the vrdpport. Shut down the now running VM:</p>
<pre class="brush:bash">$ VBoxManage controlvm "Dev" poweroff</pre>
<p>Now the setting:</p>
<pre class="brush:bash">$ VBoxManage modifyvm "Dev" --vrdpport 3390</pre>
<p><strong>(!) The port number has to grow! If you run 3 machines it should look like:<br />
VM1: 3389<br />
VM2: 3390<br />
VM3: 3391<br />
etc.</strong></p>
<p>And finally launch the VM:</p>
<pre class="brush:bash">$ nohup VBoxHeadless -s "Dev" &#038;</pre>
<p>Press Enter afterwards to get back into the foreground, the VM is running in the background. In my case, I had setup a static IP and after 30 seconds, I was able to reach the VM with my browser and my terminal via ssh &#038; ping.</p>
<pre class="brush:bash">dieta@dev:~$ uptime
 23:45:41 up 1 min,  1 user,  load average: 0.20, 0.08, 0.03
dieta@dev:~$ uname -a
Linux dev 2.6.26-2-686 #1 SMP Thu Sep 16 19:35:51 UTC 2010 i686 GNU/Linux</pre>
<p>Hope you enjoyed this! Until this morning, I was not sure if I could run ANY virtualization on this machine but I have never expected that it will work so great!</p>
<p>I&#8217;ve ordered 16GB ECC RAM today, ZFS loves memory and VMs also do <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  That&#8217;s just a little upgrade &#8211; because nothing big will change before 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/02/04/move-a-vmware-fusion-vm-to-virtualbox-on-nexentacore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-04-um-22.20.58-150x150.png" length="20537" type="image/jpg" />	</item>
		<item>
		<title>Automatic snapshots with Nexenta</title>
		<link>http://www.klein2.de/2011/01/13/automatic-snapshots-with-nexenta/</link>
		<comments>http://www.klein2.de/2011/01/13/automatic-snapshots-with-nexenta/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 08:32:59 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1633</guid>
		<description><![CDATA[Another day, another script This one is so small &#038; tiny that it don&#8217;t make sense to provide a download. ZFS offers the option to do snapshots of your current data. This counts per pool. It&#8217;s 100% incremental and a very space-saving option to do backups! Please note that it will NOT 100% replace a [...]]]></description>
			<content:encoded><![CDATA[<p>Another day, another script <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  This one is so small &#038; tiny that it don&#8217;t make sense to provide a download. <span id="more-1633"></span></p>
<p>ZFS offers the option to do snapshots of your current data. This counts per pool. It&#8217;s 100% incremental and a very space-saving option to do backups! Please note that it will NOT 100% replace a backup &#8211; if you&#8217;re running a RAIDz1 and 2 drives die the same time, all snapshots are also lost, but it&#8217;s fine to revert back accidentally deleted files.</p>
<p>The regular syntax to do a snapshot looks like that</p>
<pre class="brush:plain">zfs snapshot backup/test@13012010</pre>
<p><strong>zfs snapshot</strong> is the command with the parameter<br />
<strong>@</strong> defines the snapshot<br />
<strong>13012010</strong> is an example name that makes most sense in my mind. You can use anything else like &#8220;project_test&#8221;, too.</p>
<p>My script is (like gesund) made to be placed into the crontab. Here&#8217;s the code</p>
<pre class="brush:bash">#!/bin/bash
Dat=$(date +%d%m%Y)
echo Creating snapshot of pool $1
zfs snapshot $1@$Dat</pre>
<p>As I mentioned in the intro &#8211; pretty small one <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Usage</p>
<pre class="brush:plain">./snapshot backup/test</pre>
<p>This will create a snapshot of the used pool with the current date at the end. It&#8217;s meant to be used 1x per day.</p>
<p>On the crontab, I&#8217;ve added it like this</p>
<pre class="brush:plain">0 11 * * * /root/snapshot storage/privat
2 11 * * * /root/snapshot storage/firmendaten
4 11 * * * /root/snapshot mediapool</pre>
<p>It will run every day at 11am, doing a snapshot one after one for every pool.</p>
<p>Of course, you can make it a bit more flexible placing it into the crontab like this</p>
<pre class="brush:plain">0 11 * * * /root/snapshot storage/privat &#038;&#038; /root/snapshot storage/firmendaten &#038;&#038; /root/snapshot mediapool</pre>
<p>Don&#8217;t forget to set the shell script to <strong>chmod a+x</strong> to run it <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Oh! Nearly forgot &#8211; you want to see your snapshots listed? No problem!</p>
<pre class="brush:plain">zfs list -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
storage/test@project_test           0      -  43.4K  -</pre>
<p>This will contain ALL snapshots you do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/01/13/automatic-snapshots-with-nexenta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gesund-02 &#8211; logs &amp; testmode added</title>
		<link>http://www.klein2.de/2011/01/12/gesund-02-logs-testmode-added/</link>
		<comments>http://www.klein2.de/2011/01/12/gesund-02-logs-testmode-added/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 10:36:41 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[gesund]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[pool]]></category>
		<category><![CDATA[prowl]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1597</guid>
		<description><![CDATA[Last night I was sitting in front of my MacBook and thought it would be a nice idea to add a log, so you know WHEN something went wrong. Also, I implemented a testmode, so you don&#8217;t have to manipulate the shell script everytime you want to run a test. New features - Logging Everytime [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I was sitting in front of my MacBook and thought it would be a nice idea to add a log, so you know WHEN something went wrong. Also, I implemented a testmode, so you don&#8217;t have to manipulate the shell script everytime you want to run a test. <span id="more-1597"></span></p>
<p><strong>New features</strong><br />
- Logging<br />
<em>Everytime you run the script, it will place the follwing line into the log file: <strong>/var/log/gesund.log</strong></em></p>
<p>Example</p>
<pre class="brush:plain">Checking ZFS pool 'storage' on 12.01.2011 at 09:00:00
Everything fine on 'storage'!
-----------------------------------------------------</pre>
<p>- Testmode<br />
<em>Why to manipulate the script everytime you want to see if the script works fine when your zpool is not &#8220;healthy&#8221; anymore.</em></p>
<p>Usage</p>
<pre class="brush:plain">./gesund.sh backup -test</pre>
<p>It is important that you use the parameter &#8220;-test&#8221; as 2nd one and that you add an existing zpool name.</p>
<p><strong>prowl requirements</strong><br />
Maybe you see prowl.pl complaining like this:</p>
<pre class="brush:plain">root@karinka:~# perl prowl.pl -apikey=xxxx -notification="FEHLER BEIM BACKUP" -event=BACKUP -application=KARINKA -priority=2
Can't locate LWP/UserAgent.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at prowl.pl line 33.
BEGIN failed--compilation aborted at prowl.pl line 33.</pre>
<p>Then you need to install libwww-perl:</p>
<pre class="brush:plain">apt-get install libwww-perl</pre>
<p>and Crypt:SSL.eay, too:</p>
<pre class="brush:plain">perl -MCPAN -e 'install Crypt::SSLeay'</pre>
<p>Many thanks to <a href="http://twitter.com/jck_d">@jck_d</a> for explaining how to install this and to <a href="http://twitter.com/maximdim">@MaximDim</a> for highlighting that this also could happen on other systems <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>Download</strong><br />
<a href="http://klein2.de/files/gesund-02.tar.gz">Download</a> 3KB, .tar.gz</p>
<p>or</p>
<pre class="brush:plain">wget http://klein2.de/files/gesund-02.tar.gz</pre>
<p>Hopy you enjoy this updated script <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Please also refer to my <a href="http://www.klein2.de/2011/01/11/gesund-01-release/">previous post</a> to read about why I did this script and how it may help you <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>PS. My crontab now scans ALL pools every 3h&#8217;s &#8211; this helps to see WHEN something went wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/01/12/gesund-02-logs-testmode-added/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gesund-01 release</title>
		<link>http://www.klein2.de/2011/01/11/gesund-01-release/</link>
		<comments>http://www.klein2.de/2011/01/11/gesund-01-release/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 23:21:11 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[gesund]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[pool]]></category>
		<category><![CDATA[prowl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1573</guid>
		<description><![CDATA[MaxiDim has commented on my last post that it&#8217;s a wise idea to be informed if something went wrong with your ZFS pool(s). I agree. He posted an example how to realize this using eMail. Well, I think eMail is fine, but prowl is even better What does this script do? gesund.sh grabs the result [...]]]></description>
			<content:encoded><![CDATA[<p>MaxiDim has commented on my last post that it&#8217;s a wise idea to be informed if something went wrong with your ZFS pool(s). I agree. He posted an example how to realize this using eMail. Well, I think eMail is fine, but prowl is even better <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <span id="more-1573"></span></p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/01/gesund-ios.jpg" alt="" title="gesund-ios" width="400" height="600" class="aligncenter size-full wp-image-1592" /></p>
<p><strong>What does this script do?</strong><br />
gesund.sh grabs the result of the command <strong>zpool status -x
<poolname></strong>. If it says &#8220;healthy&#8221; &#8211; fine, but if not it sends a message to your iOS device complaining that something is not Ok.</p>
<p><strong>Can I put it into my crontab?</strong><br />
Yes! It&#8217;s made for this <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>What do I need?</strong><br />
- <a href="http://itunes.apple.com/de/app/prowl-growl-client/id320876271?mt=8" target="_blank">prowl for your iOS device</a> (2,39€ one time, sending and receiving messages just costs you data transfers if you&#8217;re out of a WiFi spot)<br />
- <a href="http://prowl.weks.net/" target="_blank">a (free) prowl API key</a><br />
- root access to your ZFS server (I&#8217;ve coded this script for Nexenta &#8211; if you want to use it on other systems, you MAYBE need to change some stuff)<br />
- installed perl on your ZFS server<br />
- the following script <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Download</strong><br />
<a href='http://klein2.de/files/gesund-01.tar.gz'>Download</a> 2KB gesund-01.tar.gz archive</p>
<p>or</p>
<pre class="brush:plain">wget http://klein2.de/files/gesund-01.tar.gz
tar -xvfz gesund-01.tar.gz</pre>
<p><strong>Customize the script (needed)</strong><br />
Open the <strong>gesund-01.sh</strong> in your favorite editor (I personally use nano, a lot love vi.. whatever <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</p>
<p>In line 25, replace <strong><INSERT YOUR PROWL API KEY HERE></strong> with your own prowl API KEY. You should also replace the <strong>event</strong> and <strong>application</strong> name so that it fits your needs.</p>
<p>If you want to test the script first (what I would recommend, also do this for line 19 and remove the # in front of it.</p>
<p>Once this is done, you have to set the right file rights.</p>
<pre class="brush:plain">chmod a+x gesund-01.sh
chmod a+x prowl.pl</pre>
<p><strong>Test</strong><br />
Look for your pool names typing <strong>zfs list</strong>.</p>
<pre class="brush:plain">./gesund-01.sh backup</pre>
<p>If everything was set up fine and you&#8217;ve removed the # in line 19 and customized it, you should receive a message telling you that (hopefully) everything is fine.</p>
<p>On screen you should see:</p>
<pre class="brush:plain">Everything fine!</pre>
<p>or</p>
<pre class="brush:plain">ZFS pool error in pool [poolname]</pre>
<p><strong>Extended testing</strong><br />
In line 10, replace &#8220;healthy&#8221; with anything that the <strong>command zpool status -x
<poolname></strong> does NOT contain. This will give you the error message.</p>
<p><strong>crontab</strong><br />
It makes a lot sense to use it in your crontab, so this check will be done often enough &#8211; it&#8217;s perfectly timed after a scrubbing.</p>
<p>Example</p>
<pre class="brush:plain">0 10 * * * /root/gesund-01.sh backup &#038;&#038; /root/gesund.sh mediapool</pre>
<p>As you can see, my gesund-01 script runs every day at 10am. I haven&#8217;t placed it a night &#8211; because I sleep that time. You can easily attach more pools to check by simply adding a &#038;&#038; between both commands.</p>
<p>I have the files placed in my /root folder &#8211; of course you can place it where ever you want and the cronjob has access to! For the Linux users reading this &#8211; on Solaris (and that&#8217;s the Nexenta kernel), you don&#8217;t need to add a username in front of the command inside the crontab.</p>
<p>Hope you guys will find it useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/01/11/gesund-01-release/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/01/Foto-150x150.png" length="48486" type="image/jpg" />	</item>
		<item>
		<title>Time Machine Volumes with ZFS &amp; AFP</title>
		<link>http://www.klein2.de/2011/01/09/time-machine-volumes-with-zfs-afp/</link>
		<comments>http://www.klein2.de/2011/01/09/time-machine-volumes-with-zfs-afp/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 11:49:33 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[afp]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[netatalk]]></category>
		<category><![CDATA[time machine]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1550</guid>
		<description><![CDATA[After moving to Nexenta with ZFS, I of course wanted to keep hourly backups of the Macs in the network. We&#8217;re currently running 6 of them: - Mac Pro &#8220;Kurumi&#8221; in the office - iMac &#8220;Indy&#8221; in the office - MacBook &#8220;Dawn&#8221; &#8211; everywhere - MacBook &#8220;Hammy&#8221; &#8211; everywhere - Mac mini &#8220;Belldandy&#8221; in the [...]]]></description>
			<content:encoded><![CDATA[<p>After moving to Nexenta with ZFS, I of course wanted to keep hourly backups of the Macs in the network. We&#8217;re currently running 6 of them: <span id="more-1550"></span></p>
<p>- Mac Pro &#8220;Kurumi&#8221; in the office<br />
- iMac &#8220;Indy&#8221; in the office<br />
- MacBook &#8220;Dawn&#8221; &#8211; everywhere<br />
- MacBook &#8220;Hammy&#8221; &#8211; everywhere<br />
- Mac mini &#8220;Belldandy&#8221; in the living room<br />
- Mac mini &#8220;Saki&#8221; in the office</p>
<p>As both Mac minis are &#8220;just&#8221; used to playback videos (from the Nexenta server), TV (Sat) &#038; Radio (Sat), I don&#8217;t think a backup makes any sense. So &#8211; still 4 Macs to backup left. On Debian it was a hassle to create new partitions now and oh &#8211; the backup pool (4x 1.5TB RAIDz1) was already created and data is stored onto.</p>
<p>Luckily, ZFS is a fantastic filesystem. I simply create new pools below the mainpool.</p>
<pre class="brush:plain">zfs create backup/tm-kurumi</pre>
<p>Done! This took just a few seconds. Now I want that Time Machine does not fill up the complete space of the backup pool, so I set a quota. 500GB sounds reasonable, since I save most of my stuff directly to my server and my Mac Pro&#8217;s OS drive is a 240GB SSD.</p>
<pre class="brush:plain">zfs set quota=500G backup/tm-kurumi</pre>
<p>Let&#8217;s see if it works:</p>
<pre class="brush:plain">root@karinka:/var/spool/cron/crontabs# zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
backup                  1.15T  2.85T   578G  /backup
backup/tm-kurumi         65K   500G   65K  /backup/tm-kurumi</pre>
<p>Looks good! The next step is to assign the correct rights to this volume, so that the user can really use it when logging on to it via AFP and later using Time Machine.</p>
<pre class="brush:plain">chmod 770 -R /backup/tm-kurumi
chown -R dieta /backup/tm-kurumi</pre>
<p>&#8220;dieta&#8221; is my username to access the AFP network.</p>
<p>Last step on the UNIX side is to make this volume &#8220;supported&#8221;. In the past a lot people were working with the following command on the CLIENT</p>
<pre class="brush:plain">defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1</pre>
<p>but this is a bad idea &#8211; you need to redo this on every single client. There&#8217;s an easier option (especially from admins point of view) to make a volume supported from the server&#8217;s side.</p>
<pre class="brush:plain">touch /backup/tm-kurumi/.com.apple.timemachine.supported</pre>
<p>That&#8217;s all you need to do (sure, per volume, but it saves you to touch others Macs from the terminal). Now this is a fully supported Time Machine volume <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Oh! It seems like this also works for Debian &#038; other systems and not only Nexenta/OpenSolaris, so give it a try!</p>
<p>To share it, we need to add a single line (per Time Machine) to the <strong>/etc/netatalk/AppleVolumes.default</strong>:</p>
<pre class="brush:plain">/backup/tm-kurumi       "Time Machine Kurumi"   allow:dieta cnidscheme:dbd options:tm</pre>
<p>Maybe you want to restart netatalk now using</p>
<pre class="brush:plain">/etc/init.d/netatalk restart</pre>
<p>But I found out, that&#8217;s it&#8217;s not needed. AFP loads the netatalk config files when you log on to the server via Finder.</p>
<p>At last, connect to your server via AFP and log in to the new volume and them tell Time Machine to use this volume. Here&#8217;s a screenshot how it looks when the backup is done <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/01/Bildschirmfoto-2011-01-09-um-12.47.01.png" alt="" title="Bildschirmfoto 2011-01-09 um 12.47.01" class="aligncenter size-full wp-image-1553" /></p>
<p>Hope you enjoyed this post and have learned some stuff!</p>
<p>By the way: did it for all 4 Macs and this looks like this on Nexenta:<br />
<img src="http://www.klein2.de/wp-content/uploads/2011/01/Bildschirmfoto-2011-01-09-um-12.53.53.png" alt="" title="Bildschirmfoto 2011-01-09 um 12.53.53" class="aligncenter size-full wp-image-1556" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/01/09/time-machine-volumes-with-zfs-afp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/01/Bildschirmfoto-2011-01-09-um-12.47.01-150x150.png" length="18814" type="image/jpg" />	</item>
		<item>
		<title>Nexenta and HDD temperatures</title>
		<link>http://www.klein2.de/2011/01/06/nexenta-and-hdd-temperatures/</link>
		<comments>http://www.klein2.de/2011/01/06/nexenta-and-hdd-temperatures/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 09:12:28 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hddtemp]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[smartctl]]></category>
		<category><![CDATA[smartmontools]]></category>
		<category><![CDATA[temperature]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1531</guid>
		<description><![CDATA[Nexenta is based on Ubuntu, which is based on Debian. It&#8217;s mainly an Ubuntu server installation with the OpenSolaris kernel. A lot of packages are available via apt-get, but not all stuff you maybe know from Debian. I like the little tool hddtemp, but unfortunately it&#8217;s not available for the OpenSolaris kernel. But there&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>Nexenta is based on Ubuntu, which is based on Debian. It&#8217;s mainly an Ubuntu server installation with the OpenSolaris kernel. A lot of packages are available via apt-get, but not all stuff you maybe know from Debian. <span id="more-1531"></span></p>
<p>I like the little tool hddtemp, but unfortunately it&#8217;s not available for the OpenSolaris kernel. But there&#8217;s a maybe better alternative: smartmonctl. I&#8217;ve got a link last night to this <a href="http://breden.org.uk/2008/05/16/home-fileserver-drive-temps/">Simon&#8217;s blog</a> who wrote a lot about ZFS &#038; OpenSolaris. smartmontools seems not to be maintained for OpenSolaris/Solaris anymore, BUT in this case, I found it via apt-get in Nexenta.</p>
<p>So here&#8217;s how to install it:</p>
<pre class="brush:plain">apt-get install smartmontools</pre>
<p>That was easy, but to get some information out of your HDs you need a command, or even better, a script that scans all your HDs and displays the temps. Simon was so nice and did one, I just had to change some things to make it work on Nexenta.</p>
<pre class="brush:bash">#!/usr/bin/bash
# is there a way to populate the array by querying the zfs pool directly?

drives=(c2d0 c0t0d0 c0t1d0 c0t2d0 c0t3d0 c0t4d0 c0t5d0 c3t0d0 c3t1d0 c3t2d0 c3t3d0)
temp=""
drivetemp () {
  drive=$1
#  printf "drive passed in = %s\n\n" $drive
  temp=`/usr/sbin/smartctl -a -d scsi /dev/rdsk/$drive | \
       grep Current | awk '{print $4 $5}'`
  return
}
drives_count=${#drives[@]}
index=0
while [ "$index" -lt "$drives_count" ]
do
  drivetemp ${drives[$index]}
  printf "Drive %s temp is %s\n" ${drives[$index]} $temp
  let "index = $index + 1"
done</pre>
<p>This is my config, but of course you need to add your own drives. In the above script you can see them in <em>italic</em>. To see your drive names, simply type:</p>
<pre class="brush:plain">format</pre>
<p>and press Ctrl+C to get out of the command. You should see a list like that:</p>
<pre class="brush:plain">AVAILABLE DISK SELECTIONS:
       0. <em>c0t0d0</em> ATA-Hitachi HDS72101-A39C-931.51GB
          /pci@0,0/pci1458,b002@11/disk@0,0
       1. <em>c0t1d0</em> ATA-Hitachi HDS72101-A3EA-931.51GB
          /pci@0,0/pci1458,b002@11/disk@1,0
       2. <em>c0t2d0</em> ATA-Hitachi HDS72101-A3EA-931.51GB
          /pci@0,0/pci1458,b002@11/disk@2,0
       3. <em>c0t3d0</em> ATA-Hitachi HDS72101-A3EA-931.51GB
          /pci@0,0/pci1458,b002@11/disk@3,0
       4. <em>c0t4d0</em> ATA-Hitachi HDS72101-A39C-931.51GB
          /pci@0,0/pci1458,b002@11/disk@4,0
       5. <em>c0t5d0</em> ATA-Hitachi HDS72101-A3EA-931.51GB
          /pci@0,0/pci1458,b002@11/disk@5,0
       6. <em>c2d0</em> DEFAULT cyl 19454 alt 2 hd 255 sec 63
          /pci@0,0/pci-ide@14,1/ide@0/cmdk@0,0
       7. <em>c3t0d0</em> ATA-WDC WD10EADS-65L-1A01-931.51GB
          /pci@0,0/pci1002,5978@2/pci1000,3140@0/sd@0,0
       8. <em>c3t1d0</em> ATA-WDC WD10EADS-65L-1A01-931.51GB
          /pci@0,0/pci1002,5978@2/pci1000,3140@0/sd@1,0
       9. <em>c3t2d0</em> ATA-WDC WD10EADS-65L-1A01-931.51GB
          /pci@0,0/pci1002,5978@2/pci1000,3140@0/sd@2,0
      10. <em>c3t3d0</em> ATA-WDC WD10EADS-00L-1A01-931.51GB
          /pci@0,0/pci1002,5978@2/pci1000,3140@0/sd@3,0
Specify disk (enter its number): </pre>
<p>Now simply note your drive names and put them into the script &#8211; done! At least, make the script accessable:</p>
<pre class="brush:plain">chmod a+x hddtemp.sh</pre>
<p>Running this could give you an output like this:</p>
<pre class="brush:plain">root@karinka:~# ./hddtemp.sh
Drive c2d0 temp is
Drive c0t0d0 temp is
Drive c0t1d0 temp is
Drive c0t2d0 temp is
Drive c0t3d0 temp is
Drive c0t4d0 temp is
Drive c0t5d0 temp is
Drive c3t0d0 temp is 27C
Drive c3t1d0 temp is 26C
Drive c3t2d0 temp is 26C
Drive c3t3d0 temp is 26C</pre>
<p>If you don&#8217;t have temperatures for some HDs check if you typed the HD names correctly and check if your mainboard has SMART enabled. Without that, you won&#8217;t get any results. In my case &#8211; SMART only works for the 4 drives connected to my LSI SAS controller, because I forgot to enable it for the onboard controllers.</p>
<p>PS. If you&#8217;re wondering why I write something about Nexenta, even if I wrote that my Debian SW RAID5 works fine in my last post, well &#8211; it was because I found some corrupt files a few days ago and want to avoid having them in future. On private data I would say: doesn&#8217;t matter that much (ok noone wants broken photos <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), but especially with my company data, I&#8217;m very careful. Still &#8211; Nexenta is based on Debian which makes it easy for me to use it. I also tried FreeBSD 8.1, ZFSguru, OpenIndiana and Solaris 11 Express in VMs for some days, but in the end, Nexenta is the distribution with the best read/write performance and best to handle. I know it&#8217;s based on &#8220;hardy-unstable&#8221;, Nexenta Core 3.0.1 itself is STABLE. Don&#8217;t ask me why. The ZFS &#8211; which is the main part of the filer is the same as in OpenSolaris. 4 more drives will be used starting today: 4x 1.5TB which drives to storage to 16TB + 160GB for the system on a seperate drive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/01/06/nexenta-and-hdd-temperatures/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fileserver &amp; backups</title>
		<link>http://www.klein2.de/2011/01/02/fileserver-backups/</link>
		<comments>http://www.klein2.de/2011/01/02/fileserver-backups/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 20:51:28 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[afp]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fileserver]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[openindiana]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[zfs]]></category>
		<category><![CDATA[zpool]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1523</guid>
		<description><![CDATA[It&#8217;s a few weeks since reported about fileservers the last time. For a long time, I have used my Mac mini (2007) with 2 connected Onnto DataTales. This was easy to handle, but was not very performant. This particular Mac mini has no FireWire 800 ports, just a FireWire 400 and a bunch of USB2&#8242;s. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a few weeks since reported about fileservers the last time. For a long time, I have used my Mac mini (2007) with 2 connected Onnto DataTales. <span id="more-1523"></span>This was easy to handle, but was not very performant. This particular Mac mini has no FireWire 800 ports, just a FireWire 400 and a bunch of USB2&#8242;s. You can imagine that grabbing data, even via GBit ethernet was not very fast, but that was mostly ok.</p>
<p>What made me nuts was performing backups. I use my rsync script I&#8217;ve shown earlier. Doing backups from one DataTale to another one was as slow as 5MB/s. Imagine that a 3TB backup takes a bit too long.</p>
<p>A solution must be found. Stripping down the data I want to backup to only company data, photos &#038; documents helps, &#8220;just&#8221; 750GB instead 3TB. The rest is replaceable &#8211; mostly our DVD collection that I&#8217;m ripping to make it available to the media boxes / Mac minis around the house from a central place.</p>
<p>Now you may think: Why don&#8217;t simply get a RAID1 external device and connect it to a Mac Mini? This would be a half solution, yes, but I also want my other data in a secure way.</p>
<p>In the past I was using OpenSolaris for a bunch of tests, but never used it for a long time. The reason is that I&#8217;m not a UNIX administrator and don&#8217;t have too much clue of it. Additionally, Oracle has bought Sun and stopped OpenSolaris and now starts selling Solaris 11 Express for a fancy price of &#8220;just&#8221; 1.000$ per year. *lol* Well, on the one hand, as mentioned before, it&#8217;s not my OS and on the other hand, that would be a bit too expensive for SoHo usage <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I admit, I really think that ZFS is the way best filesystem and RAID management you can get for a server, so I tried Nexenta a few weeks ago, but had a lot trouble with my Onnto boxes via eSATA. In the end, the fact that Nexenta Core 3.0.1 is based on an unstable Ubuntu version (hardy-unstable), while Ubuntu itself is based on Debian-testing/unstable, was a bit too much &#8220;testing&#8221; for my taste.</p>
<p>Another OS that I installed and played with was OpenIndiana, the free successor of OpenSolaris. It&#8217;s currently available as a developer preview (b148). I installed it and while the setup itself looked a bit buggy and I finally was able to login, I first couldn&#8217;t find an option to set my dynamic assigned local IP to a static one. I looked on Google for more than half an hour, but maybe I&#8217;m a bit blind &#8211; didn&#8217;t found a solution. Most keys are not assigned so when hitting &#8220;Pic up&#8221; returns in some strange characters on the screen. Even in an editor like nano &#8211; very annoying. But they say: not for production use, so that&#8217;s fine and also this is not my flavor of an OS, but I gave it a short run.</p>
<p>There were just 2 ZFS distributions left that I would eventually gonna use: FreeNAS and FreeBSD.</p>
<p>While FreeNAS is pretty old and the ZFS version is from the mid-age, FreeBSD also comes with a pretty old ZFS version. v14 in FreeBSD 8.1 and v15 in the not yet released FreeBSD 8.2. There&#8217;s a LiveCD from sub.mesa (recent writer and fighter for ZFS in the Harforum <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). I haven&#8217;t tested one of them, because the only OS in this area I know a bit more is Debian. Too bad Nexenta is unstable, it&#8217;s Debian &#8211; in some way.</p>
<p>So I ended up after 4h&#8217;s of playing around with a fresh installation of Debian 5.0.7 on the server. Luckily I haven&#8217;t touched the software RAID harddisks inside (6x Hitachi 24/7 drives á 1TB), just installed the systems on the 160GB IDE WD HD, so it was pretty easy to import the software RAID5 with mdadm. Yeah &#8211; I know, software RAID, if it&#8217;s not ZFS has it issues and yes, I would love to use ZFS, but there&#8217;s a line I don&#8217;t want to cross anymore &#8211; I simply want a stable system that works.</p>
<p>Setting up all services was quickly done, netatalk (AFP) and samba (SMB/CIFS) was installed and configured within a few minutes.</p>
<p>But there&#8217;s one thing that I don&#8217;t like about this setup and to be honest, I think that&#8217;s more an issue that you can&#8217;t fix. If I open up a directory with some more folders inside (in this case our photo directory with 162 folders), it takes ages until Finder runs smooth. But even worse, if you don&#8217;t wait, you can easily crash Finder. This is a bit disappointing. In my mind the only option to make this a bit quicker and more responsive is to turn off the file preview (photos, videos).</p>
<p>For a good performance, I tried AFP and SMB and copied huge single files. Of course, a folder with a lot small files which are together of the same size are way slower.</p>
<p>For the following tests, I&#8217;ve copied files from the software RAID5 to my internal WD Caviar Black HD in my Mac Pro via GBit ethernet.</p>
<p>Copying files from the software RAID5<br />
AFP: 102MB/s peak, ~98-100MB/s average<br />
SMB: 50MB/s peak, 30-35MB/s average</p>
<p>Writing files to the software RAID5<br />
AFP: 102MB/s peak, ~80MB/s average<br />
SMB: 60MB/s peak, ~20-25MB/s average</p>
<p>By the way: deleting a folder or a big file freezes the Finder window until the job is done &#8211; also a bad thing. Honestly, I don&#8217;t remember OS X Server AFPs or OS X Client share behave like this.</p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/01/Bildschirmfoto-2011-01-02-um-21.47.47.png" alt="" title="Bildschirmfoto 2011-01-02 um 21.47.47" width="500" height="363" class="aligncenter size-full wp-image-1524" /></p>
<p>Comments and ideas are welcome as always (spam not <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/01/02/fileserver-backups/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/01/Bildschirmfoto-2011-01-02-um-21.47.47-150x150.png" length="12400" type="image/jpg" />	</item>
	</channel>
</rss>

