HomeRaspberry PiRaspberry Pi NAS: (NAS-pi) Network attached storage under $21* #part1

Raspberry Pi NAS: (NAS-pi) Network attached storage under $21* #part1

Getting a NAS drive under $21?

Right now, I’m too poor to get a Synology DS415 play. I may not have the money, but I have a very good imagination and a Raspberry Pi. Perhaps if you are reading these words you have (or planning to have) the RPI too. While it is not that hard to hook up an HDD to a Raspberry Pi and store files on it, it becomes a challenge if you wish to have RAID support and DLNA services available. This is the story of the Raspberry PI NAS -pi network-attached storage for a fraction of the price.

Raspberry PI  NAS – NASpi

img_20161009_102731

I’m aware of serious limitation that comes with the RPI -Ethernet 10/100. Perhaps this would never be a solution for you, or perhaps it could! Raspberry PI NAS -pi will be shared in my household between 4 computers and a PS4. It will be a backup unit, where files like pictures and documents will be stored on a RAID1 protected drive. In addition to that, universal storage will be added to keep the media files for DLNA purposes. I know for a fact that there will be never more than 2 users accessing the NAS-pi at the same time and majority of files saved on the drive will be below 10MB.
If this is you, perhaps you should not dismiss the Ethernet 10/100 straight away. While far from perfect this a very workable solution, especially at that price. I have tested the prototype with the Raspberry Pi 2 and 3, and since there was no visible difference – RPI2 will be the device I will use for the build.

Cost

I will assume you already own a Raspberry PI. I think it is fair to do so otherwise you wouldn’t be reading this. With that cost aside ($35 or less as you can hunt for RPI2 models) the box alone is pretty cheap. The prototype costs $12 mostly because I had the SATA connectors salvaged from the external drives a long time ago. You can get the cables from $2 on aliexpress.com if you don’t mind the wait.
While that $18 (3HDD option + storage) solution works well and can be placed inside of the box or something, this is not how I imagine my final result.

 MINOPTIMALMID
RPI**28.9928.9928.99
HUB9.999.999.99
HDD enclosure x3012.3612.36
HDD sata2USB x3600
USB01.590
Gigabit USB08.590
Case01511
Heatsink030
PRICE £15.9950.5333.35
PRICE $20.6271*65.183743.0215

This should give you the price reference for the build. The case price is the price of acrylic glass sheets needed to enclose the build. **Prices of the RPI are not included in the calculation.

Performance

We know now – how expensive it can be. How fast will it work? I’m not a big fan of synthetic benchmarks. They never give you an easily understandable picture of what to expect. Here is what to expect:

NAS

During my test, a 1.03GB file was transferred to the NAS-pi within 1 min 45 seconds.  The same operation when reading the file took 15 seconds less. A collection of 30 pictures from my DSLR  (8MB per picture as JPG- 186MB) has been sent to the NAS-pi in 25 seconds. Opening the picture  (8MB) from the drive took less than a second.

DLNA (video streaming)

I was easily able to stream any mp4 file saved from YouTube (4k files included). It is worth noting that these are not the ‘real’ 4k files (lowered bitrate, but 4k resolution).
I have tested video files up to 9GB  (2h video at 10Mbps ) in total, and I was able to play a steady stream without any issues. It is worth noticing that you may want to double check the playback device codecs as PS4 was not able to handle AAC audio with multiple streams.
In short, unless you are keen on streaming Bluray quality content you should not have any issues with the playback. Very good indeed!

NAS-pi Storage

dsc_3052-001

Three drives will be connected to the RPI2. All of them has been salvaged from laptops that were no longer able to use it. There is no need to get a bigger or faster drive for this build as the biggest bottleneck will be the Ethernet 10/100 port. Another important reason why I’m choosing the 2.5” HDD is the size. I’d like to keep the size of the box as small as possible.

RAID1

The bottleneck means that we don’t have to concern ourselves with disk speeds and RAID1 (mirroring) will be a perfect solution to keep the drives fault free. It matters more as the drives are not new. For this purpose, I  have two 160GB drives. I’d say this will be sufficient for all files and photos I have. Because I’m bored (or I needed a challenge) hard drive will be also hot-swappable. Something tells me this will become an issue later on when designing a cover for the Raspberry PI NAS -pi. Drives are formatted in Ext4.

MAIN STORAGE

My media storage is another drive 1.4TB. This should be sufficient for anything I wish to store on it. The drive will be formatted to NTFS as I’d like to transfer all my files in an easy way and I have a SATA reader built into my PC case. I will be able to unmount the drive and move the files manually if I wish so.

Power struggles

dsc_3054-001

When prototyping the Raspberry PI NAS -pi I quickly realized that I will need much more power than RPI is able to give. In fact, much more than a standard USB 2.0 hub would give you. To make the entire project more difficult I only want a single power cable to run from the mains to the NAS-pi.
After testing few hubs (and failing) I found something small and powerful enough to supply that amount of current to all the drives and the Raspberry Pi as well. It would be easier if the size was not a concern.

The hub is a 4 port USB 3.0 with a power microUSB socket and it is available from TeckNet. The hub is powered by the original 2.5A power supply that came with the Raspberry Pi. If you can get a 3A one, you should as both drives and Raspberry Pi will be connected to the same hub and draw the power.

Shopping list:

ItemAmazon UKAmazon USAAliexpress.comBanggood.comComments
1 x USB 3.0 4 port hub£8.99$9.99$6.64$11.99I picked the microUSB powerd one, other are available
4 x USB angled cables£6.99 pack of two$6.99 pack of two$1.68$2.99Plan the bends accordingly
1 x 2.5 -3 A 5V power supply£5.79$8.99$4.99$5.75Works from 2.4A but aim for 3A if possible
1 x Raspberry PI 2/3£32.00$35.10$39.50$39.99There is no speed penalty for RPI2
3 x HDD£5.95$8.99$8.49$9.49Needs to have a specific opening mechanism
USB hub with power 2.5A£12.22$16.99   

The NAS-pi prototype

img_20161009_180623

While prototype works, it is not something I would like to keep in the current state in my living room. While being more than capable, it looks ugly and needs a container. This is where the majority of the Raspberry PI NAS-pi fund will go. I’d like to build the smallest enclosure possible that allows me to fit 3 drives inside while allowing hot-swapping. The only cables I’d like to see outside is the Ethernet cable and the power one. This means some work has to be done on the Raspberry Pi itself. The container will be built from 5mm thick acrylic glass. This should provide a nice finish, and with a massive selection of colours, I could even make it look attractive.

In part 2 we will cover all the modifications that need to be done to the Raspberry Pi to fit it inside the case.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

M5Paper

Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs

client-image
client-image

Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on

client-image
client-image

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

0
From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

0
Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

0
Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification

USBerry PI -USB Raspberry Pi Zero on the go!

0
Perfect Raspberry Pi gift to anyone passionate about making

HOW TO...

How to boot Raspberry Pi 5 from NVMe M.2 SSD

0
This is how you can boot your Raspberry PI 5 from NVMe in 10 min! Check out these easy instructions

It took me 2 months to boot CM4 from NVMe

0
Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

0
It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

0
A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

0
How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation