This article is a continuation/update to my article:
Building a powerful, cheap and silent Linux NAS and HTPC server.
UPDATE: Now contains a section on converting from Raid 5 to Raid 6.
Heavy lightning and rain in Copenhagen killed my server
On the 2 of July 2011 Copenhagen had a very heavy storm with 150mm of rain falling in less than three hours and the Danish Meteorological Institute (DMI) recorded 18,602 lightning strikes in the same period, see cphpost.dk [english]. Beside flooding the basement and destroying old papers and notes the lightning also killed of my newly build server and my old DD-WRT modded WRT54GL router. Now a month later I have bought most of the components to rebuild the server and a new Asus RT-N56U gigabit router.
The insurance company investigated the hardware and found it to completely wasted, but I had the option to by back my hard drives, so I could try to recover the data. Luckily my hard drives were all intact and I could rebuild my server with new hardware.
Updated hardware list
The list is still based on the guide Silent Home Server Build Guide [www.silentpcreview.com], but now with an updated motherboard and CPU.
- Lian Li PC-Q08A (750DKK = 145USD)
This Mini-itx enclosure has 6 internal 3.5” bays and is rated as very quite in several reviews. I can now add it is only really quite if you under voltage the fans a bit.
- Zotac H67-ITX-C-E B3 WIFI S-1155 Mini-ITX (735 DKK = 142USD)
This little mini-ITX wonder has 6 sata channels (which is one more than the the Zotac G43-ITX), USB 3 ports, support for the newest Intel Core processors, HDMI and displayport out and dual antenna WIFI. It is a upgraded version of the Zotac G43-ITX I bought the first time I build this server.
- Intel Core I5 2500K 3.30GHZ 6MB S-1155 (1160 DKK = 224 USD)
Eventhough I could easily have done with less I went for this quad core processor. It has been celebrated highly on various forums for it performance and pricing – especially when overclock (which I will not do for this build). This processor can easily handle the mundane tasks of serving ssh, web and software raid and on the long run do transcoding or gameserver hosting.
- Corsair 4GB DDR3 XMS3 PC10600 1333MHZ (2X2GB) (215 DKK = 42 USD)
I could do with 2GB, but the motherboard only has 2 slots, so I would rather upgrade now than later.
- Scythe Shuriken S-1155/1156/1366/AM3 (200 DKK = 39 USD)
Since noise is an issue for me I could not handle the boxed Intel cooler and decided on this low profile PWM cooler.
- CoolerMaster Silent Pro M500 (455 DKK = 88 USD)
I know from my previous build that this power supply is very quite as it was also reported on www.silentpcreview.com
- 4 x Green WD10EARS (450DKK = 79USD per disk)
I wanted to make a raid 5, with one spare leaving me 2TB usable space. These disks should not use to much power and be reasonable quiet.
- One 2.5” hard drive for the OS – I had an old 40GB SATA model I could use, but if I haven’t had this I would probably by a cheap 40GB SSD – just to avoid bottlenecking the server now when all the other components are so powerful.
Recovering the Linux Software raid on the motherboard
Luckily my hard disks survived and I had prepared myself to recover the raid system on the disks using the commands below, but it turned out even more easy than I expected. Since I have used Linux software raid and not some proprietary card I had to replace the Debian installer (and most other Linux installers) automatically discovered my softwareraid and assembled it by it self – completely hassle free.
If this had not worked I would used mdadm to examine the superblock on one of the disks and used this to recover the raid, see:
Recovering mdadm superblocks [www.linuxquestions.org]
mdadm --examine /dev/sda
Then use the listed UUID from the disk to assemble the raid onto the device md0
mdadm --assemble /dev/md0 --uuid=<UUID>
NEW – Converting a RAID 5 to a RAID 6 setup
Up until recently I was using 4 disks in a RAID 5 + 1 hot spare setup. This meant that if I experienced a disk failure the hot spare would immediately start to rebuild on the hot spare. This however leaves the disk system in a critical system where one more disk failure would destroy all the data. Using the same 4 disks it was also possible to use a RAID 6 setup which has dual parity data compared to RAID 5. This means that I could have two disk failures and still be good until I had installed new disk and started to rebuild on those. The internet is littered with reports of pros and cons of different RAID setups – and one often heard is the penalty on the CPU or RAID card is often mentioned as a disadvantage of a RAID 6 setup. Happily I can report that using a the the quad cored Intel Core I5 2500K 3.30GHZ – this is not an issue by any means.
Converting a RAID 5 to a RAID 6 setup with a Linux software raid is quite easy especially since I already have a spare I can use for the extra parity data. Below is the command I used to convert my raid. The backup file is located on a separate hard disk (the OS disk) and is used in the case that a powerloss causes problems during the upgrade.
madm --grow /dev/md0 --raid-devices 4 --level 6 --backup-file=/root/md0-backup-file.bak
and the process can be followed by any of these commands:
mdadm --detail /dev/md0 cat /proc/mdstat
Finally the last thing I had to do was to edit my mdadm.conf with the path /etc/mdadm/mdadm.conf (On debian), such that the line “spares=1” changed to “spares=0”.
To fully support the built in graphics capabilities on the 2500K CPU I had to upgrade my installation from a Debian Squeeze to a Debian Wheezy (This is “testing” at the moment). I made a clean reinstall on the 2.5” disk and the graphics works great in all its 1920×1080 on my HDTV through the HDMI port. Additionally the onboard WIFI adapters is also recognized and I used this for a while before moving into a cabled place. In case somebody is curious on how to set this up:
[root@kelvin ~][14:57]# tail -12 /etc/network/interfaces auto wlan0 iface wlan0 inet static wpa-ssid MY-SSID wpa-psk MY-password # static ip settings address 192.168.2.160 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.1 dns-nameservers 188.8.131.52, 184.108.40.206