<?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>Off you go... into the purple yonder! &#187; Sysadmin</title>
	<atom:link href="http://ward.vandewege.net/blog/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://ward.vandewege.net/blog</link>
	<description></description>
	<lastBuildDate>Sun, 25 Dec 2011 19:02:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Migrate MoinMoinWiki to Redmine</title>
		<link>http://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/</link>
		<comments>http://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 19:39:23 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=654</guid>
		<description><![CDATA[I had a few old MoinMoin installs that were due for an upgrade, and I wanted to migrate them to Redmine. I found a migration script at norwinter.com, which I improved a bit. It will handle wiki pages with full &#8230; <a href="http://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a few old <a href="http://moinmo.in">MoinMoin</a> installs that were due for an upgrade, and I wanted to migrate them to <a href="http://redmine.org">Redmine</a>.</p>
<p>I found a <a href="http://www.norwinter.com/2009/08/02/migrate-moinmoinwiki-to-redmine/">migration script</a> at norwinter.com, which I improved a bit. It will handle wiki pages with full history as well as attachments. It won&#8217;t preserve who committed revisions, however &#8211; that is hardcoded in the script. So, this is still a hack. </p>
<p>Usage instructions:</p>
<p>a) copy your MoinMoinWiki data/pages directory to the server that runs your redmine install<br />
b) put the migrate_from_moinmoin.rake script in lib/tasks/ in your Redmine install<br />
c) edit the migrate_from_moinmoin.rake script, replace both instances of YOUR@EMAIL.ADDRESS<br />
d) run <i>rake redmine:migrate_from_moinmoin RAILS_ENV=&#8221;production&#8221;</i><br />
e) provide a unique redmine project id and the path to your MoinMoinWiki data/pages directory</p>
<p>And here is my version of <a href="/blog/wp-content/uploads/2011/11/migrate_from_moinmoin.rake">migrate_from_moinmoin.rake</a>. </p>
<p>This script worked well enough for me to import MoinMoinWiki version 1.5.7 to Redmine 1.2.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2011/11/migrate-moinmoinwiki-to-redmine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>grub rescue commands</title>
		<link>http://ward.vandewege.net/blog/2011/08/grub-rescue-commands/</link>
		<comments>http://ward.vandewege.net/blog/2011/08/grub-rescue-commands/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 01:30:18 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=634</guid>
		<description><![CDATA[I wasted some time on Friday trying to get a machine with grub 2 installed to boot. The machine booted into Grub&#8217;s rescue mode. Grub 2&#8242;s rescue mode is nice, but not exactly intuitive (no &#8216;help&#8217; or &#8216;?&#8217; command), and &#8230; <a href="http://ward.vandewege.net/blog/2011/08/grub-rescue-commands/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wasted some time on Friday trying to get a machine with grub 2 installed to boot. </p>
<p>The machine booted into Grub&#8217;s rescue mode. Grub 2&#8242;s rescue mode is nice, but not exactly intuitive (no &#8216;help&#8217; or &#8216;?&#8217; command), and documentation for it is apparently not easily found via Google.</p>
<p>This is what was eluding me for a while:</p>
<pre>
In rescue mode, only the insmod, ls, set, and unset commands are
normally available. If you end up in rescue mode and do
not know what to do, then see "GRUB only offers a rescue shell."
</pre>
<p>That&#8217;s from the Grub manual at <a href="http://www.gnu.org/software/grub/manual/grub.html#Commands">gnu.org</a>. </p>
<p>The steps involved in recovery are documented <a href="http://www.gnu.org/software/grub/manual/grub.html#GRUB-only-offers-a-rescue-shell">in the same manual</a>. Basically you need to set the prefix and root variables, and then insmod the &#8216;normal&#8217; module and run it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2011/08/grub-rescue-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>disk, disk, disk</title>
		<link>http://ward.vandewege.net/blog/2011/07/disk-disk-disk/</link>
		<comments>http://ward.vandewege.net/blog/2011/07/disk-disk-disk/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 14:13:50 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=496</guid>
		<description><![CDATA[I started adding 165 TB of disk to one of our clusters today. This is what that looks like &#8211; 55 three TB disks: The packaging was not too great; while all disks were well packaged individually, the big boxes &#8230; <a href="http://ward.vandewege.net/blog/2011/07/disk-disk-disk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I started adding 165 TB of disk to one of our clusters today. This is what that looks like &#8211; 55 three TB disks:</p>
<p><a href='/blog/wp-content/photos/img_3317.jpg' title='165 TB'><img src='/blog/wp-content/photos/thumb_img_3317.jpg' alt='165 TB' width='130' height='97' class='pp_empty' /></a></p>
<p>The packaging was not too great; while all disks were well packaged individually, the big boxes that contained the individual drive boxes were flimsy. As a consequence, one of the disks got rather damaged (the one on the right):</p>
<p><a href='/blog/wp-content/photos/img_3318.jpg' title='damaged disk'><img src='/blog/wp-content/photos/thumb_img_3318.jpg' alt='damaged disk' width='130' height='97' class='pp_empty' /></a></p>
<p>I don&#8217;t know what it got hit with, but it must have been a pretty serious blow. The aluminium enclosure of the drive is severely dented and even cracked; the white line in the image below is an actual crack in the metal:</p>
<p><a href='/blog/wp-content/photos/IMG_3327.JPG' title='cracked disk'><img src='/blog/wp-content/photos/thumb_IMG_3327.JPG' alt='cracked disk' width='130' height='97' class='pp_empty' /></a></p>
<p>Back in October 2009 I added 130 TB of disk to another cluster, which looked like this, prior to install:</p>
<p><a href='/blog/wp-content/photos/2009_10_09_10.07.22.jpg' title=130TB, big'><img src='/blog/wp-content/photos/thumb_2009_10_09_10.07.22.jpg' alt='130TB' width='97' height='130' class='pp_empty' /></a></p>
<p>That was 65 times <a href="http://www.wdc.com/en/products/products.asp?driveid=610">WD2002FYPS</a>. </p>
<p>So this time around &#8211; almost 18 months later &#8211; we get 27% more capacity using 15% fewer drives. Got to love the computer industry and the progress it makes.</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2011/07/disk-disk-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>idle power draw of modern Opteron CPUs</title>
		<link>http://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/</link>
		<comments>http://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 22:05:30 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Environment]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=599</guid>
		<description><![CDATA[I&#8217;ve been curious for a while about how much power Opteron CPUs draw when idle, so I set aside a bit of time to do some measurements. I used a Supermicro 1U system with redundant power supply. The motherboard model &#8230; <a href="http://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been curious for a while about how much power Opteron CPUs draw when idle, so I set aside a bit of time to do some measurements. I used a Supermicro 1U system with redundant power supply. The motherboard model is <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=H8DGU-F&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">H8DGU-F</a>. The system has 32GB of DDR3 ECC ram, and two <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=x25-m&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">Intel X25-M</a> 120GB SSDs. There are two <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=opteron%206128&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">Opteron 6128</a> CPUs installed. These Opterons have 8 cores each, and they run at 2.0GHz. These are the CPU power specs:</p>
<table>
<tr>
<td width="200">&nbsp;&nbsp;Average CPU Power</td>
<td align="right">80W</td>
</tr>
<tr>
<td>&nbsp;&nbsp;Thermal Design Power (TDP)</td>
<td align="right">115W</td>
</tr>
</table>
<p>The &#8216;Average CPU Power&#8217; is based on &#8216;average&#8217; use, which is explained <a href="http://en.wikipedia.org/wiki/Average_CPU_power">on Wikipedia</a>. </p>
<p>According to Wikipedia, the <a href="http://en.wikipedia.org/wiki/Thermal_design_power">Thermal Design Power</a> is the maximum power consumption for thermally significant periods running worst-case non-synthetic workloads (cf. <a href="http://en.wikipedia.org/wiki/CPU_power_dissipation">this article</a>). If we assume that the bulk of the electrical power consumed by a CPU is converted into waste heat, then the TDP can be a reasonable approximation for the amount of electrical power a CPU would consume under a worst-case, real-world load.</p>
<p>I used cpuburn to generate such a load. There was no IO load on the system during the tests. I measured power draw with an off-the-shelf <a href="http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&#038;keywords=opteron%206128&#038;tag=offyougointot-20&#038;index=aps&#038;linkCode=as2&#038;camp=1789&#038;creative=9325">Kill-a-watt</a>, so these results should be taken with a grain of salt.</p>
<table>
<tr>
<td align="right">&nbsp;&nbsp;16 cores</td>
<td>idle</td>
<td>145W (153VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;8 cores</td>
<td>loaded on 1 cpu</td>
<td>215W (221VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;8 cores</td>
<td width="200">loaded spread over 2 cpus</td>
<td>235W (243VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;14 cores</td>
<td>loaded</td>
<td>277W (285VA)</td>
</tr>
<tr>
<td align="right">&nbsp;&nbsp;16 cores</td>
<td>loaded</td>
<td>290W (297VA)</td>
</tr>
</table>
<p>The data indicates that the idle vs. full load power consumption difference for one CPU is 70 to 75W.</p>
<p>If we assume the power consumption under full load is 115W (the TDP for the processor), then idle power consumption would be 40 to 45W per CPU. That would put idle power consumption at 35-39% of its TDP for this particular CPU.</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2011/04/idle-power-draw-of-modern-opteron-cpus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>compression</title>
		<link>http://ward.vandewege.net/blog/2010/11/compression/</link>
		<comments>http://ward.vandewege.net/blog/2010/11/compression/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 15:12:15 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=591</guid>
		<description><![CDATA[Before: -rw-r--r-- 1 root root 1.1G 2010-10-31 20:19 10125-127-2010-10.error After: -rw-r--r-- 1 root root 11M 2010-10-31 20:19 10125-127-2010-10.error.bz2 Bzip2 reduced the file to 1% of its original size. Not bad!]]></description>
			<content:encoded><![CDATA[<p>Before:</p>
<pre>
-rw-r--r-- 1 root  root  1.1G 2010-10-31 20:19 10125-127-2010-10.error
</pre>
<p>After:</p>
<pre>
-rw-r--r-- 1 root  root   11M 2010-10-31 20:19 10125-127-2010-10.error.bz2
</pre>
<p>Bzip2 reduced the file to 1% of its original size. Not bad!</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2010/11/compression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>64K hours</title>
		<link>http://ward.vandewege.net/blog/2010/10/64k-hours/</link>
		<comments>http://ward.vandewege.net/blog/2010/10/64k-hours/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 16:20:05 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=584</guid>
		<description><![CDATA[Some disks last a long time. This is an old IBM IDE drive (IC35L040AVVA07-0). smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART Self-test log structure revision &#8230; <a href="http://ward.vandewege.net/blog/2010/10/64k-hours/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some disks last a long time. This is an old IBM IDE drive (IC35L040AVVA07-0).</p>
<pre>
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%        66         -
# 2  Extended offline    Completed without error       00%     65434         -
# 3  Extended offline    Completed without error       00%     65266         -
</pre>
<p>Interestingly, the Power_On_Hours field did not wrap. Bug in smartctl? Bug in the drive firmware?</p>
<pre>
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   095   095   060    Pre-fail  Always       -       458761
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       210
  3 Spin_Up_Time            0x0007   105   105   024    Pre-fail  Always       -       160 (Average 154)
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       27
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   111   111   020    Pre-fail  Offline      -       43
  9 Power_On_Hours          0x0012   091   091   000    Old_age   Always       -       65616
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       27
192 Power-Off_Retract_Count 0x0032   099   099   050    Old_age   Always       -       1387
193 Load_Cycle_Count        0x0012   099   099   050    Old_age   Always       -       1387
194 Temperature_Celsius     0x0002   189   189   000    Old_age   Always       -       29 (Lifetime Min/Max 21/39)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2010/10/64k-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nagios, mdadm and snmp</title>
		<link>http://ward.vandewege.net/blog/2009/11/nagios-mdadm-and-snmp/</link>
		<comments>http://ward.vandewege.net/blog/2009/11/nagios-mdadm-and-snmp/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 20:47:22 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=510</guid>
		<description><![CDATA[I found this script while looking for a simple script to monitor mdadm arrays. The script is fine, but it has a subtle bug &#8211; it will never report an error because the &#8211;detail parameter is missing in the call &#8230; <a href="http://ward.vandewege.net/blog/2009/11/nagios-mdadm-and-snmp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I found <a href="http://blog.jasper.es/index.php?url=archives/4-nagios-and-swraid.html">this script</a> while looking for a simple script to monitor mdadm arrays. The script is fine, but it has a subtle bug &#8211; it will never report an error because the &#8211;detail parameter is missing in the call to mdadm. I modified the script a bit, like so:</p>
<pre>
#!/bin/sh
# (c) 2008 Jasper Spaans <j @jasper.es>

worst=0
msg=""

for dev in /dev/md?* ; do \
  mdadm --misc -t --detail $dev >/dev/null
  status=$?
  if [ $status == 0 ]; then
    msg="${msg} ${dev}: ok"
  elif [ $status == 1 ] ; then
    if [ worst != 2 ] ; then
      worst=1
    fi
    msg="${msg} ${dev}: degraded"
  elif [ $status == 2 ] ; then
    worst=2
    msg="${msg} ${dev}: degraded - unusable"
  fi
done

echo "mdadm:$msg"
exit $worst
</j></pre>
<p>which I saved as /usr/local/bin/check-mdadm.sh.</p>
<p>Add in a bit of snmpd.conf config (and set up sudo accordingly, of course):</p>
<pre>
...
exec   mdadm /usr/bin/sudo /usr/local/bin/check-mdadm.sh
</pre>
<p>and a small script on the nagios side (/usr/local/bin/nagios-check-mdadm):</p>
<pre>
#!/bin/sh

SNMP=`snmpwalk -v1 -c YOUR-PUBLIC $1 extOutput |grep mdadm`
TMP1=`echo $SNMP |grep degraded`
TMP2=`echo $SNMP |sed -e 's/^.*mdadm: //'`

if [ "$TMP1" = "" ]; then
  echo "OK: $TMP2"
  return 0
else
  echo "ERROR: $TMP2"
  return 2
fi
</pre>
<p>add a bit of nagios config:</p>
<pre>
define command {
       command_name check_mdadm
       command_line /usr/local/bin/nagios-check-mdadm $HOSTADDRESS$
}
</pre>
<pre>
define service {
       use      defaults
       name     check_mdadm
       description   MDADM
       check_command check_mdadm
}
</pre>
<p>And voila, nagios notifications when disks fall out of the array.</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2009/11/nagios-mdadm-and-snmp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>a new home server</title>
		<link>http://ward.vandewege.net/blog/2009/09/a-new-home-server/</link>
		<comments>http://ward.vandewege.net/blog/2009/09/a-new-home-server/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 03:01:59 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=480</guid>
		<description><![CDATA[I&#8217;ve been running an old Shuttle with a 2.4GHz celeron CPU, 512MB of ram and two 500GB disks in raid-1 as home server for the past 5 years or so. Well, I upgraded the disks in February 2008, before that &#8230; <a href="http://ward.vandewege.net/blog/2009/09/a-new-home-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running an old Shuttle with a 2.4GHz celeron CPU, 512MB of ram and two 500GB disks in raid-1 as home server for the past 5 years or so. Well, I upgraded the disks in February 2008, before that it had 2x 200GB in raid-1. The thing has no UPS and runs in the closet here at home. And yet:</p>
<pre>
13:40:34 up 569 days, 17:04,  2 users,  load average: 1.26, 0.94, 0.45
</pre>
<p>Yeah, home power is pretty reliable around here.</p>
<p>This machine serves as the central network storage for our home, and I also use it to back up a bunch of servers that live at a nearby colo facility, with the rather fantastic <a href="http://backuppc.sf.net">BackupPC</a>. The Shuttle has served well over the years but it is getting a bit old &#8211; I was starting to expect it to fail. Its power draw is rather high: 78W while idle (that&#8217;s after applying all of powertop&#8217;s suggestions), and a whopping 100W while doing heavy disk activity. </p>
<p>I was running out of disk space again, so I bought two 1TB &#8216;green&#8217; WD drives (WD10EADS-00L) that are rated at 5.4W active, 2.8W idle, and 0.4W standby/sleep.</p>
<p>Next &#8211; a replacement for the Shuttle. First I looked at a <a href="http://www.qnap.com/pro_detail_feature.asp?p_id=122">QNAP TS-219p</a> which is a rather awesome little NAS device. It&#8217;s based on Marvell&#8217;s Kirkwood ARM core, which is the same as the one used in the <a href="http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp">Sheevaplug</a>, clocked at 1.2GHz. This thing is pretty fast. Its power specs are also impressive: </p>
<pre>
Sleep mode: 5W
In operation: 21W (with 2 x 500GB HDD installed)
</pre>
<p>I was of course looking to <a href="http://www.cyrius.com/debian/kirkwood/qnap/ts-219/">run Debian on it</a>, which is perfectly possible. People like the firmware that the thing comes with, but it&#8217;s proprietary so I&#8217;d rather not use that. Plus, I need to be able to run BackupPC.</p>
<p>The major downside is price &#8211; the TS-219P costs about $400, without disks. Since the Sheevaplug costs about $100, I would have thought a price in the $200-250 range for the TS-219P would have been reasonable.</p>
<p>Meanwhile I came across some really good NAS reviews over at <a href="http://www.smallnetbuilder.com/content/view/85/93/">SmallNetBuilder</a>, and in particular their <a href="http://www.smallnetbuilder.com/component/option,com_nas/Itemid,190/task,guide/chart,13/">price/performance NAS chart</a>.</p>
<p>Looking at that chart, the <a href="http://en.wikipedia.org/wiki/MSI_Wind_PC">MSI Wind PC</a> performance is pretty much on par with the TS-219P, for a fraction of the price. Extra bonus: it does not come with proprietary software preinstalled, because the Wind is really a bare-bones PC. The Wind has one 3.5&#8243; bay, and one 5.15&#8243; bay. It also has an on-board CF adapter. It has a dual-core Intel Atom 230 (1.6GHz).</p>
<p>I purchased </p>
<pre>
$134.99    MSI Wind PC
 $26.99    G.SKILL 2GB 200-Pin DDR2 SO-DIMM DDR2 533
 $43.99    Transcend 16GB Compact Flash (CF) Flash Card Model TS16GCF133
  $9.99    StarTech BRACKET Metal 3.5" to 5.25" Drive Adapter Bracket

Total: $215.96 + shipping
</pre>
<p>The drive bay adaptor turned out to be not only severely overpriced, but also not practical for the Wind &#8211; I had to drill a few holes in the damn thing to make the second hard drive fit in the Wind. Don&#8217;t buy this kind, or don&#8217;t pay $10 for it!</p>
<p>I installed Debian on the CF card (leaving it read-only during normal operation) and use the two disks purely for data &#8211; in raid-1 of course. If I did this again I&#8217;d buy a smaller CF card &#8211; 8GB would be plenty, even 4GB would be enough for the non-volatile bits of /.</p>
<p>Power use, as tested: idle 27W, with heavy disk activity 33W. In other words, this will take 50-70W off our household power budget, which should work out to a savings of $7 to $10/month.</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2009/09/a-new-home-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>capistrano, svn and webserver timeouts</title>
		<link>http://ward.vandewege.net/blog/2009/07/capistrano-svn-and-webserver-timeouts/</link>
		<comments>http://ward.vandewege.net/blog/2009/07/capistrano-svn-and-webserver-timeouts/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 15:54:34 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[chunk delimiter was invalid]]></category>
		<category><![CDATA[mod_dave]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[timeouts]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=475</guid>
		<description><![CDATA[A customer reported problems with capistrany deploys that would just die like this: ** [XXX.XXX.XXX :: err] svn: REPORT request failed on '/!svn/vcc/default' ** svn: REPORT of '/!svn/vcc/default': Chunk delimiter was invalid (http://XXX.XXX.XXX) command finished After disabling gzip compression on &#8230; <a href="http://ward.vandewege.net/blog/2009/07/capistrano-svn-and-webserver-timeouts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A customer reported problems with capistrany deploys that would just die like this:</p>
<pre>
 ** [XXX.XXX.XXX :: err] svn: REPORT request failed on '/!svn/vcc/default'
 ** svn: REPORT of '/!svn/vcc/default': Chunk delimiter was invalid (http://XXX.XXX.XXX)
    command finished
</pre>
<p>After disabling gzip compression on the server for text/xml documents, the error became</p>
<pre>
 ** [XXX.XXX.XXX :: err] svn: REPORT request failed on '/!svn/vcc/default'
 ** svn: REPORT of '/!svn/vcc/default': Could not read response body: connection was closed by server (http://XXX.XXX.XXX)
</pre>
<p>The server side logs said:</p>
<pre>
[Fri Jul 03 10:53:57 2009] [error] [client XX.XX.XX.XX] Provider encountered an error while streaming a REPORT response.  [500, #0]
[Fri Jul 03 10:53:57 2009] [error] [client XX.XX.XX.XX] A failure occurred while driving the update report editor  [500, #190004]
</pre>
<p>Googling was not very helpful &#8211; there are many reports of these errors going back years, and many different solutions, none of which applied to my setup. In general, these errors seem to mean that there was some sort of network problem.</p>
<p>I tried to reproduce the problem by running the offending svn command manually. Out of hundreds of tries, I only managed to make it fail like that just once. And yet running cap deploy, which in turn calls the svn command, it would happen much more often.</p>
<p>I finally tracked this down to an agressive send/receive timeout in Apache&#8217;s config. It was set to 3 seconds to prevent too many inactive connections from taking up server resources. Apparently the subversion client sometimes takes a while to get back to the http server its talking to &#8211; in this particular situation when run via capistrano, more than 3 seconds. So the server would disconnect the svn client, which would then just fall over with that obscure error message.</p>
<p>In other words, check your server timeouts if you see this kind of intermittent error&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2009/07/capistrano-svn-and-webserver-timeouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>df and zettabytes</title>
		<link>http://ward.vandewege.net/blog/2009/06/df-and-zettabytes/</link>
		<comments>http://ward.vandewege.net/blog/2009/06/df-and-zettabytes/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 02:35:19 +0000</pubDate>
		<dc:creator>ward</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[/]]></category>
		<category><![CDATA[df]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[slash]]></category>
		<category><![CDATA[zettabyte]]></category>

		<guid isPermaLink="false">http://ward.vandewege.net/blog/?p=458</guid>
		<description><![CDATA[This is a very confused filesystem. But check it out &#8211; df supports zettabytes! # df -h Filesystem Size Used Avail Use% Mounted on /dev/md0 19G -64Z 22G 101% / Surprisingly, the machine is up and runs just fine.]]></description>
			<content:encoded><![CDATA[<p>This is a very confused filesystem. But check it out &#8211; df supports zettabytes!</p>
<pre>
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0               19G  -64Z   22G 101% /
</pre>
<p>Surprisingly, the machine is up and runs just fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://ward.vandewege.net/blog/2009/06/df-and-zettabytes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

