Project Radxa

NAS Radxa

  • So many things can be achieved with this wonderful board.. I personally needed something to replace my old PC serving as a NAS. That's how came the idea of a NAS based upon a Radxa board. Perfect for such use. Low power consumption, RTC etc..

    Reading the following post got me started to think about it. Honestly, the challenge was more of a question to embed disks and board into a DIY box than configuring the board itself. But here it is.

    For the specs, it's about 2 Samsung disks of 2TB each (enough to store a good bunch of your digital life), functioning in mirroring through 'rsync' command (powerful as hell !).

    I first ordered a metal box (die cast process) at Banzaimusic along with some stuffs (LEDs, resistors etc..) and I manufactured what I needed to attach disks onto the plate. 4 rods on which I screwed the disks. They can't move at all !



    I finally realized 3 rods would be enough as I needed to make some room for USB plugs.

    Below, 'proof of concept' of the system. I provided the board with 2 USB-to-SATA adapters so that I could drive the 2 disks properly.. Of course, the whole system draws too much current to be powered by Radxa PSU. So I added a 5V DC-6A to power the whole thing (2 x A(disk) + A(board) + A(LED and so on..), roughly 4A). I fiddled with wires from adapters to handle power.



    I soldered white wires to power the board. The two USB plugs fit exactly in-between the two disks




    I've run the RK3188 a bit without noticing it could warm up pretty high at finger tip touch.. I just put a little rad on it..and even with it..wow.. lol



    Below, the rest of the case. I put a little plexi window to check activity LEDs soldered on a test board. They feedback over disks activity and board power status.



    ..and crafted some holes to match the different outputs of the board. Fits well. (In the mean time, I added a power switch at the back pane, not shown here) :)



    As expected, in such enclosure, disks easily reach 40-45°c. So I drilled others holes and put a fan. I get my disks running at 33°c at full throttle. Cool enough.



    A bit of transparent polish to protect against oxidation, 4 rubber pads and you get a heavy-duty enclosure for your NAS ;)





    About inside..

    The mirroring strategy is basically simple. I put a Linaro distrib onto sdcard and did some configuration.

    Below the main steps:

    - Added the disk into /etc/fstab

    UUID=1772e22a-993c-4e2d-9ec3-72fb892cd6dc /mnt/hd2 ext4 defaults 0 0
    UUID=764a5fdd-d118-4689-8aff-93da6244ceed /mnt/hd1 ext4 defaults 0 0


    - Prepared disk settings at startup:
    Created /etc/hdconfig/disk.sh and chmod +x with the following content:

    #set parameters for SATA disk
    sudo hdparm -B 50 -S 200 -K 1 /dev/sda
    sudo hdparm -B 50 -S 200 -K 1 /dev/sdb

    - Added /etc/hdconfig/disk.sh to cron tasks, @reboot event.

    - Added the command below to cron task, it regularly triggers sync between disks:
    rsync -aPuv --delete /mnt/hd1/ /mnt/hd2
    ..which means 'what is (not) on hd1, put (erase) on hd2'

    - Install Ajenti monitoring system. Very useful, it's a tool accessible through http and which gets/sets your system data.

    ..I also added Deluge as torrent manager and a few pieces of software..

    gpaowz at gmail.com - 08/08/2015

BadCav'PortFolio Framework