Raspberry as NAS, multiple HDDs and an enclosure

3 years ago by WbrJr to c/selfhosted

Edit: thanks everyone for the suggestions. In the end I decided to buy a icy box usb3.1 4xhdd enclosure for around 100€. In the description it says it only works with mac and windows, but my Linux laptop works well with it, I guess the pi will to as well. I will print an enclosure for the power brick and the pi to screw to the drive case.

Here is why I choose this option: The pi is rather cheap compared to its power and also power consumption. I already had 4x4tb HDDs which I wanted to use, so at least 4 slots needed. The pi has 2x usb 3.0 connections which can be used simultaneously. One will be used for the 4bay, the other is free for now. I have the option to connect a second Nas case if I need more storage. Usb 3.0 is pretty fast, even if I don't get all the 5gbit/s. It's still faster than 1gbit/s ethernet.

I also thought about getting 2x 2xhdd enclosures to use the two usb3.0 at the same time. But decided against it because it would be a little more sketchy and I wanted to keep a free usb port for a second drive enclosure.

There are some enclosures that offer raid (hardware raid?) But I could not figure out if that would mean that all 4 drives will be raided, so I decided for the cheaper variant and would do the raid myself.

I plan on running 2 drives as raid1 and the other as raid 0 for secure storage and the other for movies and stuff I can download again.

Thanks again for all the comments!


It seems weirdly difficult to find a good solution to attach HDDs to my pi. Best case would be for me a enclosure with small power supply, space for my pi, and at least 2 bays for HDDs, rather 4. All that for under 100€ of cause :D

I could not really find cheap hhd enclosures that connect via usb. Any recommendations? I don't really want to use HDD toasters, they feel not permanent enough for a Nas. I could also not find sata to usb hats for the pi that are available right now

rambos 29 points 3 years ago

Pi NAS is a big pile of cables and adapters IMO. You can buy used PC with multiple SATA or M2 ports for 100€

path: 0 7073666, hotness: undefined, score: 29, children: 1
thedirtyknapkin 7 points 3 years ago

yeah, once you have the drives, building the rest of the system can be done for dummy cheap if you look at like cheap used workstations that some company or school is offloading. and it would still probably be a more capable system all around.

path: 0 7073666 7080623, hotness: undefined, score: 7, children: 0
atzanteol 22 points 3 years ago

It seems weirdly difficult to find a good solution to attach HDDs to my pi.

Being a nas is not at all what a pi is made for. So it's not surprising at all.

path: 0 7071957, hotness: undefined, score: 22, children: 6
JonhhyWanker 6 points 3 years ago

The Raspberry Pi would be a great low power device to have always on with some storage attached to backup to, store family photos, etc.

So not a high performance NAS, but good enough for this use case.

path: 0 7071957 7073689, hotness: undefined, score: 6, children: 5
atzanteol 10 points 3 years ago

not a high performance NAS

That is an understatement.

path: 0 7071957 7073689 7075338, hotness: undefined, score: 10, children: 4
Turun -1 points 3 years ago

It entirely depends on what you want to do with it. So calling it underpowered is not a statement that can be made in general.

path: 0 7071957 7073689 7075338 7097615, hotness: undefined, score: -1, children: 3
vegetaaaaaaa 2 points 3 years ago

Disk I/O always been the weak point of RPi, with slow USB being the only way to attach drives, and the USB port sharing the same bus as the network controller. A requirement for a frequently used Network-Attached Storage is... well... decently fast network and storage access. The Pi will not cut it for this specific task (moving external USB drives around your house would be faster and more practical).

path: 0 7071957 7073689 7075338 7097615 7103575, hotness: undefined, score: 2, children: 0
atzanteol 2 points 3 years ago

You not caring if it's underpowered doesn't mean it's not underpowered.

path: 0 7071957 7073689 7075338 7097615 7102452, hotness: undefined, score: 2, children: 1
possiblylinux127 9 points 3 years ago

Your raspberry pi doesn't have sata or pcie support. Depending on your use case you may want something other than USB as USB is slow

path: 0 7072850, hotness: undefined, score: 9, children: 11
BearOfaTime 6 points 3 years ago

And likes to drop the connection.

path: 0 7072850 7075135, hotness: undefined, score: 6, children: 6
ShortN0te 1 point 3 years ago path: 0 7072850 7075135 7104330, hotness: undefined, score: 1, children: 0
maiskanzler 0 points 3 years ago

And you typically don't get SMART-Data from USB-adapters.

path: 0 7072850 7075135 7102932, hotness: undefined, score: 0, children: 4
possiblylinux127 1 point 3 years ago

Yes you do. You just may need to turn it on.

path: 0 7072850 7075135 7102932 7103978, hotness: undefined, score: 1, children: 3
maiskanzler 1 point 3 years ago

From what I read online that can lead to instabilities and was therefore disabled on Linux.

path: 0 7072850 7075135 7102932 7103978 7143329, hotness: undefined, score: 1, children: 2
WbrJr 2 points 3 years ago

I have 2 HDDs with a speed of 180mb/s with a burst of 6gb/s according to the Seagate website. Usb3.0 has a data transfer rate of 5gbit/s

So the usb connection will be the bottle neck, but 1. My network speed is not that fast and 2. 5gbit/s is still plenty I think?

path: 0 7072850 7101014, hotness: undefined, score: 2, children: 3
possiblylinux127 1 point 3 years ago

First of all, you will never achieve usb3 full theoretical speed. Its just not going to happen. Even if you could though you wouldn't be able to get full speeds because your bandwidth is split between devices. You will be sharing the bus between plugged in devices along with on board hardware devices.

path: 0 7072850 7101014 7103959, hotness: undefined, score: 1, children: 2
ShortN0te 1 point 3 years ago

A USB 3.2 gen 1 connection (5 Gb/s) is still plenty for multiple HDDs AND when you have no need for compute on the NAS the network Link is the relevant bottleneck which is half of the USB connection.

Then USB 3.2 gen 2 (10 Gb/s) interfaces on HDD enclosures get more common every day which gives even more headroom with little more expenses.

path: 0 7072850 7101014 7103959 7104261, hotness: undefined, score: 1, children: 1
possiblylinux127 1 point 3 years ago

Can I see some benchmarks then? I just always went for sata drives.

path: 0 7072850 7101014 7103959 7104261 7104816, hotness: undefined, score: 1, children: 0
beeng 5 points 3 years ago

I ripped out the control board of the 2x bay toaster and then bought some sata extension cables (with power) for 2x HDDs. 3D printed a little drive bay type thing and then slapped the raspi on top with the usb controller. It works great!

Works for my usecase of basic NAS /SMB /SFTP and I can stream 1080p etc.

But would look to sata in the future also like you mention, couldn't find a hat, but USB speeds are fine for me.

path: 0 7073154, hotness: undefined, score: 5, children: 0
pl_woah 4 points 3 years ago

You can do it. I use a powered USB hub and a raspberry pi, and 5 hard drives.

It is a mess of cables but was simple enough.

I also sprang for a UPS because most filesystem's I tried like zfs and btrfs didn't appreciate random brownouts from running 4 drives off the pi itself.

Right now they're xfs and used for a minio install and torrent storage

path: 0 7096050, hotness: undefined, score: 4, children: 0
jelloeater85 3 points 3 years ago

Hey this and put FreeNAS / TrueNAS on this.

TERRAMASTER F2-223 2Bay NAS Storage – High Performance for SMB with N4505 Dual-Core CPU, 4GB DDR4 Memory, 2.5GbE Port x 2, Network Storage Server (Diskless) https://a.co/d/iT25GwL

path: 0 7089436, hotness: undefined, score: 3, children: 0
BCsven 2 points 3 years ago path: 0 7089209, hotness: undefined, score: 2, children: 0
krigo666 2 points 3 years ago

There are several solutions but will be above the budget. Best solution is the Argon Eon case for the RPi 4. I'm waiting for a version for the RPi 5.

Can house the Pi and either 4x 2.5" drives or 2x 2.5" and 2x 3.5" drives, all SATA.

path: 0 7072141, hotness: undefined, score: 2, children: 0
loganb 2 points 3 years ago

I dont know if this qualifies as a "toaster" but Ive used this docking bay in the past for a NAS and it served my purposes decently well. One thing to keep in mind is that random IO will be lacking with a usb interface. Also, this particular chipset does powercycle all the drives when one is removed so drive swaps end up requiring you to power the entire system off to perform. Also no integrated cooling may be a deal breaker as you illuded to.

If I was basing a nas build off of a PI, I would look to use the PCIe 1x2.0 interface on the pi 5 as a HBA.

path: 0 7071859, hotness: undefined, score: 2, children: 0
Oisteink 2 points 3 years ago path: 0 7072829, hotness: undefined, score: 2, children: 0
synapse1278 1 point 3 years ago path: 0 7103542, hotness: undefined, score: 1, children: 0
x3i 1 point 3 years ago

Geekworm offers a HAT and an enclosure for 2HDD and the Pi, that might suit you

path: 0 7136993, hotness: undefined, score: 1, children: 0
fart_pickle 1 point 3 years ago

I'm using terramaster as hdd enclosure. I have two of those, both connected to lenovo thinkcentre. I've tried rpi but I needed more power hence the lenovo thingy.

path: 0 7074899, hotness: undefined, score: 1, children: 0
Decronym -1 points 3 years ago

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
Git Popular version control system, primarily for code
NAS Network-Attached Storage
PCIe Peripheral Component Interconnect Express
RPi Raspberry Pi brand of SBC
SATA Serial AT Attachment interface for mass storage
SBC Single-Board Computer

5 acronyms in this thread; the most compressed thread commented on today has 6 acronyms.

[Thread #455 for this sub, first seen 27th Jan 2024, 21:35] [FAQ] [Full list] [Contact] [Source code]

path: 0 7072924, hotness: undefined, score: -1, children: 0
IndustryStandard -2 points 3 years ago

M2 is getting so cheap that having a drive spinning all day can add up in electricity whereas m2 is a lot more efficient.

path: 0 7098630, hotness: undefined, score: -2, children: 3
CalicoJack 6 points 3 years ago

For a NAS, you're usually concerned with capacity first. And you can't buy a 20TB m2.

path: 0 7098630 7103275, hotness: undefined, score: 6, children: 1
IndustryStandard -2 points 3 years ago

M2 isn't much more expensive than HDDs anymore. It used to be five times times the cost. Now maybe 1.5 to 2 times. And they require a lot less space and no dedicated backplane with seperate power.

Also you need redundancy. A 20TB hdd is very expensive and usually very overkill. Rebuilding them takes very long if you ever have corruption issues, along with other problems.

It's better to have three smaller drives than a single 20TB one.

Unless you're running an actual datacenter with cooling and big rack space, m.2 is a likely more worth it these days for a small home NAS.

path: 0 7098630 7103275 7106719, hotness: undefined, score: -2, children: 0
bruhduh 1 point 3 years ago
path: 0 7098630 7101164, hotness: undefined, score: 1, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
62975
6798
5747

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

go to feed...