The ULTIMATE Raspberry Pi 5 NAS

Jeff Geerling
4 Apr 202432:14

Summary

TLDRIn this detailed script, Jeff Geerling embarks on an ambitious project to build a Raspberry Pi NAS (Network Attached Storage) system. Starting with his experiences using Raspberry Pi 4 and Compute Module 4, he highlights the limitations he faced, particularly with speed and availability during the Pi shortage. With the launch of Raspberry Pi 5, which offers faster speeds and PCI Express support, Jeff explores the possibility of creating a cost-effective NAS. Using a Radxa SATA HAT, a Raspberry Pi 5, and additional components, he constructs a compact NAS for under $150. The script meticulously documents the assembly process, power considerations, and potential bottlenecks. Jeff also addresses the challenge of achieving 2.5 gigabit networking with the Pi 5 using a HatBRICK! Commander and HatNET! 2.5G. Throughout the build, he tests the system's performance, noting the trade-offs between DIY solutions and off-the-shelf NAS devices. The script concludes with Jeff successfully running Open Media Vault (OMV) on the Pi NAS, achieving satisfactory read and write speeds, and reflecting on the DIY nature of the project, emphasizing the importance of user responsibility for software, maintenance, and updates.

Takeaways

  • 🚀 The Raspberry Pi 5 and its Compute Module 4 offer significant improvements over their predecessors, making it possible to build a more capable and faster NAS (Network Attached Storage) device.
  • 💾 The use of a SATA HAT, like the Radxa 'Penta' SATA HAT, allows for the creation of a compact and cost-effective NAS solution with multiple drive bays.
  • 🔌 Power supply considerations are crucial when building a DIY NAS; the power supply needs to provide sufficient and clean power to both the Raspberry Pi and the SATA HAT.
  • 🔩 The assembly of the NAS requires careful handling of delicate connectors, such as the FFC (Flat Flexible Circuit), to avoid damage.
  • 📡 The Raspberry Pi 5 supports gigabit networking, which, while not as fast as some commercial NAS solutions, is still a substantial improvement over previous models.
  • 🔧 DIY NAS solutions often require trade-offs between cost, performance, and features, but they offer flexibility and can be more cost-effective than off-the-shelf solutions.
  • 🌡️ Proper cooling is essential for the longevity and performance of the NAS, especially when using hard drives or in scenarios where the device is under heavy load.
  • 📈 Benchmarking showed that the DIY NAS setup could achieve read and write speeds that are competitive with commercial options, particularly when using RAID configurations.
  • 📊 The use of ZFS on the Raspberry Pi 5 provided data protection with RAIDZ1 and demonstrated good performance, although write speeds were slightly lower than RAID 0 configurations.
  • 🤖 Open Media Vault (OMV) was successfully installed and used to manage the RAID array and shared folders on the Raspberry Pi 5 NAS.
  • ⚙️ The HatBRICK! Commander from Pineberry Pi was used to add 2.5G networking to the Raspberry Pi 5, showcasing the potential for higher network speeds with additional hardware.

Q & A

  • What is the main purpose of the Raspberry Pi NAS project discussed in the script?

    -The main purpose of the Raspberry Pi NAS project is to build a Network Attached Storage device using Raspberry Pi 5 and a SATA HAT, aiming to achieve a cost-effective and compact storage solution.

  • What are the two projects mentioned that were launched before the great Pi shortages?

    -The two projects mentioned are the Wiretrustee SATA board and Radxa Taco, both of which were promising for the Raspberry Pi NAS project but failed to take off due to the Pi shortages.

  • What is the cost of the Radxa SATA HAT used in the project?

    -The Radxa SATA HAT used in the project costs $45 and is already shipping at the time of the script.

  • What is the maximum network speed that the Raspberry Pi 5 can achieve in this setup?

    -The Raspberry Pi 5 in this setup achieves a gigabit (1000 Mbps) network speed, which is less than the 2.5 gigabit speeds that other NASes can achieve.

  • What is the JMB585 controller used for in the Raspberry Pi NAS project?

    -The JMB585 controller is a PCIe Gen 3x2 SATA controller used in the project to manage the connection and data transfer between the Raspberry Pi 5 and the SATA drives.

  • What is the issue with the HatNET! 2.5G and Raspberry Pi 5's PCI Express connector?

    -The issue is that the HatNET! 2.5G has one PCI Express input, but the Raspberry Pi 5 has only one PCI Express connector, which is already used by the SATA HAT. To solve this, a HatBRICK! Commander is used as a PCI Express switch to connect both devices.

  • What is the power supply requirement for the Raspberry Pi 5 NAS setup?

    -The power supply requirement depends on the type of drives used. For the setup with 2.5-inch drives, a 5A 12V power supply is used. However, for 3.5-inch drives, a higher wattage supply like 8A or 10A might be needed.

  • What is the maximum read speed achieved during the benchmark test of the RAID 0 setup?

    -The maximum read speed achieved during the benchmark test of the RAID 0 setup was almost 900 megabytes per second.

  • What is the main advantage of using ZFS over RAID in the context of the Raspberry Pi NAS project?

    -The main advantage of using ZFS over RAID is that it provides features like data integrity, automatic repair, and the ability to use more advanced configurations like RAIDZ1, which offers redundancy and protection against drive failures.

  • What is the power efficiency of the Raspberry Pi 5 NAS setup compared to prebuilt NAS devices?

    -The Raspberry Pi 5 NAS setup is more power-efficient, using around 15 to 16 Watts during operation, which is about half of what most prebuilt NAS devices would use for the same amount of work.

  • What is the conclusion about using a Mac for benchmarking network file copies in the context of this Raspberry Pi NAS project?

    -The conclusion is that Mac OS is not ideal for benchmarking network file copies, even if it has 10 gigabit networking. The script suggests that one should not use a Mac for such benchmarks and that Windows PC provides more accurate results.

Outlines

00:00

🔧 Building a Raspberry Pi NAS: Challenges and Potential

In this segment, the narrator discusses their experiences building various Raspberry Pi NAS systems, including the limitations faced with the Pi 4 and Compute Module 4. They highlight the promising arrival of the Raspberry Pi 5, which offers improved performance and availability. The narrator aims to build a cost-effective NAS using a $45 SATA HAT from Radxa and emphasizes potential bottlenecks and trade-offs compared to off-the-shelf NAS systems.

05:04

🛠️ Assembling the Hardware

The narrator details the assembly process of the Raspberry Pi NAS, including connecting the SATA HAT and ensuring adequate power supply through the GPIO pins. They mention the absence of a fan for cooling and make a makeshift modification to fit the active cooler. The segment highlights the importance of carefully handling delicate connectors and ensuring proper seating of connections to avoid damage.

10:08

📈 Initial Setup and Troubleshooting

This part focuses on powering up the NAS and addressing initial setup issues. The narrator struggles with enabling PCI Express and correctly configuring the system to recognize the hard drives. After troubleshooting, they successfully detect the drives and discuss the technical details of the Jmicron SATA controller and its bandwidth limitations on the Raspberry Pi 5.

15:10

🚀 Performance Benchmarking

The narrator runs performance benchmarks on the NAS, achieving impressive speeds of up to 900 megabytes per second in RAID 0 configuration. They describe the process of copying files over the network, noting that the read speeds are higher than the write speeds. The segment also includes information about upcoming events like Open Sauce, inviting viewers to participate and meet other creators.

20:15

🔗 Exploring 2.5 Gigabit Networking

Here, the narrator experiments with adding 2.5 gigabit networking to the NAS using a PCI Express switch and a network adapter from Pineberry Pi. They address potential issues with PCI Express signaling and power requirements. Initial tests show improved read speeds, though write speeds remain similar to previous benchmarks. The segment underscores the trade-offs between achieving higher network speeds and maintaining hardware compatibility.

25:20

📦 Setting Up Open Media Vault

The narrator installs Open Media Vault (OMV) on the Raspberry Pi NAS and navigates through its interface to create a RAIDZ1 array using ZFS. They emphasize the benefits of ZFS for data integrity and note the power efficiency of the setup compared to prebuilt NAS systems. The segment includes observations on power consumption and performance during file transfers.

30:23

💻 Final Thoughts and Mac vs. Windows Performance

In the concluding section, the narrator revises their performance conclusions after testing the NAS on both Mac and Windows platforms, noting significantly better write speeds on Windows. They discuss the overall feasibility of building a cost-effective and efficient Raspberry Pi NAS, acknowledging the responsibilities of DIY projects. The narrator expresses anticipation for future experiments with the Raspberry Pi 5's PCI Express capabilities and potential advancements with a Compute Module 5.

Mindmap

Keywords

💡Raspberry Pi NAS

A Raspberry Pi NAS (Network Attached Storage) is a storage device that connects to a network, allowing multiple users to access and share files. In the video, the creator discusses building different sizes of NAS devices using Raspberry Pi, from small SSD-based systems to a large-scale 'Petabyte Pi' project.

💡PCI Express

PCI Express (Peripheral Component Interconnect Express) is a standard interface for connecting hardware devices to a computer. The video highlights the importance of the Raspberry Pi 5's PCI Express support for enhancing the performance of the NAS by allowing for faster data transfer rates.

💡SATA HAT

A SATA HAT (Hardware Attached on Top) is an add-on board for the Raspberry Pi that provides additional SATA connections for hard drives or SSDs. The script mentions using a SATA HAT from Radxa, which is crucial for the construction of the NAS system.

💡FFC or Flat Flexible Circuit

An FFC (Flat Flexible Circuit) is a type of flexible and thin electronic circuit board that can be easily bent without damage. In the video, the creator uses FFCs to connect the Raspberry Pi's PCI Express connector to the SATA HAT, which is a delicate operation due to the thinness of the connectors.

💡JMB585

The JMB585 is a SATA controller chip used in the SATA HAT to manage the connection and data transfer between the Raspberry Pi and the attached storage devices. The video discusses the limitations of this controller in terms of the bandwidth it provides.

💡RAID

RAID (Redundant Array of Independent Disks) is a method that combines multiple physical drives into a single logical unit for data redundancy or performance improvement. The video explores different RAID configurations, such as RAID 0 and RAID 10, to test the performance of the NAS.

💡ZFS

ZFS is a combined file system and logical volume manager that is known for its robustness, such as protection against data corruption and support for high storage capacities. The video demonstrates the use of ZFS on the Raspberry Pi NAS for creating a storage pool with RAID-like capabilities.

💡Thermal Imaging

Thermal imaging is a technique used to map the temperature of objects by using infrared cameras. In the context of the video, the creator uses thermal imaging to check the heat generated by the Raspberry Pi NAS components, particularly the SATA controller, to ensure they are within safe operating temperatures.

💡HatNET! 2.5G

The HatNET! 2.5G is an expansion board for the Raspberry Pi that provides a 2.5 Gigabit Ethernet port. The video discusses the integration of this board with the Raspberry Pi NAS to achieve higher network speeds, which is a significant upgrade from the standard 1 Gigabit Ethernet.

💡HatBRICK! Commander

The HatBRICK! Commander is a device that allows multiple HATs (Hardware Attached on Top) to be used simultaneously on a Raspberry Pi by managing the PCI Express lanes. The video explores its use to overcome the limitation of a single PCI Express connector on the Raspberry Pi 5 for adding both the SATA HAT and the HatNET! 2.5G.

💡Open Media Vault (OMV)

Open Media Vault (OMV) is an open-source Network Attached Storage (NAS) solution based on the Linux operating system. The video details the process of installing and configuring OMV on the Raspberry Pi NAS to manage storage and provide services like file sharing.

Highlights

The Raspberry Pi 5 is capable of building a NAS with improved speed and performance compared to the previous models.

Using a SATA HAT from Radxa, a NAS can be assembled for under $150.

The Raspberry Pi 5's gigabit Ethernet might be a bottleneck compared to other NASes with 2.5 gigabit capabilities.

The Pi 5's PCI Express connector is larger and may require an adapter for some setups.

The JMB585 PCIe Gen 3x2 controller on the SATA HAT limits bandwidth even if the Pi 5's bus is upgraded to Gen 3.

DIY NAS solutions often require trade-offs in terms of features like hot-swap drive bays and vendor support.

The assembled Pi NAS with four drives in RAID 0 configuration achieved almost 900 MB/s in benchmark tests.

The Raspberry Pi OS 64-bit light version and Open Media Vault were tested as potential operating systems for the NAS.

Power supply requirements for the NAS should be considered, with an 8A or 10A supply recommended for 3.5" drives.

Thermal imaging revealed that the SATA controller chip can reach temperatures of up to 60 degrees Celsius, indicating a need for active cooling.

The HatNET! 2.5G and HatBRICK! Commander from Pineberry Pi were used to attempt 2.5 gigabit networking on the Raspberry Pi 5.

The final cost of the DIY NAS setup was under $200, making it a cost-effective alternative to off-the-shelf solutions.

ZFS on Open Media Vault was successfully implemented on the Raspberry Pi 5 NAS, offering data protection with RAIDZ1.

The power efficiency of the Raspberry Pi 5 NAS was significantly lower than traditional NAS devices, using only 15-16 Watts under load.

Benchmarking network file copies on a Mac revealed slower speeds, suggesting that Mac OS may not be optimal for this type of testing.

The experiment demonstrated the potential of the Raspberry Pi 5 for NAS applications, despite some limitations.

Transcripts

play00:00

I've built a bunch of Raspberry Pi NASes, from a little tiny all-SSD NAS to the biggest

play00:05

one on Earth, the Petabyte Pi project.

play00:08

But the Pi 4 and Compute Module 4 were just barely adequate.

play00:11

I could never get even 100 megabytes per second or the network, even with SSDs.

play00:17

The two most promising projects, the Wiretrustee SATA board and Radxa Taco, were both dead

play00:22

in the water.

play00:23

They launched right before the great Pi shortages, when you couldn't get a Raspberry Pi for

play00:27

love or money.

play00:28

But the Raspberry Pi 5 is here now.

play00:30

It's faster, it has PCI Express—and best of all, you can actually get one.

play00:35

Yeah, it's a little more expensive than the Pi 4, but with off-the-shelf 4-bay NASes costing

play00:40

$300 and up, could we actually build a Pi NAS for less?

play00:45

And would it be any good?

play00:46

Well, today I'm going to see.

play00:48

And to do it, I'll use this tiny SATA HAT that Radxa sent.

play00:52

This costs $45, and it's already shipping.

play00:55

Add a 12V power supply, a Raspberry Pi 5, a fan and microSD card, and we have a tiny

play01:00

NAS for less than $150.

play01:03

But will bottlenecks kill this thing like they did with the Pi 4?

play01:05

I mean, the Pi 5 only gets a gigabit, those other NASes can do 2.5.

play01:10

And they have hot-swap drive bays...

play01:13

And vendor support!

play01:14

So yeah, comparing just on price alone is silly.

play01:17

There's always going to be trade-offs when you go DIY.

play01:20

But this thing should have a lot fewer compromises than the jankier builds I did in the past.

play01:25

At least, I hope.

play01:26

And 2.5 gig networking?

play01:28

I might have a fix for that.

play01:30

I'm going to put this thing together and see if it could be the ultimate Raspberry Pi 5

play01:34

NAS.

play01:35

I do not know exactly what tools will be required, and I don't know what's in the box.

play01:40

Hopefully it includes everything I need.

play01:43

But Radxa usually does a pretty good job including all the little bits and bobs you

play01:47

need for this.

play01:48

Looks like it includes this extra cable.

play01:50

This is, after all, the 'Penta' SATA HAT,

play01:53

so five SATA connections.

play01:55

I have four drives here, but you can add on another one using this strange external– I

play02:00

guess this might be eSATA or something?

play02:03

But it has SATA and power from this board.

play02:07

Something important to think about is how you're going to supply power to it.

play02:12

I know some people in comments have mentioned, "Oh, you need to supply power to the Pi and

play02:15

this board."

play02:16

But no, I believe that you can just power this board through the 12-volt barrel jack

play02:21

or through an ATX Molex power supply here.

play02:25

So if you have it in a PC case or something, you could do it that way.

play02:29

And this will supply power to the Pi 5 through the GPIO pins.

play02:33

This should be able to provide adequate power as long as the power circuitry on here is

play02:38

good enough to take that 12-volt signal and give a clean 3 to 5 amps on the Pi's 5-volt

play02:45

rail.

play02:46

This doesn't have the normal PCI Express connector that you see on the Pi 5.

play02:54

So the Pi 5 has this little guy here.

play02:58

This has a much larger connector with more pins.

play03:02

That could be an interesting thing.

play03:04

I believe that they have an adapter for it, though.

play03:06

So yeah, here it is.

play03:08

So this is called an FFC or Flat Flexible Circuit board.

play03:14

And it looks like they've included two, which is nice because these little connectors are

play03:22

a little bit delicate.

play03:23

You can see how thin they are.

play03:24

They're kind of like paper-thin.

play03:27

But these are Flat Flexible Circuit boards or FFCs.

play03:31

And they connect from the Pi's PCI Express connector here over to this guy here.

play03:38

And the GPIO pins over here are going to provide power to the Pi.

play03:42

At least that's my hope.

play03:45

There is a getting started guide on here, but I'm going to YOLO this thing and see what

play03:51

happens.

play03:52

One important thing whenever you're doing these is make sure you get the connector seated

play03:55

all the way.

play03:56

And it should go in pretty easy.

play03:58

If you're pushing hard, then you're going to break the cable.

play04:00

So don't do that.

play04:01

If you're pushing hard, you might need to pull this little connection up and always

play04:04

do it on both sides so that it doesn't come off.

play04:08

Because if it comes off, it might break and then you would not have a way to hold the

play04:11

cable down.

play04:12

Push down on this little top part and this cable is now affixed to the Pi very well.

play04:20

And then I'm going to plug it into here.

play04:23

So it looks like it goes like this.

play04:26

The funny thing is these kind of connectors are often used inside of cameras and other

play04:31

things that are put together at factories.

play04:34

And there they're very careful.

play04:35

They have their methodologies.

play04:36

They even have tools to help with it.

play04:39

When you give these things to people in the general public, like you and me, we tend to

play04:43

break our first one.

play04:45

So I guess it is a really good idea that they included a second one here.

play04:49

They probably have some screws too.

play04:51

Let's check.

play04:52

Yeah, there's a little kit full of screws here.

play04:55

There's some standoffs and things.

play04:59

And then now I'm going to put this in.

play05:04

I'm going to carefully put this over and plug in the GPIO pins that provide power.

play05:13

But that fits nicely together.

play05:16

There is a connector here for an OLED and fan control board that sits on top of the

play05:21

hard drives at the top.

play05:23

They don't have that available yet.

play05:25

I think they used to make it.

play05:26

I don't know if they needed to revise it for this or what, but I asked about it and it's

play05:31

not yet available.

play05:32

So it would be nice to have that, especially, these are not that hot of drives, but if you

play05:36

use hard drives, if you use 2.5 inch hard drives, then those can get pretty toasty and

play05:41

it's nice to have a fan blowing air over them.

play05:44

I just realized I don't have any fan on the Pi itself and I probably should do that because

play05:49

it could get pretty hot and toasty inside here.

play05:52

Let's get our little active cooler here.

play05:54

I hope this will fit.

play05:56

I don't know if there was a warning against using this, but the Pi does need some sort

play06:00

of cooling, whether it's a heat sink or a fan.

play06:03

There's no fan built into this.

play06:05

It would be cool if there was a little fan under here or an option for one, but it doesn't

play06:10

seem like that's the case.

play06:11

Okay, please still fit.

play06:15

Looks like it will fit.

play06:16

Oh no, you know what?

play06:20

The barrel plug is just touching on the top of the heat sink.

play06:29

There's literally just three of the fins on the heat sink.

play06:33

You know what I might do?

play06:34

I might see if I can bend those off.

play06:37

Take this back off again.

play06:39

I'm going to pull this connection off.

play06:45

This is a terrible idea.

play06:46

I would not recommend doing it.

play06:49

Just bending this back and forth.

play06:51

There's one.

play06:54

Shouldn't affect the performance that badly.

play06:56

I removed the middle portion from the middle point up of these three little fins on the

play07:03

heat sink.

play07:07

There's a side view of it.

play07:08

You can kind of make it out.

play07:10

It's kind of hard to make out.

play07:11

Sorry about that.

play07:13

Let's get this all back together now and see if it fits.

play07:16

This time, if I go down, it can go down all the way.

play07:20

Look at that!

play07:21

That's just enough clearance.

play07:23

As long as it works in the end, it's all good.

play07:27

I use this huge guy.

play07:31

Just give these a little snug.

play07:33

Generally, I'd use a nut driver for this, but this works in a pinch.

play07:38

Literally.

play07:39

[voiceover Jeff] My top-down recorder decided to corrupt the rest of the video, so I lost all that footage.

play07:44

But in that footage, I mentioned the board uses the JMB585 PCIe Gen 3x2 controller, which

play07:50

means even if we upgrade the Pi 5's bus to Gen 3 from its normal Gen 2, we'll miss out

play07:55

on a little bandwidth.

play07:56

And also, the kit comes with two side supports that hold all the 2.5" drives together, though

play08:02

there may be a case available at some point in the future.

play08:04

They actually had one in the past when it was sold for the ROCK 4 or Pi 4, I think, but

play08:09

I'm guessing that they'll have to make another batch if they get enough interest in this

play08:13

new version of the Penta SATA hat.

play08:15

Okay, so everything is put together now.

play08:17

It's all looking nice, and I think there will be enough airflow.

play08:21

There's holes in the sides, holes in the middle, so enough air will convect through for these

play08:26

drives at least.

play08:27

And I have a 5A 12V power supply.

play08:30

This should be adequate for these drives and the Raspberry Pi 5.

play08:34

I'd budget maybe 3 to 5 watts per drive, or if you have 3.5" drives, maybe a little more,

play08:40

and you might want to get an 8A or maybe even 10 or 12A power supply.

play08:45

But definitely don't use a 2A power supply and expect this to work.

play08:48

It's going to have all kinds of issues.

play08:50

I also have Raspberry Pi OS, 64-bit light version, and I might try Open Media Vault.

play08:55

I'm going to take the microSD card and put it into the slot, and then I'll grab this

play09:01

power adapter.

play09:04

One other reason why I'm over at the desk is I have my little, this is a Zigbee– Third

play09:08

Reality Zigbee outlet that has power measurement built in, which is very handy for testing.

play09:15

I'll go ahead and bring that up on here.

play09:17

If I go to Home Assistant and then go to Power, you can see that right now there's 0 watts

play09:24

because there's nothing plugged into it.

play09:26

Power is going to come in.

play09:27

Looks like they wanted to align the power with the USB-C port, not that that matters.

play09:33

First I'm going to plug in network, and I'll plug in power and we'll see what happens.

play09:37

Hopefully no sparks.

play09:38

All right.

play09:39

I have a green light on the board, and the Pi is booting up.

play09:47

Power usage is up to 14.2 watts at boot, and now the Pi is doing its reboot, so it's going

play09:54

to reboot a couple times this first time that I turn it on because it expands the file system

play09:59

to fill up the microSD card, all that kind of stuff.

play10:02

So we'll fast forward a bit until it's all booted up, and then we can log into it on

play10:07

the network and see if it's actually working.

play10:09

I don't see any lights.

play10:11

There's just one green LED on the board over here, but I don't see any other lights.

play10:15

So I don't know if there's lights per hard drive.

play10:18

So I'm going to log into it and we'll see what we can see.

play10:21

SSH pi at pi-nas.local.

play10:26

There it is.

play10:27

And if I say lsblk, hopefully we see those hard drives.

play10:31

No, we're not seeing them.

play10:33

Let's try lspci.

play10:36

And I'm not seeing the device at all.

play10:39

I don't see any errors in here.

play10:42

Let's go to the URL on this box and see if there's any other tips that we're missing.

play10:49

rock.sh/penta-sata-hat.

play10:51

...penta-sata-hat.

play10:57

So we did that.

play10:58

We did that.

play11:00

Oh. [hehe]

play11:01

So maybe I should actually do that.

play11:04

Let's try that.

play11:07

Go in here.

play11:09

You'd think it would do it automatically, but it does not.

play11:14

So we're going to enable PCI Express, save and reboot.

play11:17

So save that and reboot.

play11:20

So let's check again.

play11:25

There we go.

play11:26

We have one, two, three, four hard drives.

play11:28

And if I say lspci, I can see the Jmicron SATA controller.

play11:33

Now, right now it should be PCI Express Gen 2.

play11:36

We can check that with sudo lspci -vvvv.

play11:42

This is going to give us all the information about PCI Express devices.

play11:46

And if I go up to here, this is AHCI.

play11:48

That's the kernel module for the SATA controller.

play11:52

And we can go up to the top section.

play11:54

See, it's Jmicron JMB585.

play11:57

And if I go down to link capabilities, it says speed 8 gigatransfers per second width

play12:03

x2.

play12:04

That's PCIe Gen 3x2.

play12:06

But the status says it's 5 gigatransfers x1.

play12:10

So definitely less bandwidth than the chip is capable of.

play12:14

So I'm going to try PCIe Gen 3.

play12:17

And I can do that following my own guide.

play12:19

If I go down here, turn that on like this and reboot.

play12:26

And we'll see if it gives us Gen 3 speeds instead of Gen 2 speeds, which would give

play12:31

us the maximum performance that we can get on the Pi 5.

play12:35

I have four drives that have nothing on them.

play12:37

I'm going to try-- we should probably just benchmark the drives first in like RAID 10

play12:42

just to see what the maximum speed is or maybe even RAID 0.

play12:45

So let's do that.

play12:46

It'll take a couple minutes.

play12:48

And we have blinking!

play12:50

So you can see that the LEDs actually do work.

play12:53

I didn't see those when I was looking earlier, but it has some LEDs.

play12:57

And you can see them blinking when the drives are accessed.

play12:59

So nice job.

play13:00

I should check.

play13:02

It does feel a little bit hot.

play13:06

InfraRay, I found them at CES.

play13:08

And they actually sent me home with a couple goodies.

play13:11

This is the P2.

play13:12

And the reason why I wanted them to send me home with one to test was it has this snap-on

play13:19

macro lens that you can see individual resistors or things on your PCB very close up, which

play13:25

is kind of cool.

play13:27

But their software is a little bit iffy.

play13:31

Not the best software that I've used for IR cameras.

play13:34

But the camera itself is really good quality and works better than my old Seek thermal.

play13:39

But let's check the temperatures on here.

play13:42

And it looks like the drives themselves-- well, they're a little bit reflective.

play13:47

So we might not be seeing the actual drive value.

play13:50

But the board is up to 50 degrees or so.

play13:56

The SATA controller is down there.

play13:58

It looks like it's the hottest part of this thing.

play14:00

And it is getting up there to 60 degrees Celsius.

play14:03

So it might be good to have at least an active fan blowing down on top.

play14:09

There's the cold soda can;

play14:10

16 degrees Celsius.

play14:12

And there's the hot SATA chip.

play14:14

So I'm going to put this cover on and see up nice and close.

play14:18

If I get in there, we can see that the chip itself is 60 degrees Celsius.

play14:26

So it's pretty toasty in there.

play14:28

I would definitely do a fan or heat sink on this if you're going to deploy this long term.

play14:34

Another fun thing with thermal imaging is you can see all kinds of fun details.

play14:38

Like, you can see that this is where my hand was resting.

play14:42

And if I just put my hand on the table and take it off, there's a hand print.

play14:47

And apparently this little screen on here also generates a teeny tiny bit of heat.

play14:53

And now it has my fingerprint on it, which is also warm.

play14:56

Looks like the formatting is finished.

play14:58

And what's our next step here?

play15:00

Mount the array.

play15:01

OK, mount RAID 0.

play15:04

So now let's do a disk benchmark on it.

play15:06

And I'll run the disk benchmarks and see how fast this array can go.

play15:10

OK, here goes FIO.

play15:12

Hey, that's not bad at all.

play15:14

850 to [8]60 megabytes per second.

play15:17

And that's mebibytes.

play15:20

So let's see how fast it was in megabytes.

play15:24

Almost 900 megabytes per second across all four drives in RAID 0, of course.

play15:29

But random reads of 687 megabytes per second and random writes of 758.

play15:37

And then we have 4K block size, 44 megs read and 152 megs write at 4K, which is not bad

play15:45

at all.

play15:47

I'm interested in seeing-- I think what I'll do is I'll just put a Samba share on this,

play15:52

and we'll see if we can saturate a 1 Gbps connection continuously.

play15:55

Restart Samba and create a password.

play16:00

Now I should be able to connect on my Mac.

play16:03

pi-nas.local, we'll do the shared directory.

play16:08

Here it is.

play16:09

So I'm going to copy over a folder with all of the footage of the build.

play16:15

It's 100 gigs.

play16:19

And let's check this out.

play16:20

Let's see how fast it is.

play16:24

That is line speed.

play16:25

110 megabytes per second is pretty typical.

play16:28

Let's see if it can keep up that data rate.

play16:30

I can smell that slight off-gassing here.

play16:33

So I do think that I would put some sort of cooling on here just for that JMB585 chip.

play16:39

On my other NASes, over 1 gigabit, you can just hammer it, and it'll stay 110, 115 megabytes

play16:45

the entire time.

play16:47

This is a lot faster than the Pi 4 NASes I've set up before, though.

play16:50

And we'll just let the screen recorder keep going at 18 minutes, and we'll just keep moving.

play16:55

While that's copying, I want to take a brief opportunity to tell you about Open Sauce.

play16:59

Open Sauce is going to be June 15 to 16 in San Francisco, and I'll be there.

play17:04

I'll be there along with a ton of other creators in the Maker areas, electronics, hacking,

play17:10

all kinds of fun things.

play17:12

If you want to go, there's a way that you can get in for free, and you can come to the

play17:16

party that's beforehand, where all the other YouTubers and everyone will be present.

play17:21

If you want to do that, you can apply to be an exhibitor.

play17:24

They have tons of space for exhibits this year.

play17:26

It'd be really cool to see your project.

play17:29

So if you want to do that, go to opensauce.com and apply to be an exhibitor.

play17:33

Otherwise you can also come as just a normal person who's not exhibiting things too.

play17:38

So hopefully I'll see you there June 15 to 16.

play17:40

If not, I will definitely be posting some things on Twitter and maybe something on YouTube.

play17:44

I don't know.

play17:45

So make sure you're subscribed.

play17:49

It copied everything over to the Pi.

play17:52

Now let's check the read speed.

play17:53

I'm going to copy it back into a different folder on my local computer.

play17:58

And we'll see if it can give me 110 megabytes per second.

play18:01

Oh, look at that.

play18:02

It's giving me 122, which is a little faster than the write speed.

play18:07

And you can see that the drives are reading pretty much flat out right now.

play18:10

I don't know if that'll fill up the cache, but you can see that the data is flowing a

play18:15

lot more smoothly coming off the Pi than writing to it.

play18:20

So there are some bottlenecks.

play18:21

I don't think it's Samba, and I don't think it's the drives themselves.

play18:25

I think there's a bottleneck somewhere in the Pi's kernel or something when it's writing

play18:29

through because I had that problem on the Pi 4, but on the Pi 4, it wouldn't even hit

play18:33

like 120 megabytes per second all the time.

play18:36

But reading, that's not an issue at all here.

play18:39

We're cranking at 120 megabytes per second.

play18:44

I deleted everything off of there, and it looks like obviously read speeds are much

play18:49

more consistent than write speeds.

play18:52

But I'm going to try something else that I mentioned at the beginning of this video.

play18:55

What about 2.5 gig networking?

play18:58

Now PineBerry Pi makes the HatNET! 2.5G.

play19:02

This is a 2.5 gigabit hat for the Raspberry Pi 5.

play19:06

But you'll probably already notice there's a problem.

play19:09

It has one PCI Express input.

play19:11

There's only one PCI Express connector on the Raspberry Pi 5.

play19:15

How do we solve this problem?

play19:16

Because this needs that, and I want to put it on here too to see if I can get 2.5 gig

play19:20

networking.

play19:21

Well, I can try the HatBRICK! Commander from Pineberry Pi.

play19:26

And yes, they sent me these things.

play19:27

I would be buying them myself anyway, but I'm going to disclose that Radxa sent me this,

play19:32

and Pineberry Pi sent me this.

play19:34

I'm testing these things out to see if they can work together and do some crazy things.

play19:39

But Pineberry also sent me all of these extra cables of varying lengths.

play19:45

One thing that can be a problem with when you start connecting multiple things together

play19:48

is the PCI Express signaling.

play19:51

So I'm going to try to use the shortest cables I can for these experiments.

play19:56

But I'm going to basically put this, which is a PCI Express Gen 2 switch, off of the

play20:01

Pi's bus, and then connect one connector to the SATA drives and the other connector to

play20:06

the HatNET! 2.5G.

play20:09

The downside is this is going to make everything be PCI Express Gen 2 speed instead of 3, so

play20:14

I wouldn't be able to get 800 megabytes per second on these hard drives.

play20:18

But on the flip side, this is 2.5 gig networking, and if we say, let's say 2 gigs for networking

play20:25

and 2 gigabits for the hard drives, we might be able to do that to almost saturate 2.5

play20:30

gig network if the Pi 5 can support that.

play20:33

I don't know if it can or not.

play20:34

I don't think it will be able to, but we'll see if any of this even works.

play20:39

It might also not have enough power.

play20:41

I don't know.

play20:42

But I'm going to unplug this.

play20:45

Okay, we got that connector out of here.

play20:52

There is some risk here.

play20:55

If we are mixing these cables from different vendors and connections, there's a little

play20:59

risk that something's going to go wrong, but hopefully that doesn't happen.

play21:04

It's definitely not my finest work.

play21:10

There's an LED on here, and I see a light on the switch, and there's a power LED on

play21:16

the HatBRICK! Commander, and there's lights on here.

play21:19

Let's see if this is actually going to work.

play21:22

lspci...

play21:23

Hey, look at that.

play21:26

So we have the switch here.

play21:28

We have the SATA controller here, and we have the 2.5 gig controller here.

play21:35

Let's do ip a, and we have an IP address on that.

play21:41

So let's do an iperf test.

play21:43

Now we're getting 2 gigabits.

play21:45

It's not 2.5 gigabits, but it's not nothing.

play21:48

So coming back only 1.6 gigabits, that's not horrible.

play21:52

It's still more than a gigabit.

play21:53

This is probably going to get 2.5 gigabits if you connect it straight to the Pi.

play21:57

I think that some of the overhead comes out of that packet switching that is running to

play22:02

the drives as well.

play22:03

So if I say lsblk, we still have the drives, and they're mounted.

play22:08

So we'll see if we get any faster write speeds.

play22:12

It's doing 110, 117.

play22:15

That's about the same as what we were seeing before.

play22:17

So we're not getting faster than a gigabit over the 2.5 gig connection, at least for

play22:23

writes.

play22:24

I do see a few peaks up to about 125 megabytes per second, so better than a gigabit.

play22:30

And it's interesting, the overall rate seems a little steadier with the 2.5 gig.

play22:36

Maybe the Pi's internal controller is a little funky, but I don't know.

play22:41

But it's giving us a little bit more in the write speeds.

play22:44

I'm really interested to see the read speeds, though.

play22:47

Hopefully we can get more than 1 gigabit.

play22:49

Let's check.

play22:51

There we go.

play22:52

217 megabytes, 250 megabytes per second.

play22:55

That's more what I'm expecting out of a 2.5 gig connection.

play23:00

So this can put through that data.

play23:02

It's interesting.

play23:03

I think it's pulling from RAM because I don't see the drives blinking at all here.

play23:07

It's probably copying all this data from RAM, and now it's hitting the drives.

play23:10

And you can see it dips a tiny bit there, so down to 230 megabytes per second.

play23:16

So Linux usually caches files on the RAM as it's copying them back and forth, so that

play23:20

if you have a file that you're accessing a lot, it's a lot faster.

play23:23

But now that it's hitting the drives, it only dipped down 10 megabytes per second, so that's

play23:28

not bad at all.

play23:30

So for a read-heavy NAS, this isn't looking like that bad of a setup.

play23:35

Now that I know that everything is going to work on here hardware-wise, I think it's time

play23:40

to put OMV on here and see how that runs.

play23:42

I haven't used OMV 7 yet, so this will be new for me.

play23:46

I don't think it's that much different than OMV 5 and 6, but let me grab this script and

play23:52

go over here, and this hopefully will just work.

play23:55

I'm going to SSH into the Pi and just paste in their script, the installer, and here it

play24:02

goes.

play24:03

Let's check power consumption.

play24:05

So during the install, it was used in between 8 to 10 watts, and it looks like the baseline

play24:09

for this build is 8 watts with the 2.5 gig network adapter and everything else.

play24:15

But let's go to pi-nas.local, and does this work?

play24:23

Maybe I have to use the IP address.

play24:25

Let's try that.

play24:31

Well there it is.

play24:32

I guess it was still booting up.

play24:33

Okay, so that was not the problem there.

play24:37

So 'admin' and 'openmediavault' are the password logging in.

play24:43

There it is.

play24:45

There's no dashboard, that's okay.

play24:47

Storage is where we should see our disks.

play24:49

They should show up.

play24:50

Yep, 1, 2, 3, 4.

play24:52

All of them are 8 terabytes.

play24:55

And I want to create an array.

play24:59

File systems.

play25:00

Is this where we create it?

play25:02

Create and mount a file system, ext4.

play25:07

But I want to create a RAID array.

play25:08

How do I create a RAID array?

play25:10

Am I totally missing something?

play25:14

I thought there was a thing over here for creating RAID, but I don't see it anymore.

play25:19

What does this say?

play25:24

See, this has RAID management, but I'm not seeing RAID management anywhere.

play25:30

Do you see RAID management anywhere?

play25:32

We could try ZFS instead of RAID, but that's instead of like mdadmin RAID.

play25:38

So we can try it out on openmediavault.

play25:40

I've never tried it on OMV before, but we'll see how it works here.

play25:45

I like this little END OF LINE here.

play25:48

I guess a nod back to Tron, the 1974 version.

play25:52

And we'll do RAIDZ1 since we have three drives.

play25:55

A RAIDZ1 will use one drive, the equivalent of that for parity data.

play26:00

That way I could lose one of these four drives and all the data would be intact.

play26:04

But here we go.

play26:06

It says pending changes, 21 terabytes available.

play26:11

Let's apply this.

play26:12

So now the tank should exist.

play26:15

Compression is on.

play26:16

I don't know if I would need compression on, but I'm not going to mess with any of that

play26:21

right now.

play26:22

If we go to pools, is there anything else I can do?

play26:26

Tools, what do we got?

play26:27

So you can scrub it.

play26:28

I don't know if it automatically scrubs in here, but it gives us the pool information.

play26:34

That's nice.

play26:35

So this is a good interface.

play26:37

It's not the, maybe not the best thing ever.

play26:40

And I don't know if it comes with schedules and things by default, but it'd be nice to

play26:44

have a scheduled snapshot and a pool scrubbing scheduled.

play26:49

That might be something that you can figure under scheduled tasks.

play26:52

Yeah, so you'd have to do some of these things.

play26:57

You'd have to add your own scheduled tasks.

play26:58

It'd be cool if that added some things by default, but I can see why they don't as well.

play27:04

But now let's add a file system.

play27:07

So we have one tank ZFS.

play27:10

I'll add a shared under tank shared, and we'll just set everyone read/write, right now,

play27:20

save, turn on Samba enabled 10.0.2.2– 11.

play27:28

Okay.

play27:29

So it wants me to use the IP and there's our shared volume.

play27:34

So let's, I'm going to copy some stuff over to it.

play27:37

I have this, this folder has a hundred gigabytes.

play27:43

So I'll do that.

play27:44

And here it goes.

play27:46

So it seems similar to the copies that we were getting with RAID 0.

play27:52

It's interesting.

play27:53

It goes a little bit faster sometimes than those copies were.

play27:57

So I'm wondering if ZFS's caching is actually helping here.

play28:00

So far, I'm pretty impressed.

play28:02

I think read speeds are where this wins.

play28:06

Write speeds are where this loses a little bit because you're not going to be able to

play28:09

get full 2.5 gigabit networking on that.

play28:12

But but it's better than I was expecting.

play28:15

And the big win for me, besides the fact that this can be made smaller, if we kind of reconfigure

play28:20

these boards the big one is the power efficiency, because right now we're using 15 or 16 Watts.

play28:29

Probably the other NASs that I've built using, you know, prebuilt NASs, they use, they use

play28:35

10 to 20 Watts idle and they use 25 to 30 Watts when they're doing a lot of stuff.

play28:40

So this little guy is only using 16 Watts doing the same amount of work which is probably

play28:47

about half of what most prebuilt NASs would use.

play28:51

On the flip side, if you build a NAS with the RK3588 chip, you could probably get even

play28:56

more efficient and more speed.

play28:58

So there's a couple boards out there that are interesting that I might take a look at

play29:01

at some point.

play29:02

But the nice thing is all of this, this is all really well supported.

play29:06

Like the software just click some buttons and you have everything working.

play29:10

I haven't always had that same kind of experience when I'm using the RockChip boards.

play29:16

Some of them are getting pretty good though.

play29:17

I'm going to go ahead and let this write finish and I'm going to do a full read of that 100

play29:21

gigs of data and we'll see where we end up.

play29:24

At the end of the copy, it looks like the system used 22 Watts for a little while while

play29:33

it was doing some sort of processing.

play29:35

I don't know what ZFS was doing there.

play29:37

Maybe that was part of the compression.

play29:38

I don't know.

play29:39

It's a lot of power to use at the end there.

play29:42

The actual performance was interesting.

play29:44

After that initial part where it was faster than RAID 0, it actually slowed down to a

play29:49

tiny bit slower than RAID 0 over that long rest of the copy.

play29:53

That's why it's good to use a large, large file to test the actual performance of your

play29:57

system because especially with ZFS, it's going to cache a lot in the beginning in RAM and

play30:01

that throws off how fast your actual disk array is.

play30:05

But the CPU usage was not too bad.

play30:08

Power consumption was down around 8 to 16 Watts throughout the whole copy.

play30:14

But in the end, the file copy was 74 megabytes per second with ZFS in RAID Z1 and it was almost

play30:23

100 megabytes per second in RAID 0.

play30:26

Now that's for the writing, which is always going to be a little bit slower with a setup

play30:29

like this.

play30:30

Read speeds for both are practically the same.

play30:33

It's just basically line speed.

play30:35

It's not hard at all to do the reads.

play30:38

[interjection Jeff] So this is a little embarrassing.

play30:39

All those conclusions I have are based on the fact I was benchmarking this all on a Mac.

play30:45

And I switched to my Windows PC and I was able to get almost line speed for one gigabyte

play30:50

file copies writing to the Pi and 150 megabytes per second writing over the 2.5 gig network.

play30:57

So that changes my perspective a little bit on it.

play31:00

And I think the biggest takeaway is don't use a Mac for benchmarking network file copies,

play31:04

even if it has 10 gigabit networking and everything else on it seems to be fine.

play31:09

Mac OS for some reason is not great with file copies.

play31:12

And I have a whole blog post and I have more details in the GitHub issue linked below.

play31:15

But let's get back to the video.

play31:17

[normal Jeff] It's not inconceivable to build a system like this.

play31:21

All in this one is still under 200 bucks total, including all these extra boards and things.

play31:27

So but it always goes back to DIY means you're responsible for the software, you're responsible

play31:33

for maintenance and updates and all that kind of stuff.

play31:38

So that was a fun experiment.

play31:41

And I plan on doing some other fun experiments now that I have this little this little board

play31:46

here that lets me split up PCI Express lanes.

play31:49

And we'll see how we can bend the Pi 5's PCI Express bus.

play31:53

It'd be really cool to see a Compute Module 5 expose even more, but we'll see what happens

play31:58

whenever that comes out.

play32:00

I know that that was a big change from the Pi 4 to the Compute Module 4.

play32:03

It gave us PCI Express.

play32:05

Now we have it on the Pi 5, but I think we might be able to do more in a Compute Module

play32:09

form factor, but we'll see.

play32:11

Until next time, I'm Jeff Geerling.

Rate This

5.0 / 5 (0 votes)

Related Tags
Raspberry PiNAS BuildSATA HATDIY ProjectPerformance TestCost EfficiencyNetwork SpeedHardware ReviewPCI ExpressThermal ImagingFile Copy Benchmark