Introduction: Cheap, Silent and Efficent Home File Server

The goal
Replace an aging file server, running a 800MHz P3 processor, with a reliable, cheap and quiet server that does not waste power.  In addition I wanted to add power backup as I have previously been forced to restore a backup after a power outage corrupted the drive.

13/1/13  Update:   This project has been extremely successful.  It has been in operation since it was created, with a 100% uptime and I haven't taken the lid of to "Improve it"   (Very unusual for me and I bet many in the instructables community).

The Concept
Build a Raspberry Pi based server, with a large HDD, power supply and battery backup into a small form factor case.  In addition I want to use recycled or salvage parts where ever possible.

Ingredients
1.  Raspberry Pi.  I got a case, this is not required, but does make mounting easier (Purchased online)
2.  Suitable Case  (local salvage shop)
3.  Either USB Hard drive 
     or Hard Drive & USB to IDE/SATA adapter (local computer store)
4.  DVD ROM (Optional)
5.  Sealed Lead Acid Battery(s)  12,18,24V  3-7Ah  (2x12V, 3.4Ah in shed)
6.  DCDC Inverters - Adjustable
     12V version - 2x Step-Down 3A,  1x Step-Up 2A (Online)
     18-24V Version - 3 x Step-Down 3A (Online)
7.  1x each, USB extension, Ethernet extension, RCA to Phone (Assembled)
7.  Power supply = Battery Voltage x 1.3 + 1,  2A  (from old Laptop, Printer etc.)
Misc.  Various Cables, Electronic components and Screws  (all recovered from the salvage box in the shed) 

Step 1: Time to Start Stripping

You could select almost anything for a case,  an old CD or DVD player, VCR etc.   In my case,  I selected an old Panasonic CD Player that  I picked up for a couple of dollars from the local salvage store.

The first job is to strip out the bits you are not going to use to provide a blank canvas.

Step 2: Take Control

Next connect some new wires to the original switch and wire up some LEDs in the display area.

The original buttons are still in place but not connected as they are not required for this project.  (See KBMC comments later).  It would be easy enough to do by either using the GPIO lines or mapping to a guts of a USB keyboard.

Step 3: Start Putting Bits In

A thin sheet of MDF was placed inside the case, to provide a flat surface to work with. 

Next the DVD ROM is added.   Of course this is not actually required,  however I had one and it neatly fills the hole in the front of the case.  From this point it has been hard to resist loading up XBMC and turning the project in to a media centre.

Step 4: Install the Pi

Now it's time for the heart of the beast.  Note I have lined it up with the HDMI port to the back, as this is the hardest port to extend.

Step 5: Add Storeage

Next the Batteries and Hard Disk Drive are installed

Step 6: Get Connected

Short Ethernet, Audio and USB extensions are assembled to connect to purpose cut holes in the rear case.  Note, the power cable is using an existing grommet.

All the old holes were covered with duct tape (from the inside) and the rear panel is painted black.

You will also notice the red SATA cable,  this is from a dual IDE/SATA to USB adapter,  the IDE side is connected to the DVD drive.

Step 7: Power!

This is probably the trickiest part of the project,  the power supply is made of 3 DC-DC inverters.   My project uses 2 x 12V, 3.4AH to provide a 28V supply.  The side effect of the 28v solution is charging the battery,  suitable power supplies for a 12V solution are much easier to find.

I have provided the circuit I used for the PSU and an alternate circuit for 12V operation.   Note when using a 12V battery you cannot power the HDD from the battery, as the battery will change from 11 volts to over 13 depending on charge state.  To solve this, the inverter steps from battery voltage to 5V and back to 12V.

The charge voltage is set to the float voltage of the battery,  this does mean it is very slow to charge a low battery, but it will not over charge the battery.    As usual the web offers many opinions so I have used Vfloat = Vbatt x 1.15, measured at the battery lead before connecting to the battery.

Step 8: The Lights Are On, But Nobody Home

Put the lid on and you have a complete box, but it is not going to work with out software.

There are many how tos and tips on setting up a linux file serve, so I am not going to repeat them here.  However the following sites helped me setup my Server.

Getting your Raspberry Pi going:   http://www.raspberrypi.org/quick-start-guide
Setting up the file server (Samba):   http://www.simonthepiman.com/how_to_setup_windows_file_server.php
Spin Down USB Harddrives:  http://hd-idle.sourceforge.net/

Step 9: Did It Work?

Review
Replace an aging file server, running a 800MHz P3 processor-  Old server shut down
reliable -  Been running for a week....13/1/13  Up time currently 69 days, with no issues
cheap - Under $100
quiet  - Cannot hear anything with lid on  (except DVD, when in use)
does not waste power.  - The old server averaged 120 watts,  the Pi Server averages 15 watts.This will save a massive 919KW hrs per year!!!
power backup -  Battery backup provides cover for at least 6 hours.

Cooling
The server only generates 15 watts,  some of that is the plugpack outside the case, so it should not need active cooling.   Passive cooling via vents could be used,  but this build does not have any vents.  13/1/13 I have monitored the temp as we come into summer.   The inside of the case is consistently 11 degC above the above the ambient temperature.


As you can see from the thermal image below, most of the heat is created in the PSU switching chips, even then the max temp only 50deg C on the core of the chip.  The hard drive hardly shows any heat.   Room temp was 18deg C.

The second image is a close up of the Raspberry Pi,  just becouse I could.

Ideas....   13/1/13   It works so I haven't even tried to "improve" it.
* Would use 12V instead of 24V battery
* May have to build another for an XMBC  (Would be simpler without HDD or Battery)
* Use the HDMI port and Linux's FBI command to drive a digital photo frame
* Would look better with a cool LED dot matrix display.  An Instructable coming?
* Solar powered server