<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Agile Developer, Berlin, Germany</title>
	<atom:link href="http://pegolon.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pegolon.wordpress.com</link>
	<description>Developing software using agile techniques</description>
	<lastBuildDate>Tue, 13 Sep 2011 05:41:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pegolon.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Agile Developer, Berlin, Germany</title>
		<link>http://pegolon.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pegolon.wordpress.com/osd.xml" title="Agile Developer, Berlin, Germany" />
	<atom:link rel='hub' href='http://pegolon.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Adding a reflection to an NSImage</title>
		<link>http://pegolon.wordpress.com/2011/01/20/adding-a-reflection-to-an-nsimage/</link>
		<comments>http://pegolon.wordpress.com/2011/01/20/adding-a-reflection-to-an-nsimage/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 11:01:44 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[macosx]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=139</guid>
		<description><![CDATA[To add an reflection in Cocoa to a NSImage object you can use the following NSImage category: To get a copy of a NSImage with a reflection applied you call [image addReflection:0.3], where the float value defines the percentage of the reflection regarding the height of the input image, e.g.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=139&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To add an reflection in Cocoa to a NSImage object you can use the following NSImage category:</p>
<pre class="brush: objc;">
@interface NSImage(MKAddReflection)
- (NSImage*) addReflection:(CGFloat)percentage;
@end

@implementation NSImage(MKAddReflection)

- (NSImage*) addReflection:(CGFloat)percentage
{
	NSAssert(percentage &gt; 0 &amp;&amp; percentage &lt;= 1.0, @&quot;Please use percentage between 0 and 1&quot;);
	CGRect offscreenFrame = CGRectMake(0, 0, self.size.width, self.size.height*(1.0+percentage));
	NSBitmapImageRep * offscreen = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
														pixelsWide:offscreenFrame.size.width
														pixelsHigh:offscreenFrame.size.height
													 bitsPerSample:8
												   samplesPerPixel:4
														  hasAlpha:YES
														  isPlanar:NO
													colorSpaceName:NSDeviceRGBColorSpace
													  bitmapFormat:0
													   bytesPerRow:offscreenFrame.size.width * 4
													  bitsPerPixel:32];

	[NSGraphicsContext saveGraphicsState];
	[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:offscreen]];

	[[NSColor clearColor] set];
	NSRectFill(offscreenFrame);

	NSGradient * fade = [[NSGradient alloc] initWithStartingColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.2] endingColor:[NSColor clearColor]];
	CGRect fadeFrame = CGRectMake(0, 0, self.size.width, offscreen.size.height - self.size.height);
	[fade drawInRect:fadeFrame angle:270.0];	

    NSAffineTransform* transform = [NSAffineTransform transform];
    [transform translateXBy:0.0 yBy:fadeFrame.size.height];
    [transform scaleXBy:1.0 yBy:-1.0];
    [transform concat];

	// Draw the image over the gradient -&gt; becomes reflection
	[self drawAtPoint:NSMakePoint(0, 0) fromRect:CGRectMake(0, 0, self.size.width, self.size.height) operation:NSCompositeSourceIn fraction:1.0];

	[transform invert];
	[transform concat];

	// Draw the original image
	[self drawAtPoint:CGPointMake(0, offscreenFrame.size.height - self.size.height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];

	[NSGraphicsContext restoreGraphicsState];

	NSImage * imageWithReflection = [[NSImage alloc] initWithSize:offscreenFrame.size];
	[imageWithReflection addRepresentation:offscreen];

	return imageWithReflection;
}
</pre>
<p>To get a copy of a NSImage with a reflection applied you call [image addReflection:0.3], where the float value defines the percentage of the reflection regarding the height of the input image, e.g.</p>
<pre class="brush: objc;">
NSImage * input = [[NSImage alloc] initWithContentsOfFile:@&quot;/Users/mk/Desktop/input.jpg&quot;];
NSImage * output = [input addReflection:0.4];
</pre>
<p><a href="http://pegolon.files.wordpress.com/2011/01/input.jpg"><img class="alignnone size-full wp-image-140" title="input" src="http://pegolon.files.wordpress.com/2011/01/input.jpg?w=256&#038;h=77" alt="" width="256" height="77" /></a></p>
<p><a href="http://pegolon.files.wordpress.com/2011/01/output.jpeg"><img class="alignnone size-full wp-image-141" title="output" src="http://pegolon.files.wordpress.com/2011/01/output.jpeg?w=256&#038;h=107" alt="" width="256" height="107" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=139&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2011/01/20/adding-a-reflection-to-an-nsimage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>

		<media:content url="http://pegolon.files.wordpress.com/2011/01/input.jpg" medium="image">
			<media:title type="html">input</media:title>
		</media:content>

		<media:content url="http://pegolon.files.wordpress.com/2011/01/output.jpeg" medium="image">
			<media:title type="html">output</media:title>
		</media:content>
	</item>
		<item>
		<title>Kerning comparison OSX &#8211; Windows &#8211; TLF</title>
		<link>http://pegolon.wordpress.com/2010/01/14/kerning-comparison-osx-windows-tlf/</link>
		<comments>http://pegolon.wordpress.com/2010/01/14/kerning-comparison-osx-windows-tlf/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:39:41 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[os]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=133</guid>
		<description><![CDATA[I did some tests comparing the same text on OS X with the TextEdit, on Windows XP with WordPad and on OS X in Safari on the Adobe Text Layout Framework demo site. I used everywhere Times New Roman as the font and a font size of 28. Although Windows does not use kerning the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=133&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I did some tests comparing the same text on OS X with the TextEdit, on Windows XP with WordPad and on OS X in Safari on the Adobe Text Layout Framework demo <a href="http://labs.adobe.com/technologies/textlayout/demos/">site</a>. I used everywhere Times New Roman as the font and a font size of 28.<br />
Although Windows does not use kerning the text looks almost the same with some pixel difference. Have a look for yourself:<br />
<img src="http://dressyco.de/images/KerningComparison.png" alt="Comparing a text on OSX, Windows XP and TLF" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=133&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2010/01/14/kerning-comparison-osx-windows-tlf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>

		<media:content url="http://dressyco.de/images/KerningComparison.png" medium="image">
			<media:title type="html">Comparing a text on OSX, Windows XP and TLF</media:title>
		</media:content>
	</item>
		<item>
		<title>Gesture recognition on the iPhone</title>
		<link>http://pegolon.wordpress.com/2010/01/09/gesture-recognition-on-the-iphone/</link>
		<comments>http://pegolon.wordpress.com/2010/01/09/gesture-recognition-on-the-iphone/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 21:15:53 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=129</guid>
		<description><![CDATA[Inspired by this detailed article by Carl D. Worth I began experimenting with stroke recognition on the iPhone. Unfortunately the sources for xstroke are very difficult to find nowadays and are unsupported. I finally did find them but I did not want to port all that X11 stuff, so I decided to start from scratch [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=129&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Inspired by this detailed <a href="http://www.usenix.org/events/usenix03/tech/freenix03/full_papers/worth/worth_html/xstroke.html">article</a> by Carl D. Worth I began experimenting with stroke recognition on the iPhone. Unfortunately the sources for xstroke are very difficult to find nowadays and are unsupported. I finally did find them but I did not want to port all that X11 stuff, so I decided to start from scratch and did a small feasibility study which I want to show you here.</p>
<p>I created the project &#8220;KrikelKrakel&#8221; (German for scribbling) on <a href="http://bitbucket.org/pegolon/krikelkrakel">BitBucket</a>.</p>
<p>The most interesting class you would look at is KrikelKrakelView. It inherits from UIView and does all the tracking and recognition. The gestures are recognized when the touches ended. The area where touches took place is divided in a grid with 9 cells and the path the finger took is then described by the cell ids. You should have a look at the article mentioned earlier about the details.</p>
<p>One can register as a delegate to get called on different occassions:</p>
<p><code>- (void) willDrawGesture;</code></p>
<p>This will be called right inside the touchesBegan method.</p>
<p><code>- (void) didLearnNewGesture:(NSString*)text;</code></p>
<p>When a gesture has not been recognized the user will be presented with an alert box where he can enter a letter or some more text.</p>
<p><code>- (void) didRecognizeGesture:(NSString*)text;</code></p>
<p>When a gesture has been recognized this method will be called and the stored letter/text will be delivered in the variable text.</p>
<p>The learned gestures a stored in the application documents directory with the name &#8220;strokes.dict&#8221;. If there is no file on first start the bundled strokes.dict will be used a the initial version.</p>
<p>See a demo video <a href="http://dressyco.de/Media/KrikelKrakel.mov">here</a>. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=129&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2010/01/09/gesture-recognition-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://dressyco.de/Media/KrikelKrakel.mov" length="1176439" type="video/quicktime" />
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up an OpenSolaris root server at Hetzner</title>
		<link>http://pegolon.wordpress.com/2009/10/24/setting-up-an-opensolaris-root-server-at-hetzner/</link>
		<comments>http://pegolon.wordpress.com/2009/10/24/setting-up-an-opensolaris-root-server-at-hetzner/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 12:44:56 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[os]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=122</guid>
		<description><![CDATA[Several months ago I ordered a root server by the German hosting provider Hetzner called EQ4. It is quite powerful: an Intel Core i7-920 Quad-Core CPU, 8 GB RAM and two 750 GB HDDs for only 45,- €/month. Since they only provide several Linux flavors (openSuSE, Fedora, CentOS) at first glance I decided to use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=122&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Several months ago I ordered a root server by the German hosting provider Hetzner called <a href="http://www.hetzner.de/de/hosting/produkte_rootserver/eq4/">EQ4</a>. It is quite powerful: an Intel Core i7-920 Quad-Core CPU, 8 GB RAM and two 750 GB HDDs for only 45,- €/month. Since they only provide several Linux flavors (openSuSE, Fedora, CentOS) at first glance I decided to use CentOS. I already some very good experiences with it a couple of years ago. The installation process was very easy.</p>
<p>After a couple of months without much time to fiddle with the server it just sat there in its rack and got bored.</p>
<p>After the very inspiring <a href="http://nosqlberlin.de/">NoSQL</a> meeting in Berlin last Thrusday I decided to spend some time with my server installing Erlang, CouchDB and nginx as a reverse proxy to do authentication and SSL stuff.</p>
<p>Installing the software packages went very well. Some of them I grabbed via yam others I installed from source. Connecting to my system via a ssh session worked very well but there was a very strange iptables setup in the CentOS installation which drove me crazy. I could not reach the proxy from outside and after several hours I decided to try a reinstall. At Hetzner one can reboot the server in a so called rescue mode. This mode can be of course Linux, but also FreeBSD and OpenSolaris. Digging a little further I discovered a site in the Hetzner wiki <a href="http://wiki.hetzner.de/index.php/OpenSolaris_installieren">describing</a> how to install OpenSolaris through this rescue system.</p>
<p>I used <a href="http://www.jinx.de/JollysFastVNC.html">JollyFastVNC</a> to establish a VNC session to the rescue system and used the graphical OpenSolaris installer to install it on the first HDD. After installation I used my <a href="http://pegolon.wordpress.com/2009/07/13/setting-up-my-solaris-fileserver-part-2/">directions</a> from an earlier post to create a ZFS mirror using both HDDs. </p>
<p>This is my hardware configuration discovered by OpenSolaris:</p>
<pre class="brush: plain;">
# prtdiag -v
System Configuration: MSI MS-7522
BIOS Configuration: American Megatrends Inc. V8.2 04/20/2009

==== Processor Sockets ====================================

Version                          Location Tag
-------------------------------- --------------------------
Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz CPU 1

==== Memory Device Sockets ================================

Type        Status Set Device Locator      Bank Locator
----------- ------ --- ------------------- ----------------
other       in use 0   DIMM0               BANK0
other       in use 0   DIMM1               BANK1
other       in use 0   DIMM2               BANK2
other       empty  0   DIMM3               BANK3
other       in use 0   DIMM4               BANK4
other       empty  0   DIMM5               BANK5
FLASH       in use 0                        

==== On-Board Devices =====================================

==== Upgradeable Slots ====================================

ID  Status    Type             Description
--- --------- ---------------- ----------------------------
1   available PCI              PCI1
2   available PCI Express      PCIE2
3   available PCI Express      PCIE3
4   available PCI Express      PCIE4
</pre>
<p>Next I used the CouchDB directions in the <a href="http://wiki.joyent.com/accelerators:setup-couchdb">Joyent Wiki</a> to install the entire required software stack from source. After some fiddling with directory write permissions I had my CouchDB system up and running.</p>
<p>To install nginx I used the official <a href="http://wiki.nginx.org/InstallingOnOpenSolaris">site</a>. I wanted to have a password authentication on my site. Since nginx doesn&#8217;t come with htpasswd I used it on my Mac:</p>
<pre class="brush: plain;">
$ htpasswd -nbd user password
user:TYVlO9aeSogv6
</pre>
<p>I copied the output line into the file /etc/nginx/htpasswd on my server.</p>
<p>To create a self signed certificate in the folder /etc/nginx I used the following commands:</p>
<pre class="brush: plain;">
# openssl req -new -nodes -keyout selfsigned.key -out selfsigned.csr
Generating a 1024 bit RSA private key
............................................................................................................................++++++
........................++++++
writing new private key to 'selfsigned.key'
...
# openssl x509 -req -days 1095 -in selfsigned.csr -signkey selfsigned.key -out selfsigned.crt
Signature ok
...
Getting Private key
</pre>
<p>My nginx setup file contents are:</p>
<pre class="brush: plain;">
#/etc/nginx/nginx.conf

#user  nobody;
worker_processes  2;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] $request '
    #                  '&quot;$status&quot; $body_bytes_sent &quot;$http_referer&quot; '
    #                  '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
                auth_basic &quot;Restricted&quot;;
                auth_basic_user_file /etc/nginx/htpasswd;
                rewrite /couchdb/(.*) /$1 break;
                proxy_pass http://localhost:5984;
                proxy_redirect off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }

    #
    # HTTPS server
    #
    server {
        listen       443;
        server_name  localhost;

        ssl                  on;
        ssl_certificate      /etc/nginx/selfsigned.crt;
        ssl_certificate_key  /etc/nginx/selfsigned.key;

        ssl_session_timeout  5m;

        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;

        location / {
                auth_basic &quot;Restricted&quot;;
                auth_basic_user_file /etc/nginx/htpasswd;
                rewrite /couchdb/(.*) /$1 break;
                proxy_pass http://localhost:5984;
                proxy_redirect off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
}
</pre>
<p>Now when I open http://my.secret.server.ipaddress/ I can log in with the created user credentials stored in htpasswd and get the warm CouchDB welcome message: &#8216;{&#8220;couchdb&#8221;:&#8221;Welcome&#8221;,&#8221;version&#8221;:&#8221;0.10.0&#8243;}&#8217;. I can also use the secure entry at  https://my.secret.server.ipaddress/.</p>
<p>After every successful step I made a ZFS snapshot which is the greatest feature I can use now. By the way: a nice ZFS cheat sheet can be found <a href="http://www.lildude.co.uk/zfs-cheatsheet/">here</a>.</p>
<p>I don&#8217;t know why it worked so well with OpenSolaris and I had so many problems with CentOS. Maybe my system is now wide open and completely insecure, but this way I like it much better because now I can close all the open doors step by step and make it more secure.</p>
<p>Next I will move my domain also to Hetzner and let it point to my server. Then I will setup a mail server, maybe install some Ruby on Rails stuff (http://www.redmine.org/) and will write an Adobe Flex application for a customer which will rely completely on CouchDB #bliss.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=122&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2009/10/24/setting-up-an-opensolaris-root-server-at-hetzner/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up my Solaris server as a centralized backup server</title>
		<link>http://pegolon.wordpress.com/2009/10/15/setting-up-my-solaris-server-as-a-centralized-backup-server/</link>
		<comments>http://pegolon.wordpress.com/2009/10/15/setting-up-my-solaris-server-as-a-centralized-backup-server/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 11:17:36 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[os]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=106</guid>
		<description><![CDATA[After some months of work I now have the time to set-up my server properly so that it can backup all my computers without a hassle. Since I wanted to let the server control, when the backups should be made I wrote a Ruby script which runs every hour and backs up all the available [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=106&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After some months of work I now have the time to set-up my server properly so that it can backup all my computers without a hassle. Since I wanted to let the server control, when the backups should be made I wrote a Ruby script which runs every hour and backs up all the available hosts (which are of course Macs <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . The script should not run at the same time and produce a decent logfile.</p>
<h2>Set up environment</h2>
<h2 style="font-size:1.5em;"><span style="font-weight:normal;font-size:13px;">First I had to make sure, that the server had the correct time. By default the ntp daemon did not run, so I configured it using the description at <a href="http://thegreyblog.blogspot.com/2008/11/configuring-ntp-server-and-client-on.html">the grey blog</a>. I did not use the European ntp server though instead I used de.pool.ntp.org.</span></h2>
<p>To install the current version 1.8.7 of Ruby I entered as root:</p>
<pre style="font:normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;"># pfexec pkg install SUNWruby18</pre>
<p>Then I created a ssh key for my Solaris root user:</p>
<pre style="font:normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;"># ssh-keygen -t dsa
Enter file in which to save the key (/root/.ssh/id_dsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
*DISCLOSED*</pre>
<p>To get a ssh connection which is needed for rsync to each of my hosts I then copied the contents of /root/.ssh/id_dsa.pub to the to the file authorized_keys e.g. user1@host1:.ssh/authorized_keys</p>
<p>Now whenever I enter &#8220;ssh user1@host1&#8243; no password is needed to get a remote shell.</p>
<h2>The Ruby Script</h2>
<pre class="brush: ruby;">
#!/usr/bin/ruby
# This script will fetch the current files from a couple of hosts via rsync
# and stores them locally
require 'ping'
require 'tempfile'
require 'open3'
require 'logger'
require 'fileutils'

ZFS_POOL=&quot;your_zfs_pool_here&quot;
LOCAL_BACKUP_PATH=&quot;/#{ZFS_POOL}&quot;

# Parse the commandline parameters
ARGV.each do |arg|
  case
  when arg == '--stdout'
    LOG_STDOUT = true
  when arg == '--dry-run'
    DRY_RUN = true
  end
end
LOG_STDOUT = (LOG_STDOUT rescue false) # Set default value to false
DRY_RUN = (DRY_RUN rescue false)       # dto.

# Check which output should be used for logging
if LOG_STDOUT
  # Log to stdout
  $LOG = Logger.new($stdout)
  $LOG.datetime_format = '%H:%M:%S'
else
  # Logfile will not exceed 1 MB
  $LOG = Logger.new('/var/log/backup_rb.log', 0, 1 * 1024 * 1024)
  $LOG.datetime_format = '%d.%m.%y %H:%M:%S'
end

# Kill older processes of this script
pids_to_kill = []
`ps -Al -o pid -o args|grep -e ruby|grep -e #{__FILE__}`.split(&quot;\n&quot;).each do |line|
  other_pid = line.split(&quot; &quot;)[0].to_i
  if other_pid != $$
    pids_to_kill &lt;&lt; other_pid
    `ps -Al -o pid,ppid=MOM -o args|grep &quot;1 rsync&quot;|grep -v grep`.split(&quot;\n&quot;).each do |child_line|
      child_pid = child_line.split(&quot; &quot;)[0].to_i
      pids_to_kill &lt;&lt; child_pid
    end
  end
end

if pids_to_kill.length &gt; 0
  $LOG.info &quot;****** Cleaning up... *******&quot;
  $LOG.info &quot;Killing old backup processes #{pids_to_kill.join(&quot;,&quot;)}&quot;
  `kill -9 #{pids_to_kill.join(&quot; &quot;)}`
end

# Execute a command and store its output
class ExecCmd
  attr_reader <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> utput,:error_output,:cmd,:exec_time

  def initialize(cmd,cmd_id)
    @output = &quot;&quot;
    @error_output = &quot;&quot;
    @exec_time = 0
    @cmd = cmd
    @cmd_id = cmd_id
  end

  def run
    start_time = Time.now
    begin
      $LOG.info &quot;[#{@cmd_id}] Starting command: #{@cmd}...&quot;
      Open3.popen3(@cmd) do |stdin, stdout, stderr|
        @output = stdout.read
        @error_output = stderr.read
      end
    rescue Exception =&gt; e
      @error_output += e.to_s
    ensure
      @exec_time = Time.now - start_time
      $LOG.info &quot;[#{@cmd_id}] Command completed in #{@exec_time} seconds.&quot;
    end
  end

  # Log the stdio and stderr outputs
  def log_results
    $LOG.info &quot;[#{@cmd_id}] #{@cmd}:&quot;
    if @error_output.length &gt; 0
      @error_output.split(&quot;\n&quot;).each { |line| $LOG.error &quot;[#{@cmd_id}]  #{line}&quot; }
    end
    if @output.length &gt; 0
      @output.split(&quot;\n&quot;).each { |line| $LOG.info &quot;[#{@cmd_id}]  #{line}&quot; }
    end
  end

  # Returns false if the command hasn't been executed yet
  def run?
    return @exec_time &gt; 0
  end

  # Returns true if the command was successful.
  def success?
    return @error_output.length == 0
  end
end

# Define for each host which user accounts are being backed up and which files should be excluded
default_excludes = ['.Trash', 'Downloads', 'Desktop', 'Music/iTunes/iTunes Music/Podcasts',
                    'Library/Caches', 'Library/Logs']
# format: hostname =&gt; { username =&gt; [excluded_files] }
HOSTS={ 'host1' =&gt; { 'user1' =&gt; default_excludes },
        'host2' =&gt; { 'user2' =&gt; default_excludes, 'user1' =&gt; default_excludes },
        'host3' =&gt; { 'user2' =&gt; default_excludes + ['Music/iTunes']},
        'host4' =&gt; { 'user3' =&gt; default_excludes }
      }

$LOG.info &quot;****** Backup started... *******&quot;

# Make a ZFS snapshot
snapshot_name = &quot;#{ZFS_POOL}@backup-#{Time.now.strftime('%y-%m-%d_%H:%M')}&quot;
$LOG.info &quot;Creating ZFS snapshot #{snapshot_name}&quot;
`zfs snapshot #{snapshot_name}`

pending_commands = {}
HOSTS.each do |hostname,user_data|
  $LOG.info &quot;Calling #{hostname} ...&quot;
  if Ping.pingecho(hostname)
    user_data.each do |user,excluded_files|
      exclude_file = Tempfile.new(&quot;tempfile&quot;)
      excluded_files.each { |filepath| exclude_file &lt;&lt; filepath &lt;&lt; &quot;\n&quot; }
      exclude_file.close
      user_hostname = &quot;#{user}@#{hostname}&quot;
      $LOG.info &quot;Backing up #{user_hostname} ...&quot;
      local_backup_path = &quot;#{LOCAL_BACKUP_PATH}/#{hostname}/#{user}&quot;
      FileUtils.mkdir(local_backup_path) unless File.exists? local_backup_path
      command = &quot;rsync -#{DRY_RUN ? 'n' : ''}avz --delete --partial --exclude-from=#{exclude_file.path} #{user_hostname}: #{local_backup_path}/&quot;
      rsync = ExecCmd.new(command, user_hostname)
      pending_commands[user_hostname] = rsync
      Thread.new do
        rsync.run
      end
    end
  else
    $LOG.warn &quot;#{hostname} does not respond!&quot;
  end
end

# Wait for the backup processes to complete
while pending_commands.length &gt; 0
  pending_commands.each do |user_hostname, exec_cmd|
    if exec_cmd.run?
      exec_cmd.log_results
      pending_commands.delete(user_hostname)
    end
  end

  if pending_commands.length &gt; 0
    $LOG.info &quot;Still #{pending_commands.length} tasks backing up #{pending_commands.keys.join(', ')}&quot;
    sleep 60
  end
end

$LOG.info &quot;****** Backup complete. *******\n&quot;
</pre>
<h2>What it does</h2>
<p>You can use the command line argumens &#8211;dry-run and &#8211;stdout. The first one will call rsync with the &#8211;dry-run option and the second one will write to stdout instead of a logfile.</p>
<p>On start the script looks for other instances of itself and will kill them and all orphaned rsync child processes.</p>
<p>It will create a ZFS snapshot of the target pool with the current time and date as a label.</p>
<p>Then it will ping all the hosts defined in HOSTS and will construct the rsync command with all the excluded files and the defined users and start a separate thread in which the command will be executed.</p>
<p>Then it will loop until all the rsync tasks have been completed.</p>
<p>The logfile is /var/log/backup_rb.log and looks like this:</p>
<pre class="brush: plain;">
I, [15.10.09 11:44:11#7343]  INFO -- : ****** Cleaning up... *******
I, [15.10.09 11:44:11#7343]  INFO -- : Killing old backup processes 7316,7325,7332,7328,7334
I, [15.10.09 11:44:11#7343]  INFO -- : ****** Backup started... *******
I, [15.10.09 11:44:11#7343]  INFO -- : Creating ZFS snapshot daten@backup-09-10-15_11:44
I, [15.10.09 11:44:11#7343]  INFO -- : Calling host1 ...
I, [15.10.09 11:44:11#7343]  INFO -- : Backing up user2@host1 ...
I, [15.10.09 11:44:11#7343]  INFO -- : [user2@host1] Starting command: rsync -avz --delete --partial --exclude-from=/tmp/tempfile20091015-7343-1hpu6rm-0 user2@host1: /daten/host1/user2/...
I, [15.10.09 11:44:11#7343]  INFO -- : Calling host2 ...
I, [15.10.09 11:44:11#7343]  INFO -- : Backing up user1@host2 ...
I, [15.10.09 11:44:11#7343]  INFO -- : [user1@host2] Starting command: rsync -avz --delete --partial --exclude-from=/tmp/tempfile20091015-7343-1f9jzvu-0 user1@host2: /daten/host2/user1/...
I, [15.10.09 11:44:11#7343]  INFO -- : Calling host3 ...
W, [15.10.09 11:44:16#7343]  WARN -- : host3 does not respond!
I, [15.10.09 11:44:16#7343]  INFO -- : Calling host4 ...
I, [15.10.09 11:44:16#7343]  INFO -- : Backing up user2@host4 ...
I, [15.10.09 11:44:17#7343]  INFO -- : [user2@host4] Starting command: rsync -avz --delete --partial --exclude-from=/tmp/tempfile20091015-7343-yv60ta-0 user2@host4: /daten/host4/user2/...
I, [15.10.09 11:44:17#7343]  INFO -- : Backing up user1@host4 ...
I, [15.10.09 11:44:17#7343]  INFO -- : [user1@host4] Starting command: rsync -avz --delete --partial --exclude-from=/tmp/tempfile20091015-7343-644sq6-0 user1@host4: /daten/host4/user1/...
I, [15.10.09 11:44:17#7343]  INFO -- : Still 4 tasks backing up user1@host2, user1@host4, user2@host4, user2@host1
I, [15.10.09 11:45:17#7343]  INFO -- : Still 4 tasks backing up user1@host2, user1@host4, user2@host4, user2@host1
I, [15.10.09 11:45:41#7343]  INFO -- : [user2@host4] Command completed in 84.087238
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] rsync -avz --delete --partial --exclude-from=/tmp/tempfile20091015-7343-yv60ta-0 user2@host4: /daten/host4/user2/:
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] receiving file list ... done
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Dropbox/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Application Support/SyncServices/Local/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Application Support/SyncServices/Local/admin.syncdb
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Application Support/SyncServices/Local/TFSM/com.apple.Calendars/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Application Support/SyncServices/Local/clientdata/120c2b27e9ab530b442181ced8799e35b30c85cb/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Application Support/SyncServices/Local/conflicts/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Calendars/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Calendars/Calendar Cache
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Calendars/Calendar Sync Changes/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Calendars/FE3DF9D9-8D76-4F44-973A-525E02717BFE.calendar/Info.plist
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Logs/Sync/syncservices.log
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Mail/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Preferences/
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] Library/Preferences/iCalExternalSync.plist
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4]
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] sent 13772 bytes  received 1001023 bytes  13440.99 bytes/sec
I, [15.10.09 11:46:17#7343]  INFO -- : [user2@host4] total size is 64974563109  speedup is 64027.28
I, [15.10.09 11:46:17#7343]  INFO -- : Still 3 tasks backing up user1@host2, user1@host4, user2@host1
I, [15.10.09 11:47:17#7343]  INFO -- : Still 3 tasks backing up user1@host2, user1@host4, user2@host1
</pre>
<h2>Run in crontab</h2>
<p>Finally I added a new entry of the root user crontab with &#8220;crontab -e&#8221; which will start the script every hour.</p>
<pre>0 * * * * /usr/bin/ruby /root/backup.rb</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=106&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2009/10/15/setting-up-my-solaris-server-as-a-centralized-backup-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up my Solaris fileserver (Part 2)</title>
		<link>http://pegolon.wordpress.com/2009/07/13/setting-up-my-solaris-fileserver-part-2/</link>
		<comments>http://pegolon.wordpress.com/2009/07/13/setting-up-my-solaris-fileserver-part-2/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 08:40:23 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[os]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=103</guid>
		<description><![CDATA[To enable mirroring on my two HDDs I tried to follow the steps described at http://darkstar-solaris.blogspot.com/2008/09/zfs-root-mirror.html and http://malsserver.blogspot.com/2008/08/mirroring-resolved-correct-way.html but got a little confused by the different device names. What I needed to do is copy the partition table from the first drive to the second one and then I could attach it to the rpool. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=103&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To enable mirroring on my two HDDs I tried to follow the steps described at http://darkstar-solaris.blogspot.com/2008/09/zfs-root-mirror.html and http://malsserver.blogspot.com/2008/08/mirroring-resolved-correct-way.html but got a little confused by the different device names.</p>
<p>What I needed to do is copy the partition table from the first drive to the second one and then I could attach it to the rpool. The following steps I did as a root user.</p>
<blockquote>
<pre># zpool status

 pool: rpool
 state: ONLINE
 scrub: none requested
config:

 NAME        STATE     READ WRITE CKSUM
 rpool       ONLINE       0     0     0
   c8d0s0    ONLINE       0     0     0

errors: No known data errors</pre>
</blockquote>
<p>Meaning: my first disk is c8d0s0 and it is attached directly to the rpool.</p>
<blockquote>
<pre># format

Searching for disks...done

AVAILABLE DISK SELECTIONS:
 0. <span style="color:#800000;">c8d0</span> &lt;DEFAULT cyl 19454 alt 2 hd 255 sec 63&gt;
 /pci@0,0/pci-ide@9/ide@0/cmdk@0,0
 1. <span style="color:#008000;">c8d1</span> &lt;DEFAULT cyl 19454 alt 2 hd 255 sec 63&gt;
 /pci@0,0/pci-ide@9/ide@0/cmdk@1,0</pre>
</blockquote>
<p>So my second drives name is c8d1. I chose option (1) and used the fdisk command to create a solaris2 partition. Then I quit the format command.</p>
<p>To copy the partition table from the first drive to the second one I used:</p>
<blockquote>
<pre># prtvtoc /dev/rdsk/<span style="color:#800000;">c8d0</span>s2|fmthard -s - /dev/rdsk/<span style="color:#339966;">c8d1</span>s2</pre>
</blockquote>
<p>Then I could force attach the second drive to the rpool:</p>
<blockquote>
<pre># zpool attach rpool <span style="color:#008000;">c8d0</span>s0 <span style="color:#800000;">c8d1</span>s0
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c8d1s0 overlaps with /dev/dsk/c8d1s2

# zpool attach -f rpool <span style="color:#008000;">c8d0</span>s0 <span style="color:#800000;">c8d1</span>s0
Please be sure to invoke installgrub(1M) to make 'c8d1s0' bootable.

# zpool status
 pool: rpool
 state: ONLINE
 scrub: resilver completed after 0h2m with 0 errors on Mon Jul 13 10:16:55 2009
config:

 NAME        STATE     READ WRITE CKSUM
 rpool       ONLINE       0     0     0
   mirror    ONLINE       0     0     0
     c8d0s0  ONLINE       0     0     0
     c8d1s0  ONLINE       0     0     0  4,18G resilvered

errors: No known data errors</pre>
</blockquote>
<p>To make the second drive also bootable I invoked installgrub</p>
<blockquote>
<pre>
# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/<span style="color:#800000;">c8d1</span>s0
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 271 sectors starting at 50 (abs 16115)</pre>
</blockquote>
<p>The next task will be to install the four different 1 TB HDDs I also bought into that Chenbro case and create a zpool for them.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=103&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2009/07/13/setting-up-my-solaris-fileserver-part-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up my Solaris fileserver (Part 1)</title>
		<link>http://pegolon.wordpress.com/2009/07/13/setting-up-my-solaris-fileserver-part-1/</link>
		<comments>http://pegolon.wordpress.com/2009/07/13/setting-up-my-solaris-fileserver-part-1/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 07:43:49 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[os]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=96</guid>
		<description><![CDATA[Finally I had the time (and money to fullfil my long lasting wish to setup my own fileserver running Solaris and ZFS. Since I wanted to use it also as a potential test server for my projects I decided to use a slightly bigger processor. I ordered a BTO system at www.alternate.de with the following [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=96&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finally I had the time (and money <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  to fullfil my long lasting wish to setup my own fileserver running Solaris and ZFS. Since I wanted to use it also as a potential test server for my projects I decided to use a slightly bigger processor. I ordered a BTO system at www.alternate.de with the following configuration:</p>
<ul>
<li>Fan: Arctic Alpine  64 PRO</li>
<li> CPU: AMD X2CV  GE4450E AM2 2300    2000 1MB</li>
<li>Power supply: Corsair CMPSU-400CX   400W ATX2</li>
<li>Case: A+case  Seenium         Black</li>
<li>Mainboard: GiBy GA-M85M-US2H GF8100 RGVSM</li>
<li>1st boot HDD: Samsung  160 GB SAT2 HD161GJ</li>
<li>2nd boot HDD: Maxtor   160 GB SATA STM3160813AS</li>
<li>RAM: D2 2GB  800-5     128&#215;8     tMS</li>
<li>DVD: Lite DH-16D3P        16x AT        Bl  B</li>
</ul>
<p>The first installation of OpenSolaris 2009.06 went quite smoothly but then I had to discover that I am back in tinker land: the onboard network interface was not recognized. After many hours of reinstalling, searching the web and so on (I know why I use a Mac <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  I found this use page of a guy who had the same problems: <a href="http://www.linuxdynasty.org/basic-networking-howto-on-opensolaris.html">http://www.linuxdynasty.org/basic-networking-howto-on-opensolaris.html</a></p>
<p>&#8220;scanpci -v&#8221; returned this in my case:</p>
<blockquote>
<pre>pci bus 0x0000 cardnum 0x0a function 0x00: vendor 0x10de device 0x0760
 nVidia Corporation MCP78S [GeForce 8200] Ethernet
 CardVendor 0x1458 card 0xe000 (Giga-byte Technology, Card unknown)
 STATUS    0x00b0  COMMAND 0x0007
 CLASS     0x02 0x00 0x00  REVISION 0xa2
 BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x00
 BASE0     0xfc008000 SIZE 4096  MEM
 BASE1     0x0000dc00 SIZE 8  I/O
 BASE2     0xfc009000 SIZE 256  MEM
 BASE3     0xfc00a000 SIZE 16  MEM
 BASEROM   0x00000000  addr 0x00000000
 MAX_LAT   0x14  MIN_GNT 0x01  INT_PIN 0x01  INT_LINE 0x0f</pre>
</blockquote>
<p>Since I have a different mainboard with a Geforce 8200 chip I tried to use the latest drivers. After two reinstalls I got it up and running with these steps running as a root user:</p>
<blockquote>
<pre>gunzip nfo-2.6.3.tar.gz
tar -xvf nfo-2.6.3.tar
cd nfo-2.6.3
rm obj Makefile
ln -s Makefile.${KARCH}_${COMPILER} Makefile  ( for me it was ln -s Makefile.amd64_gcc  Makefile )
ln -s ${KARCH} obj ( for me it was ln -s amd64 obj )
rm Makefile.config
ln -s Makefile.config_gld3 Makefile.config
/usr/ccs/bin/make
/usr/ccs/bin/make install
cp nfo.conf /kernel/drv/nfo.conf
./adddrv.sh</pre>
</blockquote>
<p>After these steps a reboot did the trick.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=96&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2009/07/13/setting-up-my-solaris-fileserver-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;m free!</title>
		<link>http://pegolon.wordpress.com/2009/07/02/im-free/</link>
		<comments>http://pegolon.wordpress.com/2009/07/02/im-free/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 18:58:39 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=94</guid>
		<description><![CDATA[After almost 21 years as an employee I decided to take the chance, quit my job as a Senior Software iPhone Developer in Berlin and now I am self-employed. Feels very good to make my own decisions. I am planning to concentrate my contract work on iPhone and Mac software development, Adobe Flex and AIR [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=94&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After almost 21 years as an employee I decided to take the chance, quit my job as a Senior Software iPhone Developer in Berlin and now I am self-employed.</p>
<p>Feels very good to make my own decisions. I am planning to concentrate my contract work on iPhone and Mac software development, Adobe Flex and AIR and finally Ruby and Ruby on Rails. The contract situation looks very promising at the moment, so if everything works fine I can also work half of the time on my own iPhone application idea which pinched me for some time now.</p>
<p>As a result of being my own boss I already booked the ticket, flight and hotel for the upcoming Adobe MAX conference in L.A. in October. Since I visited the MAX conference in 2007 in Barcelona and have to think about my findings there all the time I thought it would be a good idea to get new insights into Adobe plans for the future.</p>
<p>On the other hand I already ordered tons of new hardware <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I am typing this article on my new MacBook Pro 13&#8243; with a 2.53 GHz processor. It arrived yesterday after I changed my order from the 250 GB HDD to a 320 GB one. They seem to have trouble with the huge success of this model. I&#8217;m planning to exchange the HDD with an OCZ Vertex 120 GB version and replace the superdrive with a OptiBay and a 500 GB HDD for in-time Time Machine backups and storing bigger files like movies. The setting is complete with a shiny new 24&#8243; Cinema LED display and the bluetooth Mighty Mouse and keyboard.</p>
<p>I installed Snow Leopard from the DVD I got at the WWDC and it works very great although I have to live without 1password at the moment and Flex Builder wants to install Rosetta during install which I prefer not to do.</p>
<p>Time will tell if I will switch back to regular Leopard before I have full tool support.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=94&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2009/07/02/im-free/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>
	</item>
		<item>
		<title>Low power-consuming fileserver barebone</title>
		<link>http://pegolon.wordpress.com/2009/01/25/low-power-consuming-fileserver-barebone/</link>
		<comments>http://pegolon.wordpress.com/2009/01/25/low-power-consuming-fileserver-barebone/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 07:46:56 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=79</guid>
		<description><![CDATA[A couple of days ago Mr. Toto mentioned this barebone on Twitter. It has an Intel Atom 330 Dualcore CPU with hyperthreading and 5 HDD slots built-in: Equiped with 1 GB RAM it will cost £372 (appr. 394,- €) including VAT and shipping to Germany. That&#8217;s almost double the price of the hand-built system and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=79&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago <a href="http://twitter.com/mrtoto">Mr. Toto</a> mentioned this <a href="http://www.tranquilpc-shop.co.uk/acatalog/BAREBONE_SERVERS.html">barebone</a> on Twitter. It has an Intel Atom 330 Dualcore CPU with hyperthreading and 5 HDD slots built-in:</p>
<p><img class="alignleft size-full wp-image-80" title="linux300" src="http://pegolon.files.wordpress.com/2009/01/linux300.jpg?w=300&#038;h=241" alt="linux300" width="300" height="241" /></p>
<p>Equiped with 1 GB RAM it will cost £372 (appr. 394,- €) including VAT and shipping to Germany. That&#8217;s almost double the price of the<a href="http://pegolon.wordpress.com/2009/01/17/building-my-zfs-fileserver/"> hand-built system</a> and I don&#8217;t know if Solaris will run perfectly on it&#8230;</p>
<p><img class="alignnone size-full wp-image-81" title="Shopping cart" src="http://pegolon.files.wordpress.com/2009/01/bild-1.png?w=596&#038;h=204" alt="Shopping cart" width="596" height="204" /></p>
<p>Maybe someone else has already tried this out?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=79&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2009/01/25/low-power-consuming-fileserver-barebone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>

		<media:content url="http://pegolon.files.wordpress.com/2009/01/linux300.jpg" medium="image">
			<media:title type="html">linux300</media:title>
		</media:content>

		<media:content url="http://pegolon.files.wordpress.com/2009/01/bild-1.png" medium="image">
			<media:title type="html">Shopping cart</media:title>
		</media:content>
	</item>
		<item>
		<title>Building my ZFS-Fileserver</title>
		<link>http://pegolon.wordpress.com/2009/01/17/building-my-zfs-fileserver/</link>
		<comments>http://pegolon.wordpress.com/2009/01/17/building-my-zfs-fileserver/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 11:50:21 +0000</pubDate>
		<dc:creator>pegolon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://pegolon.wordpress.com/?p=68</guid>
		<description><![CDATA[After a good amount of time I have come up with my preferred hardware setup for my fileserver. I have a couple of old harddrives laying around so I won&#8217;t need them. I also don&#8217;t want to build in a CD-ROM drive permanently. I will use an external one for setup. The German PC Builder [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=68&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After a good amount of time I have come up with my preferred hardware setup for my fileserver. I have a couple of old harddrives laying around so I won&#8217;t need them. I also don&#8217;t want to build in a CD-ROM drive permanently. I will use an external one for setup.</p>
<p>The German PC Builder site of <a href="http://www.alternate.de/html/pcbuilder/detailView.html?cn=1">Alternate</a> is very good and has some nice checks built-in to prevent an incompatible setup. I looked always for the cheapest components.</p>
<h2>CPU</h2>
<p>AMD Sempron64 LE-1250 Boxed, OPGA, &#8220;Sparta&#8221;</p>
<p>with bundled cooling system. Although it&#8217;s single-core it can run in 64-Bit mode and should not get too warm.</p>
<pre style="text-align:right;">30,99 €</pre>
<h2>Power</h2>
<p>Zalman ZM360B-APS</p>
<p>With 4 S-ATA power connectors.</p>
<pre style="text-align:right;">49,99 €</pre>
<h2 style="text-align:left;">Case</h2>
<p style="text-align:left;">Sharkoon Rebel9 Economy-Edition</p>
<p style="text-align:left;">Plenty of space for 9 external 5.25&#8243; drives in a midi sized tower(200 mm x 435 mm x 486 mm).</p>
<pre style="text-align:right;">41,99 €</pre>
<h2 style="text-align:left;">Case cooling</h2>
<p style="text-align:left;">Arctic-Cooling AF8025 PWM</p>
<pre style="text-align:right;">(3,99 x 2) 7,98 €</pre>
<h2>Mainboard</h2>
<p style="text-align:left;">Asrock N61P-S</p>
<p style="text-align:left;">It has 4 S-ATA connectors on a NVIDIA nForce6. The build-in LAN is only 100-MBit, but I want to connect the fileserver via PowerLAN so that should be enough. Although it is not listed on Sun&#8217;s Solaris hardware compatibility list I try my luck with it.</p>
<pre style="text-align:right;">36,49 €</pre>
<h2>RAM</h2>
<p style="text-align:left;">Crucial DIMM 2 GB DDR2-667</p>
<p style="text-align:left;">The single-core CPU can only handle this type of RAM, but I guess that will be sufficient.</p>
<pre style="text-align:right;">19,79 €</pre>
<h2 style="text-align:left;">Complete</h2>
<p style="text-align:left;">That&#8217;s it for the bare system.</p>
<pre style="text-align:right;"><strong><span style="color:#800000;">187,14 €</span></strong></pre>
<p style="text-align:left;">From the site:</p>
<pre style="text-align:left;"><img class="alignleft size-full wp-image-71" title="fileserver" src="http://pegolon.files.wordpress.com/2009/01/fileserver.png?w=794&#038;h=606" alt="fileserver" width="794" height="606" /></pre>
<p style="text-align:right;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pegolon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pegolon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pegolon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pegolon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pegolon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pegolon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pegolon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pegolon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pegolon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pegolon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pegolon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pegolon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pegolon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pegolon.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pegolon.wordpress.com&amp;blog=1253244&amp;post=68&amp;subd=pegolon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pegolon.wordpress.com/2009/01/17/building-my-zfs-fileserver/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f249caf73aa79024d9e6e38d36497475?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pegolon</media:title>
		</media:content>

		<media:content url="http://pegolon.files.wordpress.com/2009/01/fileserver.png" medium="image">
			<media:title type="html">fileserver</media:title>
		</media:content>
	</item>
	</channel>
</rss>
