YTread Logo
YTread Logo

The ULTIMATE Raspberry Pi 5 NAS

Apr 21, 2024
I've built a lot of Raspberry Pi Nas, from a small SSD Nas to the world's largest, petabyte Project Pi, but the pi4 and compute module 4 were barely adequate. I was never able to get even 100 megabytes per second over the network. Even with SSDs, the two most promising projects, the SATA Wire Truste board and the taco radas, were dead in the water, launched just before the great P shortage when you couldn't get a Raspberry Pi for love or money, but the Raspberry Pi 5 is already here. now it's faster, it has PCI Express and best of all you can get one, yes it's a little more expensive than the pi4 but with 4 bay ports available on the market costing $300 or more could we build a pin for less?
the ultimate raspberry pi 5 nas
Well today I'm going to look at it and to do it I'm going to use this little SATA hat that RADS us in this is $45 and it's already shipping, add a 12 volt power supply, a Raspberry Pi 5, a fan and a micro SD. card and we have a small Nas for under 150 dollars but the bottlenecks will kill this like they did with the pi 4. I mean the pi five only gets one gigabit, those other nases can do 2.5 and have a base of hot swap unit and supplier support. so yeah, comparing just price is silly, there will always be tradeoffs when DIYing, but this should have a lot less compromises than the sillier builds I've done in the past, at least I hope so, and with a network of 2, 5 gigs, I might have a solution.
the ultimate raspberry pi 5 nas

More Interesting Facts About,

the ultimate raspberry pi 5 nas...

That's why I'm going to put this together and see if it could be the Ultimate Raspberry Pi 5 Nas. I don't know exactly what tools will be needed and I don't know what's in the box. I hope it includes everything I need. but uh rans usually does a pretty good job, including all the little bits and bobs you need for this, it looks like it includes this extra cable, after all this is the penta SATA hat, so five SATA connections. I have four units here, uh, but you can add them. another one that uses this weird external I guess it could be eeta or something, but it has SATA and power from this port.
the ultimate raspberry pi 5 nas
Something important to think about is how you are going to supply power to it. I know some people in the comments have mentioned it. oh you need to supply power to the pi and this board but no i think you can power this board via the 12 volt barrel connector or via an ATX MX power supply here so if you have it in a PC case or something like that, you could do it that way and this will power the pi5 through the open GPI. This should be able to provide adequate power as long as the power circuit here is good enough to take that 12 volt signal and give a clean signal, you know, 3 to 5 amps on the 5vt rail of the Pi, now this doesn't have the normal PCI Express connector that you see on the pi5, so the pi5 has this little one, this little one here, uh, it has a much larger connector with more pins which could be something interesting. uh I think they have an adapter for it so yeah here it is so this is called FFC or flexible flat circuit board and it looks like they've included two which is good because these these little connectors are a little bit delicate you can see how thin they are you know they're like paper thin uh but these are flat flexible circuit boards or ffc and they connect from the Pi's PCI Express connector here to this guy here and The GPO pins here will provide power to the pi, at least that's my hope.
the ultimate raspberry pi 5 nas
There's a getting started guide here, but you know I'm going to YOLO and see what happens, something important whenever you're. Doing this is ensuring that the connector is fully seated and should go in fairly easily. If you push hard you will break the cable so don't do that if you push hard you may need to pull this little connection up and always do it on both sides so it doesn't come out because if it comes out it could break and then you would have no way to hold the cable down, you push down this little top part. and uh, this cable is now securely attached to the pi and then I'm going to plug it in here so it looks like this.
The funny thing is that these types of connectors are often used inside, you know, cameras. and other things that are assembled in factories and they take a lot of care, they have their methodologies, they even have tools to help, when you give these things to people in the general public like you and me, we tend to break the first one, so I guess it's a really good idea that they included a second one here, they probably have some screws too, let's check, yeah, there's a little kit full of screws in here, there's some clashes and stuff, and now I go.
To place this, I'm going to carefully place it and connect the GPO pins that provide power, but they fit together very well. Here there is a connector for an OLED and fan control board that is located above the hard drives on top they do not have it available yet. I think they used to. I don't know if they needed to review it for this or what, but I asked about it and it's not available yet, so that would be nice. I have to especially these are not that hot drives, but if you use hard drives if you use 2.5 on hard drives and those can get quite hot and it's good to have a fan blowing air on them.
I just realized I don't have any. fan on the cake and I should probably do that because it could be pretty hot and toasty in here, let's put our little active refrigerator in here. I hope this fits. I don't know if there was a warning against using this, but hey, cake. It needs some form of cooling, be it a heatsink or a fan, and there is no built-in fan. It would be great if there was a small fan under here or an option for one, but it doesn't look like that's the case. okay please, it still fits, it looks like it will fit, oh no, you know what the hell, the barrel plug is touching the top of the heatsink, there are literally, uh, it's only three, three of the fins on the heat sink, you know? what I could do could I see if I can bend them remove this again I'm going to disconnect this connection this is a terrible idea I wouldn't recommend doing it just bending this back and forth shouldn't affect performance that bad.
I removed the center part from the midpoint of these three little fins on the heatsink and there is a side view that you can make out, it's a little hard to make out, sorry, but come on. Put this all back together now and see if it fits well this time, if I go down you can go all the way down and look, that's enough room, as long as it works at the end it's all good. I use this huge guy. just tighten them up a bit, usually I would use a wrench for this but this works in a pinch literally my main recorder decided to corrupt the rest of the video so I lost all the footage but in that footage I mentioned that the plate It uses the jmbb 585 pcie gen 3x2 controller, which means that even if we upgrade the pi 5's bus to gen3 from its normal Gen 2, we will lose a little bit of bandwidth and also the kit comes with two side brackets that keep all the connections together. 2.5 inch drives, although there may be a case available at some point in the future, they actually had one in the past when it was sold for the rock four or the pi4 I think, but I guess they'll have to make another batch if They get enough interest in This new version of the repressed SATA hat is okay, so everything is put together now, everything looks good and I think there will be enough airflow.
There are holes on the sides, holes in the middle, to get enough air through at least for these units. I have a 5 amp 12 volt power supply, which should be adequate for these drives and the Raspberry Pi 5. I would budget maybe 3 to 5 watts per drive or, if you have 3.5 inch drives, maybe a little any more and you might want to get an 8 amp or maybe even a 10 or 12 amp PSU, but definitely don't use it as a 2 amp PSU and expect it to work, you're going to have all kinds of problems. I also have Raspberry Pios, a light 64-bit version and I could try opening Media Vault.
I'm going to take the micro SD card and put it in the slot and then I'm going to take this power adapter. The reason I'm at the desk is because I have my little one. This is a Zigg Third Reality Zigg Outlet that has built-in power measurement, which is very useful for testing. I'll go ahead and mention that here if I go to home assistant and then go to Power. You can see right now there's zero Watts because there's nothing connected to it there's going to be power coming in it looks like they wanted to line up the power with the USBC port not that that matters uh first I'm going to connect the network and connect the power and we'll see what happens, with Lucky, there will be no sparks.
I have a green light on the board and the pi is booting up. Power usage is up to 14.2 watts at boot and now the pi is rebooting so it will reboot a couple of times this first time. turn it on because it expands the file system to fill the S, the micro SD card, all that kind of stuff, so we'll go a little bit until everything is booted and then we can log on to the network and see if it's actually working, no I see no lights, there's only one green LED on the board here, but I don't see any other lights, so I don't know if there are lights per hard drive, so I'm going to log in. and we'll see what we can see sshp in pin.l there it is and if I say lsblk I hope we see those hard drives no, we're not seeing them, let's try lspci and I don't see the device at all.
If we don't see any errors here, let's go to the URL of this box and see if there are any other tips we're missing. sh Penta hat pent hat so we did that we did that oh so maybe I should do that let's try that come in here you would think it would do it automatically but it doesn't so let's enable PCI Express saving and reboot , so save it and reboot, so let's check again, there we go, we have 1 2 3 four hard drives and if I say LSP I can see the J Micron SATA controller now, right now it should be PCI Express Gen 2, we can check that with uh pseudo lspci - vvvv this will give us all the information about the PCI Express devices and if I go up here this is ahci, that is the core module for the uh SATA controller and we can go up to the top section to see what it is j Micron jmbb 585 and If I go down to link capacities it says Transfer speed of 8 gigabytes per second, width times two, that's pcie gen 3x two, but the state says they are transfers of 5 Giga times one, so there is definitely less bandwidth than that the chip is capable of doing so I'm I'm going to try PCI gen 3 and I can do it following my own guide if I go down here turn it on like this and reboot and we'll see if it gives us gen 3 speeds instead of two speeds that would give us the maximum . performance that we can obtain in the pi5.
I have four units that have nothing. I'll try. We should probably compare the drives first in RAID 10 just to see what the maximum speed is or maybe even raid zero. Let's do that, that's going to take a couple of minutes and we flash it so you can see that the LEDs are actually working. I didn't see them when I was looking before, but it has some LEDs and you can see them flashing when the dri or access, very good job, should check it out, it feels a little hot, in infrared. I found them at CES and they actually sent me home with a couple of goodies, this is the P2 and it's the reason I wanted it.
They sent me home with one to try, it has this Snap-on macro lens that you can see individual resistors or things on your PCB very close up, which is cool, but their software is a little iffy, um. It's not the best software I've used for IR cameras, but the camera itself is very good quality and works better than my old thermal finder, but let's check the temperatures here and it looks like the units themselves are a little reflective, so which we may not see the actual value of the unit, but the board is at 50° or so, the uh sta controller is down there, it looks like it's the hot part of this thing and it's going up to 60°C. like this it might be good to have at least one active fan blowing on the top, there's the cold soda can at 16°C and there's the hot SATA chip, so I'm going to put this cover on and take a good look closely to see if I get in Yes, we can see the chip itself is at 60°C, so it's pretty hot in there.
Yes, I would definitely put a fan or heatsink on it if you are going to implement it long term. Another fun thing with thermal imaging is that I can see all kinds of fun details, like you can see this is where my hand was resting and if I just put my hand on the table and take it off, there's a handprint and apparently this little one screen here also generates a little bit of heat and now it has my fingerprint, which is also warm, it seems that the formatting is finished and what is our next step.
Here mount the array okay mount raid zero so now let's do a disk benchmark and we'll run the These benchmarks and see how fast this array can run well here goes hey that's not bad at all , 87,850 at 60 megabytes per second and that's megabytes, so let's see how fast it was in megabytes, almost 900 megabytes per second on all four drives. zero rate, of course, uh, but uh, random reads of 687 megabytes per second andrandom rights of 758 and then we have a block size of 4K, 44 megabytes of reading and 152 megabytes of writing at 4K, which is not bad at all.
I'm interested to see. I think what I'll do is share Samb on this and we'll see if we can continually saturate a 1 gig connection, restart Samba, and create a password. Now I should be able to connect on my Mac py.local uh we'll make the shared directory here so I'm going to copy a folder with all the build footage which is 100 gigs and let's look at this let's see how fast it is that's the Online Speed ​​110 megabytes per second is pretty typical, let's see if it can maintain that data speed. I can smell that as a slight off-gassing here, so I think I'd put some sort of cooling in here just for that jmbb 585 chip in my other NASA. 1 GB, you can just hammer it and it will stay at 110 15 megabytes all the time.
However, this is much faster than the nasas pi4 I set up before and we'll let the screen recorder continue at 18 minutes and I'll keep moving while I copy it. I want to take a brief opportunity to tell you about Open sauce. Open sauce is June 15-16 in San Francisco and I'll be there, I'll be there along with a bunch of other creators in the creator areas E-hacking all kinds of fun stuff, if you want to go there's a way you can enter free and you can come to the party beforehand where all the other YouTubers and everyone will be present, uh, yes If you want to do that, you can apply to be an exhibitor.
They have tons of exhibit space this year. It would be great to see your project, so if you want to do it, go to opens sauce.com and if not, apply to be an exhibitor. You can also come as a normal person who is not exhibiting things, so I hope to see you there June 15-16. If not, I'll definitely post some stuff on Twitter and maybe something on YouTube. I don't know, so make sure. you are subscribed, copied everything to the pi now let's check the reading speed. I'm going to copy it back to a different folder on my local computer and see if it can give me 110 megabytes per second.
Oh look, it gives me 122, which is a little faster than the correct speed and you can see that the drives are reading pretty much at full speed right now. I don't know if that will fill the cache, but you can see. The data flows much more smoothly leaving the P than arriving at it, so there are some bottlenecks. I don't think it's Samba and I don't think it's the units themselves. I think there is a bottleneck somewhere in the Pi core. or something like that when it's running because I had that problem on the pi4 but on the pi4 it didn't even reach 120 megabytes per second all the time eh but reading that is not a problem at all here we are we are working on 120 megabytes per second I removed everything from there and it looks like obviously the read speeds are much more consistent than the correct speeds, but I'm going to try something else that I mentioned at the beginning of this video, what about the 2.5 gig network? now Pineberry Pi makes the hat net 2.5g.
This is a 2.5GB HAT for the Raspberry Pi 5. But you've probably already noticed that there's a problem. It has a PCI Express input. There is only one PCI Express connector on Raspberry Pi 5. How? Let's solve this problem because this needs it and I want to put it here as well to see if I can get a 2.5 gig network? I can try Pineberry pi's Hat Brick Commander and yes, they sent me these things, I would buy them. Myself anyway, but I'm going to reveal that Radza sent me this and Pineberry Piie sent me this. I'm testing these things to see if they can work together and do some crazy things, but Pineberry also sent me all these extra cables. of different lengths, one thing that can be a problem when you start connecting several things together is PCI Express signaling, so I will try to use the shortest cables I can for these experiments, but basically I will put this which is a PCX Express Gen 2, turn off the Pi's bus and then connect one connector to the SATA drives and the other connector to Hat net 2.5g.
The downside is that this will make everything PCI Express Gen 2 instead of speed. three, so you couldn't get 800 megabytes per second on these hard drives, but on the other hand, this is a 2.5 gig network and if we say, let's say, 2 gigs for networks and 2 gbits for the hard drives, we could do that to almost saturate the 2.5 gig network if the pi5 can support that, I don't know if it can or not, I don't think it can do it, but we'll see if any of this works, it also might not have enough power, I don't know, but I'm going to unplug this, okay, let's get that connector out of here, there is some risk if we mix these cables from different suppliers and connections, there is a small risk that something is happening. can go wrong but I hope that doesn't happen, it's definitely not my best work, there's an LED on here and I see a light on the switch and there's a power LED on the hat brick Commander and there's lights on here, let's see if this It's like that. actually going to work lspci hey look at that so we have the switch here we have the SATA controller here and we have the 2.5 gig controller here let's do uh IPA and we have an IP address on that so let's do a test performance now.
We're getting 2GBS, it's not 2.5gbits, but it's nothing, so returning only 1.6gbits, that's not horrible, it's still more than just talk, you'll probably get 2.5GB if you plug it directly into the pi . I think some of the overhead comes from that packet switching, uh, which also runs on the drives, so if I say lsblk we still have the drives and they're mounted, so we'll see if we get faster right speeds, it's doing 110 117, that's about the same as we were looking at before, so we're not going to be faster than a gigabit over the 2.5 gig connection, at least for rights.
I see some peaks up to about 125 megabytes per second, so it's better than a gigabit and it's interesting. The overall speed seems a little more stable at 2.5 gigs. Maybe the Pi's internal controller is a little weird, but I don't know, but it's giving us a bit more at the right speeds. I'm really interested to see the read speeds, although I hope we can get more than a gabit, let's check, there we go, 217 megabytes, 250 megabytes per second, that's more than I expect from a 2.5 gig connection so this can transmit that data. interesting, I think it's pulling from RAM because I don't see the drives flashing here.
It's probably copying all this data from RAM and now it's hitting the drives and you can see it drops a little bit there, up to 230 megabytes per Second, Linux usually caches files in RAM while copying them from one side to another, so if you have a file that you access frequently, it's much faster, but now that it gets to drives, it's only down 10 megabytes per second. So that's not bad at all, so for heavy reading, this doesn't seem like such a bad setup now that I know everything is going to work here. As for hardware, I think it's time to put omv here and see. how it is executed.
I haven't used omv 7 yet so this will be new to me. I don't think it's much different than omv 5 and six, but let me take this script and go here and hope it works. I'm going to SSH into the pi and just paste into your script the installer and here it goes let's check the power consumption so during the install it used between 8 and 10 watts and it looks like the baseline for this build is 8 watts with the 2.5. gig network adapter and everything else, but let's go to the past. local and this works maybe you have to use the IP address, let's try like this, there it is.
I guess it was still booting fine so that wasn't the problem, so admin and open media Vault are the password to log in there. there is no dashboard okay storage is where we should see our disk they should show up yeah 1 2 3 4 they are all 8 terabytes and I want to create an array of file systems. Here we create, create and mount an ext4 file system, but I want to create a raid array, how do I create a rate array? I'm missing something? I thought there was something here to create a raid, but I don't see it anymore.
What does this say? Look, this has raid management, but I don't see raid management anywhere. Do you see raid management anywhere? We could try ZFS instead of raids, but that's instead of an MD Manager raid so we can test it in open Medi Vault. I've never tried it on omv before, eh, but. We'll see how it works here. I like this little end of line. I guess it's a nod to Tron, the 1974 version, and we will raid Z1 since we have three units. A Z1 raid will use a drive equivalent to that for parody data that way you could lose one of these four drives and all the data would be intact but here we go it says pending changes 21 terabytes available let's apply this so now the tank should exist compression is on I don't know if I would need compression, but I'm not going to mess with any of that right now.
If we go to swimming pools, is there anything else? Can I make tools? What do we have so you can clean it? I don't know if automatically. it appears here but it gives us the group information, that's good, so this is a good interface, maybe it's not the best out there and I don't know if it comes with schedules and things by default, but it would be nice to have a scheduled snapshot and a scheduled pool cleaning, that might be something you can figure into the scheduled tasks, yeah, so you'd have to do some of these things, you'd have to add your own scheduled. tasks tab, it would be great if that added a few things by default, but I can see why they don't do that too, but now let's add a file system so we have a ZFS tank.
I'll add uh shared in shared tank and I'll just set everyone to read right now, save, activate SBA enabled 10. 0.221, okay, so you want me to use the IP and there's our shared volume, so let's copy some things. I have this folder. it's 100 gigabytes so I'll do that and here it goes it looks similar to the copies we were getting with raid zero it's interesting sometimes it goes a little faster than those copies so I wonder if ZF caching really It's helping here so far. I'm quite impressed. I think read speeds are where this wins. The right speeds are where this loses a bit because you won't be able to get the full 2.5. gigb networking on that, but it's better than I expected and the big win for me, besides the fact that this can be made smaller if we reconfigure these boards, the big win is power efficiency because right now we're using 15 or 16 watts, normally the other pots that I've built, using, you know, the pre-built pots that they use, they use 10 to 20 watts at rest and they use 25 to 30 watts when they're doing a lot of things, so this little guy just uses 16 watts to do the same amount of work, which is probably about half of what most pre-built Nas would use.
On the other hand, if you build a Nas with the RK 3588 chip, you could probably get even more efficient and faster, so there are a couple of boards out there that are interesting, that I might take a look at at some point, but the good thing is This is all very well supported as the software just clicks a few buttons and everything works. I haven't always had the same type of experience when using rock chip boards. Some of them are getting pretty good, although I'm going to go ahead and let this finish well and then do a full read of that 100 gigs of data and see where we end up at the end of the copy, it looks like the system used 22 watts per a while while doing some kind of processing.
I don't know what ZFS was doing there, maybe that was part of the compression. I don't know, there's a lot of power to use at the end. The actual performance was interesting after that initial part, where it was faster than Raid Zero. it actually slowed down to a little bit slower than raid zero during that long rest of the copy and that's why it's good to use a big file to test the real performance of your system because especially with CFS you're going to make a lot of money at first. on Ram and that rules out how fast your actual drive is, but the CPU usage wasn't that bad, the power consumption went down, you know, from 8 to 16 watts across the entire copy, but in the end the copy of the file was 74 megabytes. per second with CFS on raid Z1 and it was almost 100 megabytes per second on raid zero now that's for writing, which is going to be a little slower with a setup like this, the read speeds for both are practically the same, it's It's just that Basically, the line speed, it's not difficult at all to do the readings, so it's a little embarrassing.
All those conclusions I have are based on the fact that I was comparing all of this on a Mac and I switched to my Windows PC and I was able to get almost line speed for file copies of 1 gbit uh writing to pi and 150 megabytes per second writing over the 2.5 gig network, so that changes my perspective on this a bit and I think the most important thing is not to use a Mac. to benchmark network file copies, evenif you have 10GB network and everything else seems fine. Mac OS, for some reason, isn't great with file copies and I have a whole blog post and I have more details in the GitHub issue linked below, but back to the video, it's not inconceivable to build a system like this.
All of this still costs less than 200 dollars total including all these extra boards and stuff like that, but it always comes back to DIY meaning you're responsible for the software you're responsible for maintenance and updates and all that kind of stuff anyway it was a fun experiment and I plan to do some other fun experiments now that I have this little board here that allows me to split the PCI Express lanes and we'll see how we can double the PCI of the pi 5. Express Bus, it would be cool to see a compute module 5 expose even more but We'll see what happens every time it comes out.
I know it was a big change from the pi4 to the compute module because it now gave us PCI Express. we have it on the pi5, but i think we could do more in a compute module form factor, but we'll see until next time. I'm Jeff Garling.

If you have any copyright issue, please Contact