I Built A 4-Bay Raspberry Pi 5 Based NAS

Last year, I built a Pi-based NAS as cheaply as possible using a Raspberry Pi Zero 2W. It was a great project to learn what a NAS is and how to set one up, but it was obviously limited by the capability of the Zero 2W and the cheap storage hardware that was used. So, today we’ll be building a more functional and powerful NAS using a Raspberry Pi 5.

Here’s my video of the build, read on for the write-up;

What You Need To Build Your Own 4-Bay NAS

Equipment Used

Some of the above parts are affiliate links. By purchasing products through the above links, you’ll be supporting this channel, at no additional cost to you.

Hardware Used To Build The NAS

The primary piece of hardware that we’ll be using to build the NAS, apart from the Pi 5, is this new Penta SATA hat from Radxa. This hat allows up to 5 SATA drives to be connected to a Raspberry Pi 5 or Rock 5A via their PCEe port.

Radxa Penta SATA Hat

It’s got 4 SATA ports on the top, which drives plug into top-down, and one eSATA port on the front. Radxa include a cable to plug a fifth drive into this port with the hat. The spacing between the SATA ports allows for 2.5″ drives to be plugged directly into it, but you can also connect 3.5″ drives to it with some extension cables.

Radxa Hat From SATA Port

Power is supplied to the hat through either a 12V barrel jack on the side or a standard ATX Molex connector on the top. Additionally, you don’t need a second power supply for your Raspberry Pi 5 – the hat will supply 5V to the Pi through the GPIO pins. That’s a really handy feature!

The Penta SATA Hat has got a couple of other ports on it too, like an expansion port for a fan and OLED display on top and an additional fan port at the bottom.

Additional Fan and OLED Connector

Before mounting the hat onto the Pi 5, we need to add a cooling solution for the Pi’s CPU. I’m going to use a Pi 5 active cooler.

Raspberry Pi Active Cooler

There is one issue with using this cooler and that’s that the end three fins on the heatsink clash with the barrel jack port on the hat. This seems like a bit of an oversight by Radxa but hopefully, they’ll come up with a solution to correct this in future revisions.

Power Port In The Way

My first thought was to add some 6mm spacers between the hat and Pi so that there is a larger air gap between them. This however isn’t possible without also requiring an adaptor for the GPIO pins to still plug into the hat.

The only easy solutions are to either get rid of the cooler or modify the cooler to fit in underneath the connector. Modifying the cooler can be done relatively easily by removing the last three fins, which you can break off with needle nose pliers.

For storage, we’ll use some Crucial BX500 drives as I think these strike a reasonable balance between cost and quality. We’re going to be bottlenecked by the single PCIe lane shared between the drives so there isn’t much point in getting the fastest drives available, any reasonably good quality 2.5″ SSDs would work for the build.

Lastly, we need a microSD card for the operating system. We’ll use a 32GB Sandisk Ultra card for this. I’ve been using these for my Pi projects for years and have had very few issues with them.

Sandisk MicroSD Card

I flashed the microSD card with Raspberry Pi OS Lite using Raspberry Pi Imager. This is the base operating system onto which we’ll be installing the NAS software Open Media Vault or OMV. When flashing the operating system image, you may want to change the name of your NAS and you’ll need to enable SSH so that you can log into the Pi remotely once it has booted up to install OMV onto it.

Flashing Raspberry Pi OS Lite

Radxa include hardware with the hat to secure the drives to each other. These make the drive stack a bit more secure, but I’d like to build the stack into an enclosure to better protect the Pi and Penta SATA hat, and provide some cooling to the drives.

SSD Spacers For Drives

Designing The Enclosure

To design the enclosure, I used Fusion360. I started out with a model of the Rapsberry Pi 5, then added the Radxa SATA hat and drives and then modelled the enclosure around them.

My initial thought was to lay the stack down horizontally like a traditional 4-bay NAS, but the Ethernet port on the Pi, the power port on the side of the hat and the power button and activity LEDs on the opposite side mean that it would be oddly proportioned and difficult to get cables plugged into.

So, I decided to keep the vertical arrangement and rather have the drives plug in to the hat through the top. I designed a tray to hold each drive with a pull tab to make it easier to swap out individual drives if needed.

Pi 5 NAS Design Front

To cool the drives I’ve included a cutout for a 40mm 5V fan on the side which blows air across the four drives and the air then comes up and out the gaps between the drives at the top of the enclosure.

Pi 5 NAS Design Back

I also added an LED bar to bring the drive activity lights onto the side of the case as well as a button adaptor to allow the Pi’s power button to be pressed and its activity LED to be visible. I’ve included an optional window on the side of the NAS to look into the case to see the drives. I decided on including options with and without this window in the set of print files as I know most people don’t have the tooling required to make the window up but I think it makes the NAS look quite cool.

LED Bar and Button Adaptor

The enclosure is split into two halves which screw together around the stack, making it easy to pre-assemble and install.

With the design complete, let’s get the components printed out.

Making The NAS Enclosure

I imported the models into Bambu Slicer and set them up to print the main components out in aluminium-coloured PLA with black text. The button adaptor and LED bar are printed in translucent PLA with black sections between the LEDs to separate them. I also added a black accent to the pull tab on each tray.

Download the 3D Print Files

Slicer For 3D Printing The Components

I then sent them to my 3d printer to print out across four build plates.

3D Printing The Components

While the parts are being printed, let’s make up the side panel. This is laser cut from a piece of 2mm clear acrylic and we then use a bending tool to put the 90-degree bend into it.

We not have all of the components required for the enclosure.

3D Printed Components

To finish off the 3D-printed parts, we need to add some M2.5 brass inserts for the screws to screw into. I’ve also included an option that doesn’t require these inserts in the print files to make it easier to make up but these inserts make the joints a lot more durable so I’d recommend using them if you plan on taking the enclosure apart more than a couple of times.

We also need to glue the window into place using a few drops of superglue or CA glue in the corners.

Mounting The Components Into The Enclosure

Now we can start mounting the components into the enclosure. Let’s start with the fan, which we can mount onto the side with some M3x12mm button head screws. I’m using a 40mm 5V Noctua fan with a thin dust filter between it and the case.

Before mounting the Pi assembly into the enclosure, we need to add the button adaptor to this corner standoff. It just pushes on around the standoff with a very light interference fit so that it is held in place securely but the button is still able to be pushed.

Button Adaptor Added To Leg

We also need to plug the FPC cable into the hat and the Pi.

FPC Ribbon Cable Plugged Into Pi and Hat

We can then mount the stack to the bottom half of the enclosure using some M2.5x6mm screws through the base.

The status led bar is mounted to the back of the Radxa hat and is held in place with the Radxa hat’s standoffs.

Activity Light Bar Mounted

I was going to power the fan using the port on the Pi or the Radxa hat but Noctua don’t have an adaptor to plug into these, so instead I soldered the included adaptor lead to the 3.3V and GND pins on top of the hat. The fan can then plug into this adaptor for power. I chose 3.3V so that the fan runs a bit quieter since it is not a PWM-controlled fan and will be running continuously.

The top half of the enclosure then screws onto the bottom half using six M2.5x6mm screws, three on each end.

Closing Up Enclosure With M2.5 Screws

We’re now ready to plug our drives in and get our NAS booted up. Each drive is mounted into a tray using four drive screws provided with the Radxa Hat.

Mounting Drives Into Trays

Completed Pi 5 NAS Enclosure

With that, our Pi 5 NAS is complete and ready for its first boot and setup.

First Boot & Software Setup

We only need power and a network connection to set up our NAS as we’ll be running it headless – meaning we’ll set it up through another computer. So let’s plug the 12V power supply and Ethernet cable into the NAS and it’ll be ready to boot up.

Plugged In Power and Ethernet

Once power has been turned on, leave the NAS for a few minutes to boot. It usually takes a bit longer to boot up the first time. We can then try to find it’s IP address. This can be done through your network’s DHCP table by logging into your router or by using a utility like Angry IP Scanner. We’re looking for a device called Pi NAS that has recently joined the network.

Finding NAS IP Address Using DHCP Table

We can then SSH into the Pi using its IP address to continue setting it up. I’m using Putty on my Windows PC to do this.

Now we need to copy and run this line from the OMV installation instructions GitHub repository to run a script to install OMV on our Pi:

sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
Installing OMV Using Script

The installation script takes about 5 minutes to complete and, if successful, should take you to a screen similar to this telling you that the pi is rebooting and your SSH session will be terminated.

When your Pi has rebooted, there is one more thing we need to do before opening up OMV to set up the software. We need to enable the PCIe port on the Pi as this is disabled by default. None of the connected drives will show up until we edit the config file below;

sudo nano /boot/firmware/config.txt 

We need to add the below two lines and then reboot the Pi.

# Enable PCIe Port and Set to Gen 3 Speed
dtparam=pciex1
dtparam=pciex1_gen=3
Enabling PCIe Port On Pi 5

You should then start seeing the activity lights on the drives light up and they’ll show up in the terminal.

Now that all of the installation and configuration work is done, we can access the OMV workbench through a browser by entering the Pi’s IP address. The default login is admin and openmediavault, which you’ll want to change immediately.

OMV Running On NAS

There are loads of good guides on setting up OMV, so I’m not going to go through it here in detail but these are the steps I followed:

  • Set up my four drives in a RAID 5 configuration to balance storage capacity and redundancy. This gives me a total usable storage capacity of 3GB.
  • Create a storage volume on the array.
  • Create a shared folder on the storage volume.
  • Enable SMB file sharing for Windows.
  • Create a user account with permission to access the shared folder.

With that complete, we can map the network drive to our PC and can then start using it.

Mapped Storage Drive To Windows PC

So now let’s see how good it is.

Testing The NAS’ Speed

Copying a single large video file to the NAS, we get an average speed of about 112MB/s which is about 900Mb/s.

Copying Video To NAS 1G Ethernet

A folder of 4,500 smaller files and directories is obviously a lot slower than the single large file but is comparatively as fast as copying them locally.

Copying Folder To NAS 1G Ethernet

Copying the large video file from the NAS, we get a similar average speed of about 110-112MB/s.

Copying Video From NAS 1G Ethernet

This looks like we’re saturating the gigabit Ethernet port on the Pi, so next I tried plugging a 2.5G Ethernet adaptor into one of the USB 3 ports on the front.

Adding A 2.5G Ethernet Adaptor To Pi 5

This made a significant improvement. I instantly got an average of 260MB/s copying files to the NAS although there were a few dips down to about 120MB/s and spikes a little over 270MB/s , so that’s not closer to saturating the 2.5G ethernet connection which is a great.

Copying Video To NAS 2.5G Ethernet

Copying the same large video file from the Pi to my PC, I got a little under 200MB/s.

Copying Video From NAS 2.5G Ethernet

Given the significant speed increase, this is a worthwhile upgrade for less than $20. It really is a bit disappointing that the Pi 5 doesn’t come with 2.5G Ethernet as this makes a big difference to performance for projects that require a large amount of data to be transferred.

Pi 5 NAS With 2.5G Ethernet Adaptor

Power Consumption

Power consumption is where this NAS shines, especially with its solid-state storage. At idle, the NAS uses a miniscule 9W and consumption only goes up to around 12 under load. This is significantly less than the 30-40 watts that a typical 4-bay home or small office NAS uses. My Asustor NAS uses about 18w at idle with the drives spun down.

Final Thoughts On My Raspberry Pi 5 Based NAS

So that’s my new 4-bay Pi 5 NAS complete. I’m really impressed with the speeds that I managed to get using the 2.5G Ethernet adaptor. This highlights one of the weaknesses in the Pi 5, which really should have been designed with a 2.5G Ethernet port given its relatively recent release date.

Drive Activity Lights Flashing

Cost-wise, this is not the most affordable NAS on the market but it’s also not particularly expensive considering it is very versatile and customisable, running open-source hardware.

The main NAS components, being the Pi ($80), Radxa Penta SATA Hat ($45), Cooler ($5), Power Supply ($15), MicroSD Card ($5) and Fan ($15) come to $165 – which is around the lower end of what a commercially available 4-bay NAS would cost, albeit without the DIY work required.

Pi 5 NAS Running On Desk

The NAS is really power efficient for those who live in an area or country where power is expensive. Running this NAS 24/7 for a year would cost less than a third of what a traditional NAS would cost to run.

Let me know what you think of it in the comments section below and feel free to send photos through of your build if you 3D print your own.

Michael Klements
Michael Klements
Hi, my name is Michael and I started this blog in 2016 to share my DIY journey with you. I love tinkering with electronics, making, fixing, and building - I'm always looking for new projects and exciting DIY ideas. If you do too, grab a cup of coffee and settle in, I'm happy to have you here.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest posts

Is The New Orange Pi 5 Pro A Good Raspberry Pi 5 Alternative?

Today we're going to be taking a look at the Orange Pi 5 Pro. This is a new SBC from Orange Pi that is...

Which NVMe Hat Is The Best For A Raspberry Pi 5

If you don’t know already, I’ve been selling these 3D printed cases for Raspberry Pi’s online for a few years now. With the launch...

Track Aircraft In Real-time With Your Raspberry Pi Using The FlightAware Pro

Have you ever seen a flight overhead and wondered where it is going? Or seen a unique-looking aircraft and wondered what type or model...

Related posts