HowTo: Raspberry Pi – Build NetworkAttachedStorage / NAS using a Raspberry Pi 4

For the past few years, I've mostly relied on Synology NAS as my home storage solution. These come with a nice interface and can be configured easily but also extensively. Unfortunately, they are also comparatively expensive.

At some point I stumbled across the Open Media Vault (OMV) project. This is a package that you can install on Linux systems (including the Raspberry Pi) and that provides the typical services you need for a NAS. In addition, OMV and its functions can be configured relatively easily via a web interface.

After a few months of testing, I decided to switch completely to Open Media Vault. Why?

  • The response time of the SMB / Windows share server is significantly better or faster than my Synology NAS. Where you used to have to wait a relatively long time for the data to be accessible via a network release, this works easily with OMV
  • The (possible) range of functions with OMV is greater than with the Synology NAS thanks to the Docker integration
  • The structure based on a Raspberry Pi makes the system much cheaper
  • Since the Raspberry Pi 4, the data throughput on the network port is no longer limited by an internal USB hub. It is therefore possible to achieve quite high / NAS-typical transfer rates

So that I could still build the unit from Raspberry Pi and hard drive in a reasonably compact way, I printed the case shown below. In this way, the Raspberry Pi can be stowed in a compact housing together with a 2.5″ hard drive. Then only the power supply unit needs to be connected to the Raspberry Pi and the self-made NAS is ready for use.

How you can install the Raspberry Pi together with the 2.5″ hard drive in this case is described in the following article.


Safety instructions

I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/en/sicherheitshinweise/

Affiliate links / advertising links

The links to online stores listed here are so-called affiliate links. If you click on such an affiliate link and store via this link, Nerdiy.de receives a commission from the online store or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support Nerdiy.de in being able to offer further useful projects in the future. 🙂


Requirements

Helpful articles:
Before you start this article, you should have prepared a Raspberry Pi so that it can be reached via the network and controlled via SSH.

The following articles describe what needs to be done to prepare the Raspberry Pi.

In the following lists you will find all the parts you need to implement this article.

Required tool:

NumberLink
1xScrewdriver set  Buy at Amazon
1xSD card reader  Buy at Amazon

Required material:

NumberLink
1x Raspberry Pi  Buy at Amazon
1x Raspberry Pi power supply  Buy at Amazon
1x Raspberry Pi case  Buy at Amazon
1x Micro SD card 64GB  Buy at Amazon
1x filament  Buy at Amazon
6x M3x10 countersunk screw  Buy at Amazon
4x M2.5x6 countersunk screw  Buy at Amazon
6x M3 thread insert  Buy at Amazon
1x Raspberry Pi 4  Buy at Amazon
1x external 2.5  Buy at Amazon
1x USB cable  Buy at Amazon


The parts needed

Below you will find an overview of the components required for assembly.

For the construction you need the following materials:

  • 3D printed base
  • 3D printed Raspberry Pi mount
  • 6x M3x10 countersunk screws
  • 4x M2.5×6 countersunk screws
  • 6x thread insert
  • Raspberry Pi 4
  • external 2.5″ hard drive
  • USB cable
  • Power supply for Raspberry Pi
  • Micro SD card >16GB

The STL files for printing on your 3D printer can be found in the repository under the following link.


Prepare housing

The first thing you should do is insert the threaded inserts into the 3D printed housing.

You will need six M3 thread inserts for this.

Another view.

Then put it on the tip of a soldering iron and slowly melt it into the 3D printed housing.

Another view.

The inserted thread insert should then look something like this.

Another view.

Another view.

Another view.

Another view.


Mount the Raspberry Pi on the prepared housing

Now you can attach the Raspberry Pi to the housing.

You will need the following parts for this.

  • Raspberry Pi (of course)
  • The bottom shell of the Raspberry Pi case
  • 4x M3x10 countersunk screws
  • 4x M2.5×6 countersunk screws

Another view of the materials needed.

Now first screw the lower shell of the Raspberry Pi housing to the prepared housing using the M3x10 countersunk screw.

Another view.

Repeat this for all four mounting options until the bottom shell of the Raspberry Pi case is attached to the 3D printed case of the NAS with four screws.

Another view.

Another view.

Now you can insert the Raspberry Pi into the lower shell of the housing…

…and fasten it in the lower shell with the four M2.5×6 screws.

Another view.

Another view.

After the Raspberry Pi is attached, you can now also put on the upper shell of the Raspberry Pi housing and screw it on.

For this you need the said upper shell and 4x M3x16 countersunk screws.

Another view of the required screws.

So put the upper shell on the prepared housing and …

… screw it to the case's bottom shell.

Another view of the fully screwed housing.

Another view of the fully screwed housing.


Install 2.5″ hard drive

The only thing missing from your Raspberry Pi NAS is the hard drive.

I created the case in such a way that any external 2.5″ hard drive should actually fit in the case.

I use a Toshiba 4TB hard drive for my NAS. I have linked a suitable link to this in the list of materials above.

Then insert the hard drive into the case with the USB port facing up. The USB connection of the hard drive and the connections of the Raspberry Pi should therefore point in the same direction.

Another view.

Another view.

Then connect the USB cable to the hard drive.

Another view.

In order to give the hard drive a slightly better hold in the housing, you now need a suitably cut piece of foam. (Often included as protective material in mail.)

Cut the foam to size and insert it into the housing of your NAS in such a way that the hard drive is "gently" fixed after unscrewing the cover.

Another view.

Another view.

Now you can fix the hard drive in the housing by putting on the cover and screwing it.

Another view of the parts needed.

To do this, place the lid on the NAS as shown and…

…fix it with two screws.

Another view.

Another view of the finished Raspberry Pi NAS.

Another view of the finished Raspberry Pi NAS.


Configure Raspberry Pi as Network Attached Storage / NAS

The hardware part of your Raspberry Pi NAS is now complete. Of course, the software component is still missing, that is Open Media Vault / OMV.

I have described tips on how to install and configure OMV on your Raspberry Pi in the following article or category.


Have fun with the project

I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂

P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate that I share this information with you, I would be happy about a small donation to the coffee box. 🙂

Buy Me a Coffee at ko-fi.com   

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert