MAKER:tobychui / 译:趣无尽 Cherry
There are many cases of using Raspberry Pi as a Network Attached Storage (NAS), and I have been looking for various components needed to DIY a NAS with Raspberry Pi. The requirements are a beautiful appearance and space-saving, but I found nothing.
Many of the cases I saw used wooden boards glued together, which have a lower integration and will affect heat dissipation and reliability. Think about the movie resources and important data you have cherished for years that might be lost because of this, which is hard to accept.
Therefore, I decided to make a real NAS solution myself. It not only looks more like a professional NAS but also uses core components that are available on the market with the same performance as professional NAS. The Raspberry Pi only serves as a low-power host to run the NAS operating system.
The initial design sketch.
In this project, I will not use any components specifically designed for Raspberry Pi NAS. Instead, I will use some common components that can be easily found on e-commerce platforms. So, let’s get started!
Materials List
Raspberry Pi 3B+ × 1, Hard Drive × Several, Hot-Swap Hard Drive Bays × Several, Power Management Development Boards × 1, Relay × 1, Button × 1, LED × Several, Acrylic Boards × Several, Power Cables × Several, Hot Melt Glue × Several, Double-Sided Tape × Several, Screws × Several.
3D Modeling Design
Designed the NAS case in Autodesk Inventor and tested them for fit, checking if each assembly point was designed correctly.
The NAS case is divided into three parts. The left part is for the power management board and Raspberry Pi 3B+. You can also use Raspberry Pi 3 or 2B, as they have the same print area. However, using Raspberry Pi 3B+ is better because it is faster. I will detail that later.
The right part is for accommodating two 5-inch hard drives, installed as shown in the picture. An extra 7 cm of space at the back is for installing the fan, DC socket, and wiring.
3D model files can be downloaded from the project file library: http://maker.quwj.com/project/79
Printing and Assembly
After printing is completed, we can start assembling the case.
The case consists of the three parts mentioned earlier, secured together with five M3 screws and ten M3 (for connecting the top and bottom screw holes). After the button cap is installed, you can prepare the electronic components.
Buttons and Signal LEDs
The buttons and LEDs are connected through some simple circuits, with the signal from the Raspberry Pi’s GPIO connected to the front panel. Except for the button installation being a bit tricky, everything else is quite simple.
It is recommended to test print some parts before installing the circuit board into the case with glue. Ensure that the button quality is good and easy to operate.
In my design, since the red LED requires a 5V power supply, I added a resistor and planned to connect the VCC pin of the LED directly to the 5V output of the power management board. You can also use the 3.3V GPIO pin on the Raspberry Pi without adding an extra resistor.
Testing Components
1. Two 2mm thick acrylic plates are placed at the bottom and top of the right side to reinforce the support for the two hot-swap hard drive bays, as the hard drives are a bit heavy after being inserted into the bays.
2. An old USB hard drive was used, which usually contains some kind of SATA to USB converter circuit board. The one I purchased has a pre-soldered 12V input port that supports 12V power input for 3.5-inch hard drives.
I connected them to the ends of the two HDD hot-swap bays and connected two cables to its ends. One power cable with a 2.1mm DC socket is for 12V input, and the other with a mini USB connector is for data transfer and 5V power. The two power cables are arranged neatly, both bending towards the bottom and leaving some space.
Securing the Hard Drives
Paste the hard drive hot-swap bays into the case. 1. Stick double-sided tape on the outer frame of the metal bracket, insert and secure the bays. 2. Bond between the acrylic plate and the metal bracket with strong glue. Remember to remove the paper from the acrylic plate.
After completion, you can operate the two slots in the right case through the handles on the hot-swap bays.
Testing Fit
You can now insert the hard drives into the bays, and they should fit perfectly. (If not, you should consider whether the bays are incompatible.)
You may notice two round slots at the back of the top of the right box. These are reserved for USB cables. Now you can place the cables inside for a neater look.
Power Management Development Board
This is the power management development board. In the middle is a Tinduino, a custom version of Arduino that is cheaper, this version is used for our lab’s development. Of course, you can use Arduino UNO for this, and
turn off the relay when pressing the button.
There are many tutorials online that can teach you how to make such a circuit board, for example: https://www.instructables.com/id/Toggle-Switch-With-Relay/
It is the power switch for the NAS, so you can choose the style you want.
On the right is a buck converter. It reduces the voltage from 12V to 5V for the Raspberry Pi and Arduino.
Finally, the third port from left to right at the bottom is the 12V power input, HDD1 for 12V power output, and HDD2 for 12V power output.
Assembling Everything Together
Now, connect the power management board to the Raspberry Pi as shown in the picture. Insert the 12V power input, and everything should run. (If not, you might need to touch the button to activate the Arduino relay switching system.)
Install the Operating System and Start Creating Your NAS Interface
Now screw in all the screws, plug in the power cable, do you think that’s it? Of course not. We still need to install software. Now the hardware installation is completely done.
Since the software is still in development, I recommend installing some open-source OS/NAS systems like FreeNAS or OpenMediaVault. However, if you want to build your own NAS, I suggest starting from scratch. The next step is to write my own NAS operating system!
1. Install Raspbian Lite from the Raspberry Pi website: https://www.raspberrypi.org/downloads/raspbian/
2. Install it on the SD card. I think there are many tutorials online, and I will not repeat this content. http://shumeipai.nxez.com/2013/09/07/how-to-install-and-activate-raspberry-pi.html
ArOZ Online System!
The media center system ArOZ Online for Raspberry Pi (Alpha) is available at: https://www.instructables.com/id/Simplest-Media-Center-for-Raspberry-Pi-Web-Server/
Now, I have completely rewritten it into a brand new DSM-like Web UI called ArOZ Online (Beta), which is compatible with Windows Host and Linux Host (of course, Raspbian too).
The System is Under Improvement
So far, the system I wrote has detected the 1TB drive I inserted into the NAS.
What’s next? The software still needs years of development to run smoothly.
Currently, the maximum transfer speed from 5G WiFi to HDD is about 100Mbps. It can fully handle all your requests for a small computer, and the performance is quite good. When transferring using Samba (Windows SMB/Network Disk), it can reach about 93Mbps. This might be the advantage of using Raspberry Pi 3B+.
Editor’s Note
There are various software systems available for building NAS on Raspberry Pi, and you can directly use a more complete system:
OpenMediaVault NAS System
http://shumeipai.nxez.com/2018/01/10/raspberry-pi-nas-openmediavault-installation.html
You can also use the latest version of Raspbian and install the required services yourself:
DLNA Server
http://shumeipai.nxez.com/2015/07/12/raspberry-pi-install-dlna-streaming-media-server.html
Aria2 Download Server
http://shumeipai.nxez.com/2014/07/01/raspberry-pi-do-download-machine-aria2.html
Project file library address:
http://maker.quwj.com/project/79
via instructables.com/id/A-Raspberry-Pi-NAS-That-Really-Look-Like-a-NAS
Clickable links in the text can be viewed in the original text at the end
More Exciting Content
Make a Toilet Condition Monitor with Raspberry Pi
Create an Automatic Irrigation System with Raspberry Pi
UltraV: Portable UV Index Meter
DIY a Wi-Fi Remote-Controlled Boat with ESP32 Development Board
DIY a Hot Flame Throwing Gauntlet
Create a Fantasy “Infinite Extension” Mirror
Easily Achieve Deep Learning Object Detection on Raspberry Pi