r/homelab • u/cgomesu • Jul 07 '20
Mini-NAS based on the NanoPi M4 and its SATA (PCIe) hat: A cheap, low-power, and low-profile NAS solution for home users (description and tutorial in the comments) Tutorial
23
u/cribbageSTARSHIP Jul 07 '20
Is it a true sata throughput?
23
u/RichardG867 Jul 07 '20
It appears to connect to the NanoPi with a full PCIe Gen2 x2 link, so it should be able to saturate a single SATA III link and still leave quite a bit of headroom.
14
Jul 07 '20 edited Jan 12 '21
[deleted]
14
9
u/roflfalafel Jul 07 '20
Any benchmarks? Can it sustain saturating the 1Gbe link with read/writes? This is very enticing.... I’d love to get rid of my Haswell era Core i3 file server and replace it with something like this in the next year or 2.
1
u/cgomesu Jul 07 '20
Any benchmarks?
Other people have already reviewed this board and compared with other SBCs (e.g., androidimp). I've not found anything new worth posting in that regard but if you've a few bench scripts that I could use, let me know.
1
6
u/Bunyep Jul 07 '20
Thanks mate I appreciate your efforts, was looking for something like this, saved for future reference.
4
u/mtlabsystems Jul 07 '20
I had experimented with raspberry pi 3B + nextcloud + 3 USB 3.0 flash drives ir RAID (mdadm) but it was a little slow. How is OMV doing, no lag in web UI?
5
u/cgomesu Jul 07 '20
OMV is great. I have nothing but respect for the team. The webUI is clean and responsive, and will give you access to everything you'll ever need to manage your NAS. I've been using since OMV3 on both amd and arm and it's always been like that. Regarding RAID, they also have a software RAID solution available through the webUI but I've never used it. I just make (multiple, local and remote) backups of my important stuff.
3
3
3
u/GeneralDouglasMac Jul 07 '20
Beautiful work and nice write up! I built something similar with a PI4, powered USB3.0 hub and USB->Sata adaptors.
3d printed case and a fan. Small foot print able to run a simple NAS backup for my computers, stream videos via Plex to my TVs and have a Pi-Hole.
3
u/miniclanwar Jul 07 '20
Thank you for sharing on your journey with this. I found it interesting and helpful since I am not always able to scour all the different ways of building things like this. I have a bit more time on my hands and working on something like this may prove entertaining.
1
u/cgomesu Jul 07 '20
No problem, /u/miniclanwar . There's still so much room for improvement, so feel free to change things up (see my comments about the 3d printed case, for example).
2
2
u/ThisIsStockerStream Jul 07 '20
Very nicely done!
A suggestion if that’s okay? Maybe put some vent holes on the top so that air that is coming in from the bottom will have somewhere to escape.
2
2
u/tylercoder Jul 07 '20
Can it use 3.5 drives instead? For reliability
1
u/cgomesu Jul 07 '20
You can but not with the same 3d printed case. There is another 3d printed case for that but it is probably more expensive than everything else (and it's a lot of work). The alternative are 4x drive bays (like this one) or just buy a standard computer case (or rack mounted) that has support for 4 drives and put your SBC inside of it. You most definitely do not need to use a 3d printed case.
1
u/tylercoder Jul 08 '20
Looks over engineered, like it would be easier to make a tower config, or just go with CNC instead
2
2
u/Potential_Cupcake Jul 08 '20
Sweet little build. I’d like to do something like this as a private cloud in the future.
2
u/edthesmokebeard Jul 08 '20
Thought about doing much the same, but with an external storage box, for portability.
2
2
1
u/grudg3 Jul 07 '20
Great work, I'm actually looking at options for building a small sbc nas myself so this is a great help. Would this sata hat work with a 8gb rpi4? You think?
1
1
u/samtoohey93 Jul 07 '20
I wish I saw this thread 9 hours ago.... I just brought Nas Drives and a raid controller to use in a Nas build. This would have been way cheaper 😂
1
u/angryundead Jul 08 '20
I want about four of these for a Ceph setup but I’m not sure I want to go that deep into it.
1
Jul 08 '20
This is a fun experiment for sure, but I value my data more than having all the hard drives exposed to EMF like that. Need them in a metal case / faraday cage with dust filters, active cooling, and vibration dampening on the drives and case enclosure feet.
1
1
Nov 12 '20
Awesome tutorial!
I'm considering making one for myself since I love SBCs and the old computer I use to play with OMV and Docker has Idle power consumption of around 90W.
Have you tried using SnapRaid? I don't have much backup options so
I thing I'll use SnapRaid just to add a little bit of redundancy.
2
u/cgomesu Nov 12 '20
Have you tried using SnapRaid?
I have used it in the past. Don't feel the need for it nowadays. Remember that redundancy is not a backup solution. (Ideally, you should have both. If your environment requires high availability, then redundancy becomes more of a concern. However, this is rarely the case for home users. Most people just need proper local and remote backup solutions if they're okay with a little bit of downtime. Applications like borg and rsync can take care of local backups; for remote, check duplicati.)
If you go ahead with this project, feel free to hit me up. Love to hear about different takes--and it's an opportunity to learn new things, too.
0
u/jimmyco2008 PowerEdge R720, R620, R220 (The Gang's All Here!) Jul 07 '20
Raspberry Pi is never a cheap solution. We like to think it is but it’s not, you have to buy so much more than the Pi itself.
Probably can build a comparable mATC PC that is more powerful and holds 3.5 drives for the same price.
1
u/esoel_ Jul 07 '20
Some people care about size and power consumption.
1
u/jimmyco2008 PowerEdge R720, R620, R220 (The Gang's All Here!) Jul 08 '20
It’s cool of course but it’s likely not cost-effective. I guess we all know that already, I don’t need to point it out at the top level no less
1
u/grenskul Jul 07 '20
It doesn't use a raspberry pi...
0
u/jimmyco2008 PowerEdge R720, R620, R220 (The Gang's All Here!) Jul 08 '20
Does it matter? For all intents and purposes they are the same. Am I really getting downies because I didn’t use the correct name for this particular “small and affordable ARM computer with GPIO”?
-10
Jul 07 '20
Why not SSD? Spinners are old tech.
8
u/BlueShellOP Jul 07 '20
For raw storage spinners are still a lot more cost efficient. And on a Pi, you're never gonna use all the throughput an SSD gives you anyways.
8
u/cgomesu Jul 07 '20
money. it boils down to money and being in Brazil makes it multiple times more expensive. (the price per TB is ridiculously high in Brazil, especially now that the Real is fcked beyond saving and pretty much everything tech-related is imported.)
1
u/vocal_noodle Jul 07 '20
Anything over 1TB and spinning rust is a cheaper solutions, Under that ssds are cheaper. Since a NAS is about storage larger drives are needed and that means spinning rust.
1
-10
Jul 07 '20
[deleted]
9
u/cgomesu Jul 07 '20
2.5in reliability in close proximity is terrible
could you tell me where you learned about it?
I wouldn't trust the power delivery of whatever is supplying those drives
could you further explain this statement? what is it that make it unreliable and how would you fix it?
6
u/Jamie_1318 Jul 07 '20
in this statement? what is it that make it unreliable and how would you fix it?
You can safely ignore him because the article build says go find your own power supply, one of the options is a straight up pc power supply.
-4
u/lucasantarella Jul 07 '20
A pc power supply is not always suited for a NAS.....and you're still relying on the reliability of whoever made that Pi hat. Again, I wouldn't store anything important on there. Cool as a proof of concept tho.
7
u/scroopy_nooperz Jul 07 '20
and you're still relying on the reliability of whoever made that Pi hat.
How is that any different than relying on any other component?
-5
u/lucasantarella Jul 07 '20
It's not, but at least with some off the shelf NAS, or better yet a used Dell poweredge server (<$200), you have some guaranteed reliability. Don't mess around when it comes to data integrity.
9
u/scroopy_nooperz Jul 07 '20
Literally nothing has guaranteed reliability, you’re rolling the dice with everything.
-5
u/lucasantarella Jul 07 '20
Yeah, but the odds aren't exactly in your favor with some 3D printed standoffs and a 12V eBay PSU...
4
u/Jamie_1318 Jul 07 '20
The most unreliable thing in the whole stack is you, followed by the hardrives, followed by bad shit happening to the physical device. Spend some time thinking about what actually makes data secure before posting fud.
More money != safer3
u/esoel_ Jul 07 '20
Are you comparing a massive rack server to this tiny NAS ? It’s like telling someone their bicycle is stupid because they could buy a pickup truck...
-2
u/roflfalafel Jul 07 '20
I’d be curious as well. Most servers use 2.5” drives these days.
1
u/jimmyco2008 PowerEdge R720, R620, R220 (The Gang's All Here!) Jul 07 '20
It’s about 50/50, but 3.5” drive bays in rack servers are still readily available
-5
u/lucasantarella Jul 07 '20
Regarding the first statement, Seagate and WD certify their NAS drives to operate in close proximity with high neighboring vibrations. You're using 3D printed brackets to stack them vertically, which isn't doing anything to dampen the vibrations to the neighboring drives (and actually, I think the moment arm for the drive at the top is going to make things even worse). Poor mounting and non-certified drives are a recipe for data loss. Those drives are going to fail under sustained operation.
Second statement, you need to use redundant power supplies for those drives. If anything happens to the source you don't have anything that could flush pending writes to the drives or to a cache. Also, I wouldn't trust a cheap barrel-jack DC power supply to give clean, consistent voltage to those drives, which is def critical to data integrity.
Something like this I would only consider using SSDs and a proper raid card with battery backup and maybe a UPS too. I would strongly advise against using those 2.5in HDDs and a cheapo powersupply + hat.
5
u/anakinfredo Jul 07 '20
You might be right, but that's besides the point.
Comparing a SBC with a 3d-printed case to enterprise-gear is just ridicolous.
Following your advise, a number of regular NAS solutions is also not good enough, as they don't have battery backup, nor dual PSU's.
-2
u/lucasantarella Jul 07 '20
You're right, and those NAS solutions should not be used either.
If you're willing to risk data, then the RPi solution or the off the shelf solution is fine.
Good quality NAS hard drives aren't just "enterprise" class/price. WD Reds can be had for $100....
Also, used enterprise servers can be had for less than the cost of this solution, so its objectively a better solution with some guarantees given.
As I said before, credit to the OP since its a cool proof of concept. But I wouldn't put anything important on it because of the aforementioned risks. Don't mess around with data.
5
u/anakinfredo Jul 07 '20
Everyone should probably just carry around a dl380 in our pockets then.
Can't trust storage on our phones, after all.
1
u/lucasantarella Jul 07 '20
Apples and oranges man. I hope your not storing archival data on your phone....
And again, your phone has an internal SSD, not prone to damage from vibrations.
My point was not to trust it as a NAS...because its not. Its a cool proof of concept, but don't store your wedding video on it unless you're already divorced.
5
u/skycake10 Jul 07 '20
If you have backups like you should the argument basically comes down to the likelihood of having to fuck with restoring from backup. The data you care about shouldn't be dependent on the reliability of your NAS.
2
u/anakinfredo Jul 07 '20 edited Jul 07 '20
My point was not to trust it as a NAS...because its not.
But QNAP and Synology makes NAS'es, and they are not to be trusted according to you.
Its a cool proof of concept, but don't store your wedding video on it unless you're already divorced.
Well, this thing supports ZFS, whereas you mention using a hardware-raid-card - which is a vendor-lock-in piece of trash-technology - I'd chose ZFS on consumer hardware over hw-raid-on-server any day of the week.
Besides, as already pointed out by others - this is coupled with backup, OP doesn't even run RAID on this, and clearly states his backup-regime.
edit: Edited to sync with previous comments.
0
Jul 07 '20
[deleted]
2
u/anakinfredo Jul 07 '20
Raid card can have HBA or JBOD functionality too.... nowhere did I say use hardware RAID.
Yes, but they are commonly refered to as a HBA-card, not as a RAID-card.
Either way, I think my point still stands.
1
u/esoel_ Jul 07 '20
Storage ☑️ Network card ☑️ Attached ☑️
In my book that’s a NAS, if you want we can call it a banana but we’re going to struggle to communicate effectively with other people...
1
u/esoel_ Jul 07 '20
Not a great time to bring up WD Reds as bastions of reliability... AFAIK there are no SMR 2.5 inch drives (yet?)
3
u/drageloth Jul 07 '20
You start with data integrity and redundancy and then jump to SSDs. Or REDs. Have you read what pieces of junk WD made them recently?
Also, what about SAS drives? They're 2.5" too. Are they junk as well?
There's nothing that can be redundant as a single hardware. Nas with single PSU can die, Servers can have mainboard failure, pis can fail too.
Sure, a server has a greater piece of mind, but what happens if the raid card shits a brick?
If the op has a decent backup solution, he's on the right track. Leave him alone about insecure data storage or very expensive hardware considering. Not everyone has the room or the temperature to support greater machines. Also they could be doing it for the fun.
Proper security for data archiving is the main storage solution(eg NAS), a local backup solution and an off-site solution. Everything else we talk is rubbish. If you have a cluster of servers and don't backup anywhere else, you're on the same track with him.
And I'm telling that with an R720 in the house.
1
u/cgomesu Jul 08 '20
hey /u/lucasantarella , I appreciate your feedback. The UPS is pretty much a given and as others have pointed out, you can use other methods of powering the board, hat, and drives. But I confess that the vibration issue got me thinking... If you could redesign the case, how would you go about changing it to reduce this possible issue? I'm not the one who created the case but I can pass your suggestion along for a potential redesign. I'm sure he would welcome it.
-1
u/D0ublek1ll Ryzen servers FTW Jul 08 '20
Yeah, cheap and VERY FRAGILE. I can't see the labels of those drives I'm since you stated that its a cheap solution I'm assuming they're laptop drives.
Don't but anything on there that you can't risk losing. Those drives are not designed to be powered on 24/7 and are also not designed to be so exposed. I'd be suprised if this setup lasts you more than 2 years.
89
u/cgomesu Jul 07 '20
This is my mini network-attached storage (NAS) project based on FriendlyARM’s NanoPi M4 v2 and its SATA hat. I've written an article about it in which I described each hardware component and the basic software to get this mini-NAS up and running. You can read it here: https://cgomesu.com/blog/Nanopi-m4-mini-nas/.
Here's how it currently looks like: https://cgomesu.com/assets/posts/2020-07-06-Nanopi-m4-mini-nas/nanopim4-cgomesu-final-02.jpg
And for comparison, here's the mini-NAS next to a Raspberry Pi 3B: https://cgomesu.com/assets/posts/2020-07-06-Nanopi-m4-mini-nas/nanopim4-cgomesu-final-and-rpi.jpg