This is a low power home file server I built from a raspberry pi and two USB drive cases. I've mapped it as a network drive on all of my home computers, so we have one common repository for files, documents, and pictures. It's set up with two hard drives, one a mirror of the other. I've had it running for 3 months without any problems.
The whole unit is not much bigger than a coffee cup, and my measurements show it uses between 6 and 7 watts of power when idling (which it usually does).
This is a fabrication exercise rather than a software tutorial; I will show how I modified the drive cases, but not how the software is set up. For that phase, I recommend reviewing
I'd recommend getting the pi working with remote access before inserting it into the case, as you won't be able to attach a monitor once the pi is mounted in the caddy.
Step 1: Low Power Raspberry Pi Fileserver - Why?
I have about 15 years of accumulated personal data on my home desktop computer. I back it up from one hard drive to another every week, and copy everything to DVDs about once a year. It's not a safe way to store important data. It's also difficult to access the data from my laptop (even though the drive is mapped, I hibernate the desktop when it's not in use to save power).
I bought a dual drive USB case and two WD Red NAS hard drives, and attempted to attach it to the USB port of my router to work as a network drive. However, the router wouldn't recognize it, so I had to try something else.
What I wound up with is a headless Raspbian (Debian) file server that draws very little power and takes up very little space. When I save a file from my desktop, the pi automatically mirrors that file to the second drive, keeping both in sync for backup purposes. The drives are formatted as NTFS, so if I ever have problems with the *server* (raspberry pi) , I can just plug the *drives* into a Windows computer and read them via USB. Since it really *is* a server, I can set up a remote administration program (Webmin) to monitor the hard drives and alert me if they begin to have problems. And if I want, I can even set up a VPN and securely access my files from any web-connected location.
Step 2: Low Power Raspberry Pi Fileserver - What?
I bought my first dual-drive case on-line for about $30 after rebate. The price varies widely, and frequently comes with a rebate; The second case was about $20 after rebate. That's not much more than a plastic project box big enough to hold a raspberry pi. Total cost (before drives) is about $85, plus $10 for the power supply.
The drive case contains two small circuit boards to interface between the USB cable and the drives themselves. The drives and circuit boards are powered by the USB cable, or by an optional 5 volt power supply.
Step 3: Low Power Raspberry Pi Fileserver - How?
It was easy to remove the circuit boards from the second case in order to make room for the pi. I fabricated a plastic "plate" to fit inside the framework of the drive caddy, and taped it in place with two strips of black electricians tape.
The next step was to carefully grind away the rear of the drive caddy and the locking faceplate in order to gain access to the USB ports and the network adapter on the pi. Once the grinding was done, I carefully inserted the pi and screwed it down to the plastic plate.
When fabricating the plate, it's important to make sure you don't block access to the SD card, as you will need to insert/remove it in order to make backup images. Leave the locking features in place on both the caddy and the rear faceplate (don't grind them off) to make this easier.
Step 4: Low Power Raspberry Pi Fileserver
The two drive cases are fastened together with Velcro tape. This keeps them in position, but allows easy dis-assembly if required.
I found a 3 amp power supply on Ebay that had the correct tip for the drive caddy. Since the pi is USB powered, I plugged one end of a USB pigtail into the drive USB port and the other into the pi to power it.
The network cable plugs directly into the pi. However, if you wanted, you could instead use a USB wireless adapter (many work with Linux).
Step 5: Low Power Raspberry Pi Fileserver - Next?
The drive case has two built in LED indicator lights that show drive activity. I left them in place when I inserted the pi (note the white connector). Right now the ones on the pi case are non-functional, but eventually I hope to connect them to the GPIO connector and indicate server power and status.
I have a pocket sized USB power supply (battery) that I don't really use. I may add this in-line with the 5 volt power supply to create a UPS for short duration power outages. It is small enough to fit into a third drive case.
I am thinking of making another of these to use as a media server. The only thing I'd need to do differently is set the drives up as JBOD, run XBMC instead of Raspbian, and cut another access hole for the HDMI port. I would hide this behind the television and access it via an Android phone app.
I don't really need remote access, so likely won't set up the VPN.
I don't use file sharing services, but this server would work well for someone who needed that capability.