Introduction: NAS in HIFI Case
Some time ago we moved to our new house and my low-power server system died of being turned off.
I had no time so I just used my desktop PC as server and over time more and more hard disks were needed to keep all the data. At the end there were 6 drives in it: 2x500GB, 1x1TB, 3x1.5TB.
Not bad, but in fact ugly and very power consuming. 90 Watts in idle mode are way too much for a private 24/7 system. So I decided to buy a new hard disk and chose the Seagate Archive with 8 TB.
I migrated all data to the new drive and removed the abandoned ones except the system drive, but the system still needed more than 50 Watts.
Now as I stood around thinking about if I could live with those 50 Watts I saw the old RPI B+ that was not needed any more since the RPI 2 took it's place as TV-Server (but that's another story). So I started planning how that system could drive the new HD.
Step 1: Hardware
After some research I realised that I only need to buy some more cheap components and
have a more detailed look at my treasure chests (or as my wife call them: trash cans).
I found a nice case that used to be a prototype DVB-S capable mediacenter that I brought from work and that never ran very nice. Power supply included, so should be fine.
To get the disks in there I ripped the hard disk cage from a very old big tower case (that one that died when we moved). Have no picture of it but it looks almost like the one shown below.
In fact I did not use all parts of it but fixed one side of one drive with some mainboard spacer screws.
To connect the 8TB hard drive I bought this SATA to USB adapter.
And as there's enough space in the case for two drives I bought two of them and added one of the ancient 1.5TB disks too.
As I use an old Raspberry Pi B I had to use an USB Hub. Not really sure why, but without it the PI did not start up.
Here's what I needed in the following build process. Not shown is the Dremel Multi-Tool mainly because I forgot about it ;)
Step 2: Prepare the Case
Preparing the case is simple: Get everything out there.
In fact in this step you will have to find places for the hard disks an fix the cage and/or drill holes to fix the disks directly.
Cut the cage using the Dremel or another suitable tool to fit the case.
Fix the cage by drilling holes and use screws, in my case there were some sockets for screws to fix it.
If that's too much work it may be easier to throw the cage away and use spacer-screws. You can combine two or more add more space below the hard disks. I also find it easier to make a small cut instead of drilling a hole.
Step 3: Power Supply
I really learned something here. My initial plan was to use the power supply that already was in the case, but it turned out to be broken. So I took an old ATX power supply but to my surprise it used 10 Watts in idle without anything connected. I had to disable the fan too before I could believe that.
So after the first shock I just took the power supplies delivered with the SATA to USB adapters. Tied together they fit very well plus the cables can be removed and soldered directly to the cases power switch.
Benefit of this setup is, that one power supply can drive the two hard disks while the other will be enough for the Raspberry PI and the USB Hub.
Step 4: Cables
When I first put all parts together it turned out that the cables took too much space. So I had to cut and resolder them so be short enough to fit in there. Of course you can buy short cables too but I wanted to test my soldering skills ;)
So took an old USB cable and cut off the B connector. I used saw and cutter to clear the connector of all the plastic. Then I cut the rest of the cable with the A connector to about 10cm and re-soldered the B connector. Finally fixed everything with shrinking tube. Benefit is that while the tube is hot you can bend it in any direction and once being cold it will hold that position.
Once that is done I had to build a custom cable for powering the RPI and the USB hub. That one is build from another old USB cable, a connector from an old power supply and so on...all findings from the trash(-ure chests).
The SATA-USB adapters cables are long too, but the will sit above the disks, so just zip-tied them together. The hub is glued on top of the RPI which will stay in it's own case mainly because I had it laying around ;)
As you can see there's also enough space for the 20cm network cable.
Step 5: Final Assembly
On thing missing is the network connector. Of course you can simply take a long cable and let it hang out of the case. But how that's not really cool, eh?
So I took another look at the chests and found a network cable connector like this one.
I used hot-glue to fix it at the case. Learned how strong hot-glue can be: It looks like nothing but I think it will hold forever :)
The power supplies are fixed using some assembly line, but fantasy is your friend.
Hard disks fit into the cage or are fixed with the spacer-screws. The the power and SATA cables are connected to the drives.
The RPI-HUB combination fits exactly next to the drives and the SATA-USB adapters lay each on the drive it connects.
Finally close the case and: Whoohoo!... Wait!... Missed the run-test :)
Step 6: Testing and Setup
So as I forgot about it I had to go some steps backwards, open the case again and connect monitor and keyboard.
As you can see switched location from hardware to software lab ;)
So now comes my profession: Installing software and programming the new baby.
In fact for now only installation and configuration.
Get a fresh Raspbian and install it to an SDCard. Run and configure it as you did 1000 times before. BTW: If that worked you tested half of your hardware successfully :)
Then mount the drives to the RPI file system.
Find out the UUIDs like this:
ls -l /dev/disk/by-uuid/
Choose a location to mount the drives, I use /data, so
Then edit the fstab file...
sudo nano /etc/fstab
...and add your drives
UUID=[uuid_hb] /data/huge_bastard ext4 relatime,defaults 0 0
UUID=[uuid_sg] /data/small_gradpa ext4 relatime,defaults 0 0
To test that use
sudo mount -a
Now if that worked too your soldered cables and stuff are all okay and your testing is done!
Now you can add some more services like samba, btsync, transmission and so on, but that's stuff for another instructable.