<?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; debian</title>
	<atom:link href="http://www.klein2.de/tag/debian/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>↔ The Gateway Project &#8211; Hardware + a secret</title>
		<link>http://www.klein2.de/2012/01/02/the-gateway-project-hardware-a-secret/</link>
		<comments>http://www.klein2.de/2012/01/02/the-gateway-project-hardware-a-secret/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 13:23:05 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[cf card]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[futro]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[weather station]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2649</guid>
		<description><![CDATA[While moving all the eMail from one server to the other (my old server will be shut down by January 22nd &#8211; but this site is already on the new one), I received a package via UPS. Inside: 2x PCI-X Dual Port Intel cards. Yeah &#8211; PCI-X. I don&#8217;t have any PCI-X ports in one [...]]]></description>
			<content:encoded><![CDATA[<p>While moving all the eMail from one server to the other (my old server will be shut down by January 22nd &#8211; <a href="http://www.klein2.de/2011/12/29/blog-moved/">but this site is already on the new one</a>), I received a package via UPS. Inside: 2x PCI-X Dual Port Intel cards. Yeah &#8211; PCI-X. I don&#8217;t have any PCI-X ports in one of my systems, but I was told it will work fine in a standard 3.3V PCI port <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <span id="more-2649"></span></p>
<p>So I opened up the gateway box and installed it. To be honest, I never thought it would fit &#8211; I had bought the cards for the fileserver (one + 1 spare), but was too curious if it would work in the small gateway. As you can see on the following photos, it fits &#8211; and Debian lists the card as 2x Intel 82546EB ethernet ports (lspic &#038; ifconfig assigned it to eth1 &#038; eth2 (eth0 is the onboard NIC).</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2012/01/gw1-1280.jpg" alt="" title="gw1-1280" width="100%" class="aligncenter size-full wp-image-2665" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2012/01/gw2-1280.jpg" alt="" title="gw2-1280" width="100%" class="aligncenter size-full wp-image-2667" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2012/01/gw3-1280.jpg" alt="" title="gw3-1280" width="100%" class="aligncenter size-full wp-image-2668" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2012/01/gw4-1280.jpg" alt="" title="gw4-1280" width="100%" class="aligncenter size-full wp-image-2669" /></div>
</div>
<p>I got a second Fujitsu-Siemens Futro! Yeah! For just 20€ <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This one received the new 4GB CF card <a href="http://www.klein2.de/2011/12/23/bought-storage-for-the-gateway-ad-the-esxi-server/">I bought last week</a> and it will run Debian, too. This box will be awesome! While the first one will run as gateway in the house, this cutie will be put into the shelter. </p>
<p>&#8220;Why?&#8221; I see you asking. From the family, I&#8217;ve got a bit Xmas money and instead of buy expensive stuff (like lovely Animé figures (oh it&#8217;s hard to resist &#8211; believe me)), I decided to get what I&#8217;ve written on every single wish list for the last (at least) 5 years. <a href="http://upload.wetter.com/wxnet/images/profile/2537-pr_ws_img.jpg">A weather station!</a> But not a display that you put and your desk and you&#8217;re done. No! This one will have own instruments. I&#8217;ve chosen the WH 1080, because it has <a href="http://www.sjcnet.id.au/computers/weather-station-data-logger">great Linux support</a>. I will use it the same way I use the internal sensors (shown in a blog post some weeks ago), a little perl script will grab the data from the sensors and print it into file(s). rrdtool and a cronjob will create graphs from this source. I can&#8217;t await to get my hands on this <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>However &#8211; here are 2 more photos from the &#8220;dream team&#8221;.</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2012/01/gw5-1280.jpg" alt="" title="gw5-1280" width="100%" class="aligncenter size-full wp-image-2670" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2012/01/gw6-1280.jpg" alt="" title="gw6-1280" width="100%" class="aligncenter size-full wp-image-2671" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2012/01/gw7-1280.jpg" alt="" title="gw7-1280" width="100%" class="aligncenter size-full wp-image-2672" /></div>
</div>
<p><a href="http://www.flickr.com/photos/37773250@N02/sets/72157628681020125/">All photos are available in HiRes at flickr.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2012/01/02/the-gateway-project-hardware-a-secret/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2012/01/gw7-150x150.jpg" length="6497" type="image/jpg" />	</item>
		<item>
		<title>Benchmarks of the ESXi construction</title>
		<link>http://www.klein2.de/2011/12/28/benchmarks-of-the-esxi-construction/</link>
		<comments>http://www.klein2.de/2011/12/28/benchmarks-of-the-esxi-construction/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 16:44:28 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2610</guid>
		<description><![CDATA[Theory is great, but if it works as planned &#8211; that is great stuff Here are some screenshots and a video of a benchmark. I&#8217;ve successfully installed my Debian Fileserver with the following steps: - Created the first &#8211; RAID6: 6x 1.5TB /dev/md0 - Created the second &#8211; RAID6: 6x 1TB /dev/md1 - Created the [...]]]></description>
			<content:encoded><![CDATA[<p>Theory is great, but if it works as planned &#8211; that is great stuff <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here are some screenshots and a video of a benchmark. <span id="more-2610"></span></p>
<p>I&#8217;ve successfully installed my Debian Fileserver with the following steps:<br />
- Created the first &#8211; RAID6: 6x 1.5TB /dev/md0<br />
- Created the second &#8211; RAID6: 6x 1TB /dev/md1<br />
- Created the third &#8211; RAID5: 3x 640GB /dev/md2 (Time Machines)<br />
- Installed lvm2 and created a LVM volume from /dev/md0 &#038; /dev/md1</p>
<pre class="brush:bash">/dev/mapper/LVM-LVM     10T    23G    10T   1% /storage
/dev/md2               1,3T   5,3M   1,3T   1% /timemachines</pre>
<p>- Mounted the LVM into /storage<br />
- Mounted /dev/md2 into /timemachines<br />
- Put both into the /etc/fstab<br />
- Installed NFS-kernel-server<br />
- Created the directory /storage/esxi<br />
- Gave the rights nobody:nogroup to this directory<br />
- Shared it via exports -a<br />
- Connected the NFS volume to ESXi</p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/12/esxi-nfs-mount.png" alt="" title="esxi-nfs-mount" width="640" height="389" class="aligncenter size-full wp-image-2612" /></p>
<p>- Upload the Windows Server 2008 R2 EN ISO into the DataStore A (2.5&#8243; 160GB)<br />
- Installed Windows Server 2008 R2 EN on the NFS share<br />
- Updated the Win Server<br />
- Run benchmark (see video below)</p>
<div class="aussen">
<div class="innen"><iframe src="http://player.vimeo.com/video/34291315?title=0&amp;byline=0&amp;portrait=0" width="640" height="280" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>
</div>
<p>Here is a benchmarks done with dd on the Fileserver with no running VMs:</p>
<pre class="brush:bash">root@risu:/storage# time dd if=/dev/zero of=/storage/bench bs=1024 count=10000000
10000000+0 Datensätze ein
10000000+0 Datensätze aus
10240000000 Bytes (10 GB) kopiert, 88,0244 s, 116 MB/s

real	1m28.090s
user	0m0.616s
sys	0m9.841s</pre>
<p>What confuses me; why do I reach higher speed over the 10Gbps VMXNET 3 network to the VM than locally? Does that make sense to anyone? <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/12/28/benchmarks-of-the-esxi-construction/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/12/esxi-nfs-mount-150x150.png" length="12558" type="image/jpg" />	</item>
		<item>
		<title>Anatomy of my ESXi Server</title>
		<link>http://www.klein2.de/2011/12/28/anatomy-of-my-esxi-server/</link>
		<comments>http://www.klein2.de/2011/12/28/anatomy-of-my-esxi-server/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 10:19:49 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[mdadm]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2597</guid>
		<description><![CDATA[Building that kind of ESXi server I did is a bit hard to explain. So, while waiting for my mdadm to finish the last RAID in the Debian VM, which will become the main storage, I started to create an overview of how the server works. Here&#8217;s the result: Please click the image to open [...]]]></description>
			<content:encoded><![CDATA[<p>Building that kind of ESXi server I did is a bit hard to explain. So, while waiting for my mdadm to finish the last RAID in the Debian VM, which will become the main storage, I started to create an overview of how the server works. Here&#8217;s the result: <span id="more-2597"></span></p>
<p><a href="http://dkle.in/93" target="_blank"><img src="http://www.klein2.de/wp-content/uploads/2011/12/esxi_blog.png" alt="" title="Anatomy of my ESXi Server" width="640" height="700" class="aligncenter size-full wp-image-2598" /></a></p>
<div align="center">Please click the image to open a higher resolution in a new window/tab.</div>
<p>I dropped ZFS (again), because in a bunch of tests, I had some issues with SMB for example and also with NFS shares. I need to get this &#8220;pig to fly&#8221; &#8211; so I stopped digging around and decided to use the technology that worked very well for me in the last few months: mdadm.</p>
<p>The fileserver is half-virtualized. It is known that you should NOT virtualize a fileserver. I fully agree! I just virtualize the underlaying Debian, the rest is on &#8220;PCI passthrough&#8221;. This great technology allows me to pop the HDs &#038; the cards out of the box in case of an emergency (or boot from a Debian CD/Stick or HD) and access all the data. The mdadm works with the REAL hard drives. In this layer, nothing is virtualized anymore. That&#8217;s in my mind the only way to use a fileserver on ESXi. The idea is based on the ZFS/ESXi All-In-One box I mentioned in a previous post.</p>
<p>However, the hard disks are connected to the HP SAS Expander, which is connected to the Intel SASUC8i (a LSI 1068 chip controller with LSI &#8220;IT&#8221; firmware). I use a single SFF-8087 cable for that. This draws the connection speed to SATA150, but you don&#8217;t recognize that. Why? The RAID combines the speed <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I think I loose a max. of 5%.</p>
<p>The LSI controller is &#8220;passed through&#8221; to the Debian VM which lists the HDs as if they were connected to a regular OS.</p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/12/lsi-esxi-pt.png" alt="" title="lsi-esxi-pt" width="640" height="222" class="aligncenter size-full wp-image-2602" /></p>
<p>Inside Debian:</p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/12/deb1.png" alt="" title="deb1" width="640" height="402" class="aligncenter size-full wp-image-2606" /></p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/12/deb2.png" alt="" title="deb2" width="640" height="402" class="aligncenter size-full wp-image-2605" /></p>
<p>I will install NFS server on the Debian VM. VMware tools are already installed, enabling the 10Gbps VMXNET 3 driver. ESXi will mount the NFS share where all the other will be placed on. And that is what I will do now <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>More on this &#8211; soon!</p>
<p>PS. The backup server is now also running Debian &#8211; because of the previously mentioned issues with OpenIndiana/SMB &#038; NFS.</p>
<p>Read more on <a href="http://www.klein2.de/2011/12/28/benchmarks-of-the-esxi-construction/" title="Benchmarks of the ESXi contruction">Benchmarks of the ESXi contruction</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/12/28/anatomy-of-my-esxi-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/12/esxi_blog-150x150.png" length="22690" type="image/jpg" />	</item>
		<item>
		<title>The Gateway Project &#8211; Theory</title>
		<link>http://www.klein2.de/2011/12/16/the-gateway-project-theory/</link>
		<comments>http://www.klein2.de/2011/12/16/the-gateway-project-theory/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 10:02:40 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2568</guid>
		<description><![CDATA[The Gateway Project is about a little box from Fujitsu, called &#8220;Futro&#8221; (S220). It just uses 15W and with that low power usage it is a great device for creating a gateway to the home network. This post is about the theory of SSH tunnels and why I use them instead of VPN. Above you [...]]]></description>
			<content:encoded><![CDATA[<p>The Gateway Project is about a little box from Fujitsu, called &#8220;Futro&#8221; (S220). It just uses 15W and with that low power usage it is a great device for creating a gateway to the home network. This post is about the theory of SSH tunnels and why I use them instead of VPN. <span id="more-2568"></span></p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/12/sshtunnel.png" alt="" title="sshtunnel" width="640" height="613" class="aligncenter size-full wp-image-2569" /></p>
<p>Above you can see an overview how the gateway works. On the bottom, you see the foreign office/workstation/café &#8211; whatever. Let&#8217;s say they only allow you to connect to the ports 80 (http) &#038; 443 (https), which is very common. This hinders you from connecting to a particular port &#8211; for example 5901 if you run a VNC server at home and want to surf on that machine instead of surfing on the proxy-servers of your employee. Sure, you can now go on and assign port 443 to the vnc server (5901) and you&#8217;re done. But I want to access more than 1 machine at home. For example: check the webcam from time to time and don&#8217;t want to put it on the internet. Makes sense, no? <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is the moment where the gateway joins the game. This little low-power device runs Linux or UNIX (in my case, until today it was running Debian, but I consider using OpenBSD in the future &#8211; but more on this in the post about the practice). The gateway listens on port 22 (SSH). Now, on the router, you have to assign port 80 or 443 to the gateway &#8211; port-forwarding as it&#8217;s called. I would recommend to use a static IP or a dynamic IP from DynDNS or so and use a CNAME in the dynamic case or an A host if you have a static address. Of course, you can simply use the static IP, but who can remind of public IP&#8217;s?</p>
<p>All you need to do is to connect to the gateway via SSH. I used putty on the workstation (Windows machine at the Academy) for tests. Putty is very good in tunneling &#8211; I will show you how to configure it in the next post.</p>
<p>Once the tunnel is set up, you can start using it. Let&#8217;s say you want to access your vnc server. Create a tunnel and point it to the IP:5901, locally assign port 5901 or 81 or whatever you like. Open your vnc client and access the vnc server on the address 127.0.0.1:5901 (or 127.0.0.1:81). This will work! No worries, you don&#8217;t need to look for ports, because you JUST use the local network (that is why you use the localhost address of 127.0.0.1).</p>
<p>I use the feature to access my main server at home via ssh tunnel without the need to run it 24/7. In this case, your motherboard has to have an dedicated IPMI port which allows you to access the local website and turn it on/reset the system etc pp.. This is luxurious, but of course you can also use WOL from your gateway to wake up your clients.</p>
<p>Some may think &#8220;why not use VPN?&#8221;<br />
VPN does not allow you to share the local network (in your office or wherever you are) with the home network. Instead, it will tunnel EVERYTHING over the internet to your home. Bad for Intranet access <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Stay tuned for the next post of &#8220;The Gateway Project&#8221; when I will write about the details of the hard- &#038; software I use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/12/16/the-gateway-project-theory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/12/sshtunnel-150x150.png" length="23918" type="image/jpg" />	</item>
		<item>
		<title>Screencast: How to create a graph with rrdtool &amp; shell scripts</title>
		<link>http://www.klein2.de/2011/11/01/screencast-how-to-create-a-graph-with-rrdtool-shell-scripts/</link>
		<comments>http://www.klein2.de/2011/11/01/screencast-how-to-create-a-graph-with-rrdtool-shell-scripts/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 20:08:13 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2483</guid>
		<description><![CDATA[This video shows how to create a graph with rrdtool, shell scripts &#038; 2 cron jobs. Vimeo (great quality) YouTube (not so nice quality) QuickTime (great quality) Sources of the files shown in the video. load/createdb.sh #!/bin/bash STEP=300 rrdtool create load.rrd --step $STEP \ DS:load:GAUGE:600:0:U \ RRA:AVERAGE:0.5:1:2160 \ RRA:AVERAGE:0.5:5:2016 \ RRA:AVERAGE:0.5:15:2880 \ RRA:AVERAGE:0.5:60:8760 load/load.sh #!/bin/bash [...]]]></description>
			<content:encoded><![CDATA[<p>This video shows how to create a graph with rrdtool, shell scripts &#038; 2 cron jobs. <span id="more-2483"></span></p>
<h2>Vimeo (great quality)</h2>
<div class="aussen">
<div class="innen"><iframe src="http://player.vimeo.com/video/31448355?title=0&amp;byline=0&amp;portrait=0" width="640" height="480" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></div>
</div>
<h2>YouTube (not so nice quality)</h2>
<div class="aussen">
<div class="innen"><iframe width="640" height="480" src="http://www.youtube.com/embed/4lSrv7E3Tu4" frameborder="0" allowfullscreen></iframe></div>
</div>
<h2>QuickTime (great quality)</h2>
<div class="aussen">
<div class="innen"><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="490" width="640"><param name="src" value="http://www.klein2.de/wp-content/uploads/2011/11/rrdtool.mov"><param name="autoplay" value="false"><param name="type" value="video/quicktime" height="490" width="640"><embed src="http://www.klein2.de/wp-content/uploads/2011/11/rrdtool.mov" height="496" width="640" autoplay="false" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></p>
<p></object></div>
</div>
<p>Sources of the files shown in the video.</p>
<h2>load/createdb.sh</h2>
<pre class="brush:bash">#!/bin/bash
STEP=300

rrdtool create load.rrd --step $STEP \
DS:load:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760</pre>
<h2>load/load.sh</h2>
<pre class="brush:bash">#!/bin/bash
load=`cat /proc/loadavg | awk -F' '  '{print $1}'`
/usr/bin/rrdtool update /srv/www/statistik/load/load.rrd N:$load</pre>
<h2>create_load.sh</h2>
<pre class="brush:bash">nice -n 19 /usr/bin/rrdtool graph /srv/www/statistik/load/loadg.png -a PNG -b 1024 --start -126900 \
-l 0 -u 10 -t "Load" --vertical-label "Current load" -w 600 -h 300 \
--color BACK#1e1816 --color FONT#ffffff --color CANVAS#1e1816 --color GRID#4E403C --color MGRID#4e403c --color FRAME#EEEEEE --color ARROW#4E403C \
--border 0  --grid-dash 1:0 --dynamic-labels --x-grid HOUR:8:DAY:1:DAY:1:43200:%A \
DEF:g1=/srv/www/statistik/load/load.rrd:load:AVERAGE \
LINE2:g1#ff3d00:"Load" \</pre>
<h2>/etc/crontab (last 2 lines)</h2>
<pre class="brush:bash">*/2 * * * *	root	/srv/www/statistik/load/load.sh
*/2 * * * *	root	/srv/www/statistik/create_load.sh 1>/dev/null</pre>
<p>If you are wondering why the load is that high; it&#8217;s a QuadCore Xeon processor with HyperThreading &#8211; 4 threads are 24/7 crunching <a href="http://setiathome.berkeley.edu">SETI@home</a> files <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Graph after several hours</h2>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/11/loadg1.jpg" alt="" title="loadg" width="640" height="300" class="aligncenter size-full wp-image-2500" /></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/11/01/screencast-how-to-create-a-graph-with-rrdtool-shell-scripts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://www.klein2.de/wp-content/uploads/2011/11/rrdtool.mov" length="45924542" type="video/quicktime" />
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/11/loadg-150x150.jpg" length="3775" type="image/jpg" />	</item>
		<item>
		<title>Stats of the basement room &amp; server</title>
		<link>http://www.klein2.de/2011/10/25/stats-of-the-basement-room-server/</link>
		<comments>http://www.klein2.de/2011/10/25/stats-of-the-basement-room-server/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 20:03:36 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hddtemp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sensor]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[temperture]]></category>
		<category><![CDATA[ups]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2456</guid>
		<description><![CDATA[When I look back, I always wanted to use a computer to control something that is a bit non-IT. I was always amazed seeing people soldering something together and get data from stuff like sensors or so. As mentioned before, I&#8217;m currently in an educational course to receive the LPIC-1 certificate (I already passed the [...]]]></description>
			<content:encoded><![CDATA[<p>When I look back, I always wanted to use a computer to control something that is a bit non-IT. I was always amazed seeing people soldering something together and get data from stuff like sensors or so. <span id="more-2456"></span> As mentioned before, I&#8217;m currently in an educational course to receive the LPIC-1 certificate (I already passed the 101 exam last Friday &#8211; yay!). The guy next to me is one of those guys who does this stuff and in the breaks, he described and explained in a very well manner who this works. He has lend me a dual-thermal-sensor to play with that one. It&#8217;s a 9 pin COM-plug which includes a few diodes and resistances. The cable is then connected to two thermal-sensors on long (sleeved cables). Meanwhile I got the needed material on my own to build it, but I will wait until the 102 exam is done before I create my very own one.</p>
<p>Check <a href="http://lena.franken.de/hardware/temperaturmessung.html">this site</a> to see how this stuff looks like (German) <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>My server runs Linux, Debian Squeeze to be precisely. The tool of choice is called &#8220;digitemp&#8221; and is available in the standard repos in Debian. From <a href="http://www.arbeitsplatzvernichtung-durch-outsourcing.de/marty44/rrdtool.html">this site</a> and the mates help in the breaks, I&#8217;ve learned how to setup <a href="http://oss.oetiker.ch/rrdtool/">rrdtool</a>, a very nice data-to-graphic tool that is also used in famous software like <a href="http://munin-monitoring.org/">munin</a> or <a href="http://www.ipcop.org/">IPCop</a>.</p>
<p><strong></strong><br />
</p>
<h2>Basement room temperature</h2>
<p>The first graphic I&#8217;ve created is one to track the temperatures in the basement room. It&#8217;s kinda cold there, so I wanted to keep an eye on the temperature changes with regards to the hardware. Especially the HDs in the server (and there are 18 of them built into Risu (リス)) were a bit too cold at ~15°C. So I started to log the temperatures into a log file. One of the pros of the Linux course is that you really learn how to use the GNU tools and get everything you want from an output using a pervert long string of commands and pipes <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Here&#8217;s a screenshot of the shell script that runs every 2 minutes on the server and does two things:<br />
1st: It writes the captured temperature to the rrdtool database<br />
2nd: It writes the captured temperature to a log file</p>
<pre class="brush:bash">#!/bin/bash
RAUM=`/usr/bin/digitemp -t0 -q -c/srv/www/statistik/raumtemperatur/.digitemprc | tr -s [:blank:] | cut -f7 -d" "`
/usr/bin/rrdtool update /srv/www/statistik/raumtemperatur/raumtemperatur.rrd N:$RAUM

# Ausgabe in /var/log/raumtemp.log
datum=$(date +"%F\t%T")
echo -e $datum"\t"$RAUM"°C" >> /var/log/raumtemp.log</pre>
<p>The cronjob is pretty simple:</p>
<pre class="brush:bash">*/2 * * * *	root	/srv/www/statistik/raumtemperatur/raumtemperatur.sh</pre>
<p>A second shell script reads the data from the database file and creates a PNG graphic from it.</p>
<p>cronjob:</p>
<pre class="brush:bash">*/2 * * * *	root	/srv/www/statistik/erzeugepng.sh</pre>
<p>shell script:</p>
<pre class="brush:bash">nice -n 19 /usr/bin/rrdtool graph /srv/www/statistik/raumtemperatur/raumtemperaturg.png -a PNG -b 1024 --start -206900 -A \
-l 10 -u 24 -t "Raumtemperatur" --vertical-label "Grad Celsius" -w 700 -h 500 \
DEF:g1=/srv/www/statistik/raumtemperatur/raumtemperatur.rrd:raum:AVERAGE \
DEF:gmin=/srv/www/statistik/raumtemperatur/raumtemperatur.rrd:raum:MIN \
DEF:gmax=/srv/www/statistik/raumtemperatur/raumtemperatur.rrd:raum:MAX \
VDEF:g1a=g1,LAST \
VDEF:gmina=gmin,MINIMUM \
VDEF:gmaxa=gmax,MAXIMUM \
LINE2:g1#ff0000:"Raumtemperatur" \
GPRINT:g1a:"aktuell\: %5.2lf °C"</pre>
<p>This looks a bit more complicated, right? Well, I will not explain how it works, because I guess <a href="http://oss.oetiker.ch/rrdtool/">this job is already done from the creator of rrdtool</a> in a much better way <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The result looks very nice (I have to mention that the step should better be 300 seconds instead the 60 I used here, this will eliminate the free spaces between the dots &#8211; but I need to rebuild the database for this).</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/10/raumtemperaturg.jpg" alt="" title="raumtemperaturg" width="640" height="460" class="aligncenter size-full wp-image-2459" /></div>
</div>
<p><strong></strong><br />
</p>
<h2>HD temperatures</h2>
<p>The next issue, that I have already mentioned above are the HD temperatures. I&#8217;ve attached a fan-control unit to the 3 fans blowing in air onto the HDs and since that day, the temperatures are a lot better. But a bit paranoid as I am, I wanted to have an eye on this, too. Grabbing those temperatures is pretty easy, thanks to <a href="http://savannah.nongnu.org/projects/hddtemp">hddtemp</a> and my micro-script temp.</p>
<p>temp.sh (placed in /usr/sbin, so it will run for root users with a simple &#8220;temp&#8221; command)</p>
<pre class="brush:bash">#!/bin/bash
hddtemp /dev/sd[a-zz]</pre>
<p>It simply calls hddtemp and captures the HDs from a to zz (in case I any day have more than a-z HDs in this server). Now all I had to do it crop the output and model it from&#8230;</p>
<pre class="brush:bash">/dev/sda: WDC WD6400AAKS-00A7B2: 30°C
/dev/sdb: WDC WD6400AAKS-00A7B2: 30°C
/dev/sdc: SAMSUNG HD155UI: 24°C
/dev/sdd: SAMSUNG HD155UI: 24°C
/dev/sde: SAMSUNG HD154UI: 21°C
/dev/sdf: SAMSUNG HD154UI: 20°C
/dev/sdg: Hitachi HDS721010CLA332: 25°C
/dev/sdh: Hitachi HDS721010CLA332: 25°C
/dev/sdi: Hitachi HDS722020ALA330: 30°C
/dev/sdj: SAMSUNG HD154UI: 21°C
/dev/sdk: WDC WD10EADS-00M2B0: 24°C
/dev/sdl: Hitachi HDS721010CLA332: 25°C
/dev/sdm: Hitachi HDS721010CLA332: 25°C
/dev/sdn: Hitachi HDS721010CLA332: 26°C
/dev/sdo: Hitachi HDS721010CLA332: 26°C
/dev/sdp: WDC WD10EADS-65L5B1: 25°C
/dev/sdq: WDC WD10EADS-65L5B1: 25°C
/dev/sdr: WDC WD10EADS-00L5B1: 25°C</pre>
<p>to this&#8230;</p>
<pre class="brush:bash">30:30:23:24:21:20:25:25:30:21:24:25:25:26:26:25:25:25</pre>
<p>With a bit console &#8220;magic&#8221; (known as awk), it was done in a few minutes (the much N&#8217;s were a bit confusing):</p>
<pre class="brush:bash">#!/bin/bash
hddtemps=`/usr/sbin/temp | awk -F' ' '{print $4}' | sed "s/°C//g" | sed -e "N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;s/\n/:/g"`
/usr/bin/rrdtool update /srv/www/statistik/hddtemps/hddtemps.rrd N:$hddtemps</pre>
<p>Voilá! This was the trick to get the data into the seconds rrdtool database on my system. The graph generator shell script is a bit longer.</p>
<pre class="brush:bash">nice -n 19 /usr/bin/rrdtool graph /srv/www/statistik/hddtemps/hddtempsg.png -a PNG -b 1024 --start -126900 -A \
-l 20 -u 40 -t "Festplattentemperaturen" --vertical-label "Grad Celsius" -w 700 -h 500 \
DEF:g1=/srv/www/statistik/hddtemps/hddtemps.rrd:hd1:AVERAGE \
DEF:g2=/srv/www/statistik/hddtemps/hddtemps.rrd:hd2:AVERAGE \
DEF:g3=/srv/www/statistik/hddtemps/hddtemps.rrd:hd3:AVERAGE \
DEF:g4=/srv/www/statistik/hddtemps/hddtemps.rrd:hd4:AVERAGE \
DEF:g5=/srv/www/statistik/hddtemps/hddtemps.rrd:hd5:AVERAGE \
DEF:g6=/srv/www/statistik/hddtemps/hddtemps.rrd:hd6:AVERAGE \
DEF:g7=/srv/www/statistik/hddtemps/hddtemps.rrd:hd7:AVERAGE \
DEF:g8=/srv/www/statistik/hddtemps/hddtemps.rrd:hd8:AVERAGE \
DEF:g9=/srv/www/statistik/hddtemps/hddtemps.rrd:hd9:AVERAGE \
DEF:g10=/srv/www/statistik/hddtemps/hddtemps.rrd:hd10:AVERAGE \
DEF:g11=/srv/www/statistik/hddtemps/hddtemps.rrd:hd11:AVERAGE \
DEF:g12=/srv/www/statistik/hddtemps/hddtemps.rrd:hd12:AVERAGE \
DEF:g13=/srv/www/statistik/hddtemps/hddtemps.rrd:hd13:AVERAGE \
DEF:g14=/srv/www/statistik/hddtemps/hddtemps.rrd:hd14:AVERAGE \
DEF:g15=/srv/www/statistik/hddtemps/hddtemps.rrd:hd15:AVERAGE \
DEF:g16=/srv/www/statistik/hddtemps/hddtemps.rrd:hd16:AVERAGE \
DEF:g17=/srv/www/statistik/hddtemps/hddtemps.rrd:hd17:AVERAGE \
DEF:g18=/srv/www/statistik/hddtemps/hddtemps.rrd:hd18:AVERAGE \
VDEF:g1a=g1,LAST \
VDEF:g2a=g2,LAST \
VDEF:g3a=g3,LAST \
VDEF:g4a=g4,LAST \
VDEF:g5a=g5,LAST \
VDEF:g6a=g6,LAST \
VDEF:g7a=g7,LAST \
VDEF:g8a=g8,LAST \
VDEF:g9a=g9,LAST \
VDEF:g10a=g10,LAST \
VDEF:g11a=g11,LAST \
VDEF:g12a=g12,LAST \
VDEF:g13a=g13,LAST \
VDEF:g14a=g14,LAST \
VDEF:g15a=g15,LAST \
VDEF:g16a=g16,LAST \
VDEF:g17a=g17,LAST \
VDEF:g18a=g18,LAST \
LINE2:g1#000000:"sda" \
LINE2:g2#006400:"sdb" \
LINE2:g3#8B8989:"sdc" \
LINE2:g4#BCEE68:"sdd" \
LINE2:g5#20B2AA:"sde" \
LINE2:g6#00FA9A:"sdf" \
LINE2:g7#FF8C00:"sdg" \
LINE2:g8#8B4500:"sdh" \
LINE2:g9#F08080:"sdi" \
LINE2:g10#8B7D6B:"sdj" \
LINE2:g11#FF1493:"sdk" \
LINE2:g12#8B3A62:"sdl" \
LINE2:g13#FF4500:"sdm" \
LINE2:g14#FF0000:"sdn" \
LINE2:g15#68228B:"sdo" \
LINE2:g16#6495ED:"sdp" \
LINE2:g17#00008B:"sdq" \
LINE2:g18#00F5FF:"sdr"</pre>
<p>Yikes! But seriously, I haven&#8217;t found a shorter way to deal with the 18 HDs <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Result graphic: (I&#8217;ve created it today in the 45min break &#8211; so don&#8217;t wonder that it&#8217;s not filled already)</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/10/hddtempsg.jpg" alt="" title="hddtempsg" width="640" height="471" class="aligncenter size-full wp-image-2471" /></div>
</div>
<p><strong><strong><br />
</p>
<h2>Power usage</h2>
<p>I was always curious how much power my server uses, so I bought a simply measurement device for the power socket. </p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/10/brennstuhl.jpg" alt="" title="brennstuhl" width="640" height="857" class="aligncenter size-full wp-image-2473" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/10/brennstuhl2.jpg" alt="" title="brennstuhl2" width="640" height="478" class="aligncenter size-full wp-image-2474" /></div>
</div>
<p>Nice, but who wants to the basement to check every time? Not me <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Too lazy <img src='http://www.klein2.de/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Then I checked for devices with LAN/WiFi connection but couldn&#8217;t find anything nice. One day, I had the idea: I use an APC UPS to protect the server and switch (and more stuff). With the <a href="http://www.apcupsd.org/">apcupds</a>, I&#8217;m able to get the usage and I know how much watts it has max. (540W). Another simple script and I had a current power usage as a number. I think I don&#8217;t have to say that I wanted this in my stats immediately.</p>
<p>I used this script to create the database file:</p>
<pre class="brush:bash">#!/bin/bash
STEP=300

rrdtool create apc.rrd --step $STEP \
DS:apc:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760</pre>
<p>Then I cut the power usage (in %) out of the apcaccess tool:</p>
<pre class="brush:bash">apcaccess | head -n 12 | tail -n 1 | awk -F' '  '{print (540*($3/100)) "\n"}'</pre>
<p>In the next step, I&#8217;ve created a whole shell script to write it directly to the database file to be able to create a graphic from that one.</p>
<pre class="brush:bash">#!/bin/bash
prozent=`apcaccess | head -n 12 | tail -n 1 | awk -F' '  '{print (540*($3/100)) "\n"}'`
/usr/bin/rrdtool update /srv/www/statistik/apc/apc.rrd N:$prozent</pre>
<p>The generator file looks very similar to the one for the room &#038; HD temperatures:</p>
<pre class="brush:bash">nice -n 19 /usr/bin/rrdtool graph /srv/www/statistik/apc/apcg.png -a PNG -b 1024 --start -126900 -A \
-l 20 -u 520 -t "USV Last" --vertical-label "Watt" -w 700 -h 400 \
DEF:g1=/srv/www/statistik/apc/apc.rrd:apc:AVERAGE AREA:g1#ff0000:"Last" \
VDEF:g1a=g1,LAST \
#LINE1:g1#ff0000:"Last" \</pre>
<p>The result: (also created today <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/10/apcd.jpg" alt="" title="apcd" width="640" height="380" class="aligncenter size-full wp-image-2476" /></div>
</div>
<p>Now that I know how to do this kind of stuff, it&#8217;s just a matter of time until I will create statistics for core(s) usage, network bandwidth, HD usage etc pp..</p>
<p>The site itself is on my intranet, but here&#8217;s a screenshot:</p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/10/intranet.png" alt="" title="intranet" width="640" height="1159" class="aligncenter size-full wp-image-2477" /></p>
<p>Ciao<br />
Dennis</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/10/25/stats-of-the-basement-room-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/10/raumtemperaturg-150x150.jpg" length="4932" type="image/jpg" />	</item>
		<item>
		<title>Some more details on Karinka</title>
		<link>http://www.klein2.de/2011/06/03/some-more-details-on-karinka/</link>
		<comments>http://www.klein2.de/2011/06/03/some-more-details-on-karinka/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 08:32:18 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[jfs]]></category>
		<category><![CDATA[karinka]]></category>
		<category><![CDATA[wol]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2072</guid>
		<description><![CDATA[Some question came up when I posted the photos of Karinka a few days ago. I answered some of them in the comments, but to wrap up, here&#8217;s a post on this. OS choice I was using Nexenta Core, OpenIndiana and Solaris 11 Express in the last few months nearly exclusive. The reason for that [...]]]></description>
			<content:encoded><![CDATA[<p>Some question came up when I posted the <a href="http://www.klein2.de/2011/05/23/karinka-%E3%82%AB%E3%83%AA%E3%83%B3%E3%82%AB-photoshoot-nerds-only/">photos of Karinka</a> a few days ago. I answered some of them in the comments, but to wrap up, here&#8217;s a post on this. <span id="more-2072"></span></p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/05/1.jpg" alt="" title="1" class="aligncenter size-full wp-image-2024" /></div>
</div>
<p><strong>OS choice</strong><br />
I was using <a href="http://www.nexenta.org/">Nexenta Core</a>, <a href="http://www.openindiana.org">OpenIndiana</a> and <a href="http://www.oracle.com/us/products/servers-storage/solaris/solaris-11-express-185123.html">Solaris 11 Express</a> in the last few months nearly exclusive. The reason for that is clear: ZFS. I will write more about my choice of the filesystem below, but want to cover the OS choice here. However &#8211; I&#8217;ve chosen <a href="http://www.debian.org">Debian Squeeze</a> for my fileserver for several reasons:</p>
<p><em>Access to tools</em><br />
Believe it or not &#8211; this was one of the main reasons. It&#8217;s kinda hard to get temperatures of your harddisks and system itself on Solaris kernel systems, if you don&#8217;t have SUN hardware. Also, I missed the opportunities of a Debian system like using VMware server, APC UPS USB support and a familiar environment.</p>
<p><em>BackUPS</em><br />
As mentioned before, the APC UPS USB support was more or less impossible to get to work using a Solaris kernel. I&#8217;ve compiled and followed a bunch of different tutorials, but they were mostly for SMART APCs and not USB. This didn&#8217;t help in case of a power outage that requiere a controlled shutdown of the system.</p>
<p><em>Temperatures</em><br />
Call me a bit paranoid, but I simply love to check my HD temps from time to time. As it&#8217;s not possible with Solaris kernel based systems for MY BUILD (sure &#8211; the <a href="http://en.wikipedia.org/wiki/Sun_Fire_X4500">Thumper</a> may show those information on Solaris <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ), that was one of the key arguments to use Debian.</p>
<p><strong>Filesystem</strong><br />
Unlike before, I started using JFS as filesystem. This is a filesystem developed by IBM beginning the 90ies and still in development process (even if some people may say it&#8217;s dead). However &#8211; it is a very quick one, especially if you need to rebuild something &#8211; fsck &#038; fscklog should be done in seconds than in a lot of minutes or hours. But most important, it&#8217;s stable and proven. ZFS should be stable, too &#8211; even more secure. That&#8217;s true, but using ZFS would hinder me using the tools I like and want to use. Btw. even <a href="http://www.backblaze.com">BackBlaze</a> is using JFS with mdadm for their servers, so it can&#8217;t be that wrong.</p>
<p>Unfortunately, Debian Squeeze still delivers the JFSutils from 2007 (wow!), so you will have to grab the newest version from <a href="http://jfs.sourceforge.net/">their website</a> and compile it on your own. Not nice, but not too complicated. The current one (1.1.15) is from March 2011.</p>
<p><strong>Networking</strong><br />
Oh networking! OpenIndiana and Solaris 11 Express drove me nuts. I was nearly lost with the current versions until Constantin has sent me a good description how to configure the network on Solaris kernel based systems. It&#8217;s way more comfy using Debian for that, believe me. I run 2 Intel GBit NICs in this server, each has an own IP and delivers full duplex speed to the network. It&#8217;s not (yet) bond, but this way 2 users are able to work parallel without loosing too much speed.</p>
<p><strong>RAID</strong><br />
While ZFS delivers a very nice implementation of a RAID &#038; LVM inside itself, you have to use a hardware RAID controller or use the software RAID mdadm to setup a redundant filesystem. As I have my Intel SASUC8i with the LSI IT firmware still running in Karinka, I use mdadm to create a RAID5 of 8x1TB HDs (storagepool). I use the 6x onboard SATA-II ports for the other pool: storagepool which is built from 6&#215;1.5TB HDs &#8211; this is also RAID5. Btw. the system itself is running on a seperate 160GB IDE HD.</p>
<p>Here are some benchmarks:<br />
<em>Mediapool</em></p>
<pre class="brush:bash">root@karinka:/home/dieta# hdparm -tT /dev/md0

/dev/md0:
 Timing cached reads:   3802 MB in  2.00 seconds = 1901.12 MB/sec
 Timing buffered disk reads: 888 MB in  3.10 seconds = 286.13 MB/sec</pre>
<p><em>Storagepool</em></p>
<pre class="brush:bash">root@karinka:/home/dieta# hdparm -tT /dev/md1

/dev/md1:
 Timing cached reads:   3782 MB in  2.00 seconds = 1890.86 MB/sec
 Timing buffered disk reads: 2222 MB in  3.00 seconds = 740.49 MB/sec</pre>
<p>You can see that the 4k HDs (WD15EA<strong>R</strong>S) in the Mediapool are also a problem for mdadm. They drop the reads a lot and even more the writes.</p>
<p><strong>Power</strong><br />
Karinka is easily sucking up to 100W out of the power line. Not that much if you see 15 HDs running inside + 4 PCI/e cards and a nice Dual Core CPU (AMD Athlon X2 245e), but why let it run 24/7? Because it&#8217;s a server! Yeah.. true, but.. it sucks so much power! So I was looking for a nice App for my iPhone and iPad to wake up Karinka from sleep using the WOL magic package.</p>
<p><img src="http://www.klein2.de/wp-content/uploads/2011/06/wol.png" alt="" title="wol" width="300" height="450" class="aligncenter size-full wp-image-2073" /></p>
<p>Shutdown is still not possible using the above show <a href="http://bananaglue.de/wol/index_d.php">iNet WOL</a> software <img src='http://www.klein2.de/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Just for Macs and not Linux so far. But using <a href="http://www.zinger-soft.com/iSSH_features.html">iSSH</a> on my iPhone and iPad, I&#8217;m able to login and &#8220;poweroff&#8221; manually. Not that hard.</p>
<p>With those procedures, I save a lot of money, that&#8217;s for sure. And of course, it&#8217;s &#8220;green&#8221; <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  A good thing.</p>
<p>What you need to do to enable WOL (Wake on LAN) is to enable the option in your BIOS if it&#8217;s an onboard card, if it&#8217;s an PCIe card (like in my case), you need to set the power management that it allows the WOL signal to arrive. This will lift the power consumption above the 1W to 2-3W, but I think that&#8217;s a fair deal if you switch your server off for some or a lot of hours!</p>
<p><strong>Protocols</strong><br />
AFP &#8211; that gave me headache, too. AFP is the Apple File Protocol. On ZFS, it was stable but superslow. Seriously &#8211; when browsing through a directory on a AFP connection it&#8217;s painful. On the other hand, AFP (enabled by the Netatalk application on both, Linux and UNIX) allows faster copies. Sounds a bit strange, right? Yes it is. Copying went up to 119MB/s what is the max. you can get out of a GBit connection.</p>
<p>On Debian, the directory browsing is pretty fast and neat &#8211; BUT unstable. Opening up to much parallel sessions/folders or even opening up an Aperture lib is the way to crash it. Then you suddenly see Aperture passing away and a nice box telling you that the &#8220;servername&#8221; has stopped working. Not fun!</p>
<p>So I decided to use AFP ONLY for Time Machine backups (which are honestly not yet set up in the current system). SMB (Samba) is a CIFS based sharing for Windows machines, but luckily, Apple supports it, too. This is fast for browsing and the max. speed you can reach with GBit from Mac to Debian is up to 60MB/s. That&#8217;s exactly the 1/2 of the AFP speed, but it&#8217;s stable.</p>
<p>Let&#8217;s be realistic: I&#8217;ve copied my data (currently there are&#8230; oh wait:</p>
<pre class="brush:bash">/dev/md0               7,6T   3,6T   4,0T  48% /mediapool
/dev/md1               7,1T   612G   6,4T   9% /storage</pre>
<p>some TBytes in use <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) several times from A to B and back to A and then to C, D, E&#8230;. From HFS+ to ZFS to HFS+ to NTFS to ext4 to HFS+ to JFS. And that is just a reduced version of what I&#8217;ve done in the last few months to find out what works best for my scenario. Luckily, as far as I can say, no file is yet corrupt. Hopefully it stays this way even with a non-corruption-detect FS like ZFS.</p>
<p>For a short period of time (2 weeks ago), I had still running OpenIndiana and shared an iSCSI volume to my Mac mini which the shared this volume (HFS+ formatted) to the users &#8211; sounds nice, but the Mac mini just has 1 NIC port (GBit), which made it kinda slow <img src='http://www.klein2.de/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Too bad <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So that was a quick overview of what happens here. Some temperatures you want to see? Sure!</p>
<pre class="brush:bash">/dev/sda: WDC WD1600AAJB-00J3A0: 29°C
/dev/sdb: SAMSUNG HD154UI: 20°C
/dev/sdc: SAMSUNG HD154UI: 21°C
/dev/sdd: SAMSUNG HD154UI: 22°C
/dev/sde: WDC WD15EARS-00Z5B1: 26°C
/dev/sdf: WDC WD15EARS-00Z5B1: 27°C
/dev/sdg: WDC WD15EARS-00Z5B1: 26°C
/dev/sdh: Hitachi HDS721010CLA332: 26°C
/dev/sdi: Hitachi HDS721010CLA332: 27°C
/dev/sdj: Hitachi HDS721010CLA332: 27°C
/dev/sdk: Hitachi HDS721010CLA332: 26°C
/dev/sdl: Hitachi HDS721010CLA332: 27°C
/dev/sdm: WDC WD10EADS-00M2B0: 27°C
/dev/sdn: WDC WD1001FALS-41Y6A0: 29°C
/dev/sdo: Hitachi HDS721010CLA332: 27°C</pre>
<p>14 of those HDs are actively cooled and controller by a fan controller (thanks to <a href="http://mafri.ws/">MAFRI</a> for this gift you send me 1 1/2 years ago, today I really use it <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). The IDE drive is not cooled by a fan, bit normally in the range of 28-34°C. Up to 50°C should be fine, but I like it more cooled like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/06/03/some-more-details-on-karinka/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/06/wol-150x150.png" length="20384" type="image/jpg" />	</item>
		<item>
		<title>KARINKA カリンカ Photoshoot (nerds only ;))</title>
		<link>http://www.klein2.de/2011/05/23/karinka-%e3%82%ab%e3%83%aa%e3%83%b3%e3%82%ab-photoshoot-nerds-only/</link>
		<comments>http://www.klein2.de/2011/05/23/karinka-%e3%82%ab%e3%83%aa%e3%83%b3%e3%82%ab-photoshoot-nerds-only/#comments</comments>
		<pubDate>Mon, 23 May 2011 11:35:30 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[karinka]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=2023</guid>
		<description><![CDATA[As mentioned in my last post about the Home Office 8.0a (the planning is still in progress), I couldn&#8217;t get the spare parts sold that I had used for the server before. As I don&#8217;t want to put those nice parts into a rack and leave them there and already complain about the bad performance [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned in <a href="http://www.klein2.de/2011/05/21/planning-the-new-home-office-8-0a/">my last post about the Home Office 8.0a</a> (the planning is still in progress), I couldn&#8217;t get the spare parts sold that I had used for the server before. As I don&#8217;t want to put those nice parts into a rack and leave them there and already complain about the bad performance of the Onntos attached to the Mac mini and then shared via network, I put the parts together last night. I used to installed Debian Squeeze as OS. <span id="more-2023"></span></p>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/05/teaser-karinka-shooting.jpg" alt="" title="teaser-karinka-shooting" class="aligncenter size-full wp-image-2030" /></div>
</div>
<p>I used the following hardware for KARINKA (somehow the font looks like an IKEA furniture, right? <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<pre class="brush:bash">CASE		Yeong Yang YY-0221
CPU			AMD Athlon X2 245e (45W)
BOARD		Gigabyte GA-MA770T-UD3
RAM			4x 4GB Kingston ECC RAM
NICs		2x Intel Desktop CT 1000 PCIe x1
CONTROLLER	Intel SASUC8i/LSI flashed to IT firmware
GRAPHIC		old ATI Rage 3D PCI
SYS HD		WD 160GB Caviar Blue IDE
RAID HDs	6x Hitachi 1TB DeskStar SATA
			1x WD 1TB Caviar Green SATA
			1x WD 1TB Caviar Black SATA
			3x Samsung 1.5TB HD154UI SATA
			3x WD 1.5TB Caviar Green SATA
OS			Debian Squeeze</pre>
<p>And here some data of the HDD temps (while running in the basement).</p>
<pre class="brush:bash">root@karinka:~# temps

Temperatures of RAID Array Mediapool
---------------------------------------
/dev/sdb: SAMSUNG HD154UI: 26°C
/dev/sdc: SAMSUNG HD154UI: 27°C
/dev/sdd: SAMSUNG HD154UI: 30°C
/dev/sde: WDC WD15EARS-00Z5B1: 36°C
/dev/sdf: WDC WD15EARS-00Z5B1: 36°C
/dev/sdg: WDC WD15EARS-00Z5B1: 38°C

Temperatures of RAID Array Storagepool
---------------------------------------
/dev/sdh: Hitachi HDS721010CLA332: 30°C
/dev/sdi: Hitachi HDS721010CLA332: 31°C
/dev/sdj: Hitachi HDS721010CLA332: 31°C
/dev/sdk: Hitachi HDS721010CLA332: 30°C
/dev/sdl: Hitachi HDS721010CLA332: 31°C
/dev/sdm: Hitachi HDS721010CLA332: 32°C
/dev/sdn: WDC WD10EADS-00M2B0: 32°C
/dev/sdo: WDC WD1001FALS-41Y6A0: 35°C

Temperature of the system disk
---------------------------------------
/dev/sda: WDC WD1600AAJB-00J3A0: 36°C</pre>
<p>I think those are quiet nice temperatures <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/05/1.jpg" alt="" title="1" class="aligncenter size-full wp-image-2024" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/05/2.jpg" alt="" title="2" class="aligncenter size-full wp-image-2025" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/05/3.jpg" alt="" title="3" class="aligncenter size-full wp-image-2026" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/05/4.jpg" alt="" title="4" class="aligncenter size-full wp-image-2027" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/05/5.jpg" alt="" title="5" class="aligncenter size-full wp-image-2028" /></div>
</div>
<div class="aussen">
<div class="innen"><img src="http://www.klein2.de/wp-content/uploads/2011/05/6.jpg" alt="" title="6" class="aligncenter size-full wp-image-2029" /></div>
</div>
<p>PS. I&#8217;m now using the plugin &#8220;RSS Image Feed&#8221; &#8211; hopefully it will resize the included images to 200px width&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/05/23/karinka-%e3%82%ab%e3%83%aa%e3%83%b3%e3%82%ab-photoshoot-nerds-only/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/05/1-150x150.jpg" length="8065" type="image/jpg" />	</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>How to move a real Linux server to VirtualBox</title>
		<link>http://www.klein2.de/2011/02/06/how-to-move-a-real-linux-server-to-virtualbox/</link>
		<comments>http://www.klein2.de/2011/02/06/how-to-move-a-real-linux-server-to-virtualbox/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 14:10:52 +0000</pubDate>
		<dc:creator>Dennis Klein</dc:creator>
				<category><![CDATA[Technique Stuff]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://www.klein2.de/?p=1658</guid>
		<description><![CDATA[With installing VirtualBox on my Nexenta server &#8220;Karinka&#8221; at the end of last week, I had the feeling that this was a start of a wonderful thing As I have described in my last blog post, it&#8217;s not that complicated to move a current virtual machine from VMware Fusion to VirtualBox. But migrating a real [...]]]></description>
			<content:encoded><![CDATA[<p>With installing VirtualBox on my Nexenta server &#8220;Karinka&#8221; at the end of last week, I had the feeling that this was a start of a wonderful thing <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  As I have <a href="http://www.klein2.de/2011/02/04/move-a-vmware-fusion-vm-to-virtualbox-on-nexentacore/">described in my last blog post</a>, it&#8217;s not that complicated to move a current virtual machine from VMware Fusion to VirtualBox. But migrating a real running machine sounds like a lot more work. <span id="more-1658"></span></p>
<p>First, I found &#8220;mic2&#8243;, a tool by MeeGo that should create an image of a current running system. I was not able to find the right sources nor did I found any deb files, so I stopped this after 2 frustrating hours.</p>
<p>A new Google search showed up a nice <a href="http://www.administrator.de/Wie_kann_ich_ein_bestehendes_System_virtualisieren_und_als_virtuelle_Maschine_in_VirtualBox_einbinden%3F.html">thread in the german Administrator.de board</a>, describing how to move a real machine to VirtualBox.</p>
<p>Before we start, you should know that this process will create a block-based image of the complete HARDDISK! This means: if you have a 1TB harddisk in your server and you have just 900GB of free space on your destination server/pool/partition, this will NOT work!</p>
<p>I had built in a small 160GB IDE HD in this particular machine (Intranetserver &#8220;Hotaru&#8221;) and have more than 2.7TB of free storage in the destination pool, so this didn&#8217;t created any headache for me.</p>
<p><strong>What you need</strong><br />
- SSH access to the destination server<br />
- a good connection (GBit is recommended) between your real and your destination server<br />
- enough free space on your destination server/pool/partition</p>
<p>This SHOULD work with ANY Linux/UNIX OS <img src='http://www.klein2.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Creating the image via network</strong><br />
First, log into your real server that you want to virtualize. Maybe switch off all running big tasks like MySQL, Apache2&#8230; whatever. This is a tip, but honestly, I forgot and had no issues creating the image.</p>
<p>Because this will take a LOOONG time, I recommend to use screen for this!</p>
<p>Log in as <strong>root</strong> and type:</p>
<pre class="brush:bash"># dd if=/dev/hda | ssh username@destination-server-ip dd of=/storage/vms/hotaru.img</pre>
<p>OK &#8211; of course you should replace /dev/hda with your systems HD like /dev/sda if it&#8217;s SATA/SAS/SCSI, enter your username of the destination directory.</p>
<p>Note: If you want to copy the image to your /root folder on a Solaris based OS like Nexenta, you CAN&#8217;T login as /root here. I&#8217;ve used my regular user and selected a directory the user is allowed to write to.</p>
<p>If you don&#8217;t run an own DNS on your LAN with host-resolution for LAN devices, type the IP of the destination server.<br />
of should be the server&#8217;s folder your user is allowed to write to.</p>
<p>You will be prompted to log in into your destination server by typing your password.</p>
<p>Now, depending on the speed of your servers, your network connection this could take from 30mins to several hours. In my case, I let it run over night, the next morning, everything was copied and the file &#8220;hotaru.img&#8221; was on my Nexenta server in the path /storage/vms, where all other VMs are stored into, too.</p>
<p><strong>Converting the .img to .vdi</strong><br />
To be able to use the image, you will need to convert it. This will again take some time, so consider doing this via screen, too.</p>
<pre class="brush:bash">$ VBoxManage convertdd hotaru.img hotaru.vdi</pre>
<p><strong>Importing the VM into VirtualBox</strong><br />
The step of importing is pretty easy &#8211; just follow my instructions of my <a href="http://www.klein2.de/2011/02/04/move-a-vmware-fusion-vm-to-virtualbox-on-nexentacore/">previous post</a>:</p>
<p><strong>VirtualBox and basic configuration of a new VM</strong><br />
Open VirtualBox:</p>
<pre class="brush:bash">$ VirtualBox &#038;</pre>
<p>In the appearing VirtualBox on your local machine, 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-06-um-14.51.56.png" alt="" title="Bildschirmfoto 2011-02-06 um 14.51.56" class="aligncenter size-full wp-image-1668" /></p>
<p>Click the &#8220;Add&#8221; icon and select the new vdi file. In my case it was hotaru.vdi. 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!</p>
<p>256MB is fine for my Intranet Machine, so &#8220;Next&#8221;.</p>
<p>Then I select the &#8220;Use existing hard disk&#8221; radio and select my &#8220;hotaru.vdi&#8221;.<br />
<img src="http://www.klein2.de/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-06-um-14.54.01.png" alt="" title="Bildschirmfoto 2011-02-06 um 14.54.01" class="aligncenter size-full wp-image-1669" /></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>My real machine is a bit older (SuperMicro 1U server with IDE, 2x Intel 10/100er onboard NICs and Celeron 2.4GHz CPU). As it&#8217;s using IDE, that&#8217;s fine for VBox.</p>
<p>In case your machine is SATA, follow those steps:</p>
<p>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></blockquote>
<p>I have 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 "Hotaru" &#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 "Hotaru" poweroff</pre>
<p>Now the setting:</p>
<pre class="brush:bash">$ VBoxManage modifyvm "Hotaru" --vrdpport 3391</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>Now, it&#8217;s time check if everything works &#8211; you can launch the VMs in a window by simply starting them from the X11 window. This will pop up your VM. Please keep in mind, that this is NOT the to run them normally, as closing those windows will kill the VMs! This is fine for maintaining &#8211; what was the reason I was in need to use them that way; the AMD NIC of VBox was recognized automatically by the Debian, but set to the non-configured port &#8220;eth3&#8243;, so I had set up the IP, DNS &#038; Gateway again &#8211; a thing of 1 minute.</p>
<p>Maybe to mention also, I had to run a fsck check before I was able to boot the VM and first I thought it would not work <img src='http://www.klein2.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  But in the end, it booted fine and it works great now.</p>
<p>Once you&#8217;re done with error-fixing (in case you have to), you can shut the new VM down and launch it from the terminal:</p>
<pre class="brush:bash">$ nohup VBoxHeadless -s "Hotaru" &#038;</pre>
<p>My VMs are now running fine, be sure to check them by quitting all terminals, reopen and ping. It happened to me that one was running via the terminal, because I had forgot to attach the &#8220;&#038;&#8221; to the end, and by closing the terminal, it was killed. It&#8217;s always fine to have Apache2 servers running for a quick check.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klein2.de/2011/02/06/how-to-move-a-real-linux-server-to-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://www.klein2.de/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-06-um-14.54.01-150x150.png" length="27626" type="image/jpg" />	</item>
	</channel>
</rss>

