Hello from France,
I want to share with you my NAS project pi based.
I use few Raspberry Pi for various projects at home, one of theme is a NAS with RAID1 disks, to store my important personal data. ***(Raid 1 given up since 12.2014 update)***
But, after configuring the NAS, I wanted to store it all in a clean box and use a reliable power supply,
I have therefore chosen to use external USB enclosures with power supply for my hard drive to avoid electrical overload on the USB port of my Raspberry Pi.
After much research, I find a solution corresponding exactly to what I was looking for:
a xbox360, for several reasons:
- The case has a nice look
- The dimensions are compatible in every way with my project.
- The external power supply avoids the presence of 230V in a metal box.
- The power supply provide 12v and 5v DC
so I called it NASBOX314
The hardware configuration is as follows :
- 1 Raspberry Pi model B
- 1 carte SD Class10 8 Go ***(128MB card since 12/2014 update)***
- 2 HDD Toshiba 3 TB formatted in ext3
- 2 external enclosure for SATA HDD 3.5 " with USB port
- 1 XBOX360 down
- 1 ethernet wire
- 1 * 3-pin and 2 * 2-pin connectors, recovering in an old computer
- 2 LED for HDD activity LED and 1 LED for the power display
- 3 resistance of 300 Ω.
the software configuration is as follows:
- OS: Debian Wheezy Raspian
- RAID: mode 1 with mdadm ***(given up since 12/2014 update)***
- files sharring with Samba
- HDD in standby after 20 min with hdparm
***UPDATE : 12/2014*** ***UPDATE : 12/2014*** ***UPDATE : 12/2014***
because of various problems:
- Stability with software RAID (multiple crash recovery)
- Reliability with SD cards (not boot after a certain period of time)
- Performance due to abandonment of raid1 solution
I chose for a classical mount for hdds, but my system is now installed and running from one of the hard drives, the SD card is only used for boot, while the OS has been transferred to the first hard drive,
for backup, i launch a rsync monthly task with crontab for conducts a monthly copy of my documents, performances are worth the same as with the RAID mount. but a disc stays on power (over entering sleep)
HOWTO CONFIG FILE HERE => http://www.petit-fichier.fr/2014/12/04/config-nas...
Please, if necessary comment the file
Step 1: Empty the Xbox's Case
disassemble and completely empty the inside of the xbox.
retain all plastics, but dismantles all the components (motherboard, fan, optical drive)
/ ! \ Be careful : the metal edges are very sharp
Step 2: Insulate the Case
insulate the metallic enclosure, by sticking with neoprene glue, with a layer for laying wood flooring (polystyrene foam layer)
place a weight on the entire surface to bond the entire surface of the insulating web. (i have used a plastic bag with sand)
Step 3: Kill the Xbox !!!
extract "properly and carefuly" the power supply port and the usb/ethernet port.
I have not managed to melt the solder with a soldering iron, i have used a dremel tool for digging the back surface of the motherboard,but i have broken one pin of the power supply, (isolated with a piece of wood, fixed with glue)
remove any component in place on the Ethernet Port, remove all traces of glue, and any remaining copper wire on the ethernet pcb.
you can also extract the front usb panel for create in front, a administration/debug panel, for this one use the cable usb to TTL serial.
Step 4: Adapt the Power Supply Port
make a polarity control before cutting the cables to ensure the correct polarity
cut both 12V connector of your external hard disk, leaving available 50cm (20 inches) of cables minimum, and provide the same length for the 3-pin connector (for raspberry pi supply)
make a control before soldering to ensure the correct polarity
Solder the hard disk's positive cables on the 12v power sockets
solder the raspberry's positive pin on the 5V output, and make a bridge between the +5V power socket and the "PWR_Enable" socket : is it for activate the power supply when the connector is inserted into the socket.
solder all the ground wires to ground sockets.
remove the SD card of the raspberry pi.
make a powering test on the disks, and the raspberry pi.
fill moderately the back with neoprene glue for fixing the electrical pins and isolate the solder for any possibility of short circuit with vinyl tape.
Step 5: Adapt the Ethernet Port
cut the ethernet cable and keep a length of 50 cm (20 inches)
Strip the cable and locate the orange wire, orange / white, green, green / white
with a soldering iron with a very fine tip, connect the wire to the upper bounds as follows:
from left to right: green on the 3 rd, green/white on the 6 th, orange on the 7 th, orange/white on the 8 th.
stick a small metal bracket in the corner with instant glue
put back the ethernet stand being careful to set the USB port on the below.
isolate the wires with glue and put back the Ethernet Port in his casing.
tip : if you don't have a thin solder iron, you can also use a small ethernet cable (30cm) and a RJ45 F/F coupler for a little cost.
Step 6: Fix the Hard Drives
the discs will be fix head to foot to avoid cluttering the power and network ports.
put in places hard drive and match the mounting holes with the existing holes in the case.
a disk will hang by his side in the ventilation grille. the other will hang from underneath with one screw of the pcb interface SATA / usb
take care to leave the space necessary for the connection of USB sockets and power. Gently tighten the screws and shim the disks with polystyrene foam, to avoid that they are forcing on the case.
wedge the discs with layers of polystyrene foam, to prevent movements and reduce vibrations.
Step 7: Display LEDs Activities
you can see in the diagram that the activity indicator is linked to pins 39 and 40.
strangely it works even if you use sata drives... a good thing
use 2 connectors with 2 pins and solder one 300 Ω resistor in the middle of the positive wire, then add the LED to the other end
connect to pins 39 and 40.
LED will light when the disc is idle and turned off when busy
then add a LED / 300 Ω resistor mounting in parallel with the 5V for display the voltage presence. (it is mainly to be good-looking :-p)
pass the LED through the hole near the power button.
Step 8: Final
place the raspberry pi on the top of a disk.
put the 5V pins in the 3-hole socket, leave a free slot between the wire, connect it to the raspberry pi via the gpio 2 (5v) and gpio 6 (gnd).
connect the ethernet cable, connect the plugs to usb and the power plugs to hard-drives.
place the metal cage in the lower plastic cladding.
make one hole on each side of the turn-on button and put in place the LED so that the luminous flux is spread on each side of the button. fix with vinyl tape. if you see a difference in light intensity between the LEDs activity lights, hide more or less the LED to equalize the light intensity on each side of buttons
bring the voltage presence in position in front of the central location, the light output will turned in perpendicular to the central hole.
fix a piece of foam on top of the usb port raspberry pi, for stalling.
do a final check to make sure you do not forget anything.
place the SD card into the raspberry pi
close any plastic coverings.
connect the ethernet jack and the power jack.