The ULTIMATE Raspberry Pi 5 NAS

Jeff Geerling
4 Apr 202432:14

Summary

TLDRIn this video, the creator explores the potential of building a Raspberry Pi NAS using the new Raspberry Pi 5 and a SATA HAT. Despite initial challenges with bottlenecks and power supply, the end result is a compact and power-efficient NAS setup capable of impressive read and write speeds. The experiment also delves into the possibilities of 2.5 gigabit networking and the use of ZFS file system, all while emphasizing the trade-offs and responsibilities involved in DIY projects.

Takeaways

  • 🛠️ The Raspberry Pi 5's increased speed and PCI Express support make it a viable option for building a cost-effective NAS (Network Attached Storage) solution.
  • 💡 Despite the Pi 5's gigabit networking limitation, it can still provide competitive read and write speeds, especially for a DIY setup.
  • 🔧 The use of the Radxa SATA HAT and Pineberry Pi's HatNET! 2.5G allows for a compact and efficient NAS build, although with some compromises on bandwidth.
  • 🔌 Power supply considerations are crucial for the setup, with a 5A 12V power supply recommended for 2.5" drives and potentially an 8A or higher for 3.5" drives.
  • 🌡️ Thermal management is important for the longevity and performance of the NAS, with active cooling suggested for the SATA controller due to its high temperature readings.
  • 💻 The Raspberry Pi OS and Open Media Vault (OMV) provide a user-friendly interface for managing the NAS, although some features like RAID management may not be immediately apparent in OMV 7.
  • 🔄 Benchmarking network file copies can produce varying results depending on the operating system used, with Windows showing better performance than Mac in this case.
  • 📈 The experiment showed that the Pi 5 NAS could achieve write speeds of around 74 MB/s with ZFS in RAID Z1 and almost 100 MB/s with RAID 0, suggesting that the system is well-suited for read-heavy tasks.
  • 🔧 DIY NAS setups offer flexibility and customization but require the user to take responsibility for software, maintenance, and updates.
  • 🚀 The potential for future improvements in the Compute Module form factor is hinted at, with the hope for more capabilities in the upcoming Compute Module 5.

Q & A

  • What is the main goal of the Raspberry Pi 5 NAS project discussed in the transcript?

    -The main goal of the Raspberry Pi 5 NAS project is to build a cost-effective Network Attached Storage (NAS) solution using the Raspberry Pi 5, which is faster and has PCI Express capabilities compared to its predecessors.

  • What are the components required to build the described NAS for less than $150?

    -The components required include a 12V power supply, a Raspberry Pi 5, a fan, and a microSD card, in addition to the $45 SATA HAT sent by Radxa.

  • What is the significance of the Raspberry Pi 5's PCI Express capability for this project?

    -The Raspberry Pi 5's PCI Express capability allows for faster data transfer rates and improved overall performance, which is crucial for a NAS system designed to handle storage and data sharing efficiently.

  • How does the 'Penta' SATA HAT contribute to the NAS build?

    -The 'Penta' SATA HAT provides five SATA connections, allowing for the connection of multiple drives and enhancing the storage capacity of the NAS system.

  • What is the purpose of the Flat Flexible Circuit (FFC) boards included in the SATA HAT package?

    -The FFC boards connect the Raspberry Pi's PCI Express connector to the SATA HAT, facilitating data transfer between the drives and the Pi.

  • What is the maximum power supply rating recommended for the described NAS setup?

    -For drives, a 5A 12V power supply is recommended. However, if 3.5 inch drives are used, an 8A or even a 10 or 12A power supply might be more appropriate.

  • What is the performance difference between RAID 0 and RAID Z1 with ZFS in the context of this NAS setup?

    -In terms of write speeds, RAID 0 was slightly faster than RAID Z1 with ZFS. However, for read speeds, both configurations provided practically the same performance, reaching almost line speed.

  • What is the estimated power consumption of the NAS setup with the 2.5 gig network adapter and other components?

    -The estimated power consumption with the 2.5 gig network adapter and other components is around 8 to 16 watts during normal operation, with a peak of 22 watts during certain processes.

  • Why is the Raspberry Pi 5's PCI Express Gen 3x2 capability not fully utilized in this setup?

    -The Raspberry Pi 5's PCI Express Gen 3x2 capability is not fully utilized because the current setup uses a PCI Express Gen 2 switch, which limits the speed to Gen 2 standards due to the need to connect multiple devices to the single available PCI Express connector on the Raspberry Pi 5.

  • What is the importance of having a cooling solution for the NAS setup?

    -A cooling solution is important to prevent overheating, especially for the SATA controller chip, which can reach temperatures up to 60 degrees Celsius during operation. This ensures the longevity and reliability of the NAS system.

  • What is the main takeaway from the experiment with the Raspberry Pi 5 NAS setup?

    -The main takeaway is that it is feasible to build a cost-effective and power-efficient NAS system using the Raspberry Pi 5. The setup offers decent performance, especially for read operations, and can be further optimized with different configurations and software setups.

Outlines

00:00

🛠️ Raspberry Pi NAS Building Journey

The paragraph discusses the journey of building various Raspberry Pi Network Attached Storage (NAS) devices, from small SSD NASes to the ambitious Petabyte Pi project. It highlights the limitations of the Raspberry Pi 4 and Compute Module 4, and expresses hope for the new Raspberry Pi 5 with its faster speed and PCI Express support. The author also explores the possibility of building a cost-effective Pi NAS and shares the components needed for this project, including the Radxa SATA HAT and its features.

05:04

🔧 Assembling the Raspberry Pi 5 NAS

This paragraph details the assembly process of the Raspberry Pi 5 NAS setup, focusing on the integration of the SATA HAT, power supply considerations, and the connection of the Pi 5. It discusses the challenges of fitting a fan for cooling, the use of an active cooler, and the importance of proper cable connections. The paragraph also touches on the technical aspects of the build, such as the PCIe Gen 3x2 controller and the inclusion of side supports for the 2.5-inch drives.

10:08

💡 Initial Setup and Troubleshooting

The paragraph describes the initial setup and booting process of the Raspberry Pi 5 NAS, including the use of Raspberry Pi OS and the challenges faced during the process. The author encounters issues with drive recognition and shares the steps taken to resolve them, such as enabling PCI Express and rebooting. It also discusses the hardware components, like the JMB585 SATA controller, and the performance expectations from the setup.

15:10

📈 Benchmarking and Testing the NAS

This paragraph focuses on the benchmarking and testing of the Raspberry Pi 5 NAS. The author discusses the performance of the drives in RAID 0 configuration, the speed results from disk benchmarks, and the real-world usage testing through file transfers. The paragraph also addresses the thermal performance of the setup, with the use of thermal imaging to identify hot spots and the need for active cooling solutions.

20:15

🌐 Exploring 2.5 Gig Networking and File Sharing

The paragraph explores the possibility of upgrading the network speed to 2.5 gigabits per second using the HatNET! 2.5G from Pineberry Pi and the HatBRICK! Commander as a PCI Express switch. It details the process of setting up the network, the results of the iperf test, and the impact on read and write speeds. The author also shares insights on the potential benefits of using ZFS file system in a RAIDZ1 configuration for data redundancy and performance.

25:20

🔄 Reflecting on the DIY NAS Experience

In this final paragraph, the author reflects on the overall experience of building and testing the DIY Raspberry Pi NAS. It discusses the cost-effectiveness, power efficiency, and performance of the setup compared to prebuilt NAS devices. The author also shares thoughts on the software support and the potential for future improvements with new hardware like the Compute Module 5.

Mindmap

Keywords

💡Raspberry Pi

Raspberry Pi is a series of small single-board computers used for educational, DIY, and industrial applications. In the video, it is used as the main component to build a Network Attached Storage (NAS) device, with the Raspberry Pi 5 being the latest model used for its improved speed and features compared to its predecessors.

💡NAS (Network Attached Storage)

NAS is a dedicated file-level computer data storage server connected to a computer network that provides data access to a heterogeneous group of clients. In the context of the video, the creator builds a NAS using Raspberry Pi and additional components to create a cost-effective and compact storage solution that can be accessed over a network.

💡PCI Express

PCI Express, or Peripheral Component Interconnect Express, is a high-speed expansion card interface standard used in computers. In the video, the Raspberry Pi 5's support for PCI Express is highlighted as a significant improvement that allows for faster data transfer rates and the use of advanced features like the SATA HAT for storage expansion.

💡SATA (Serial ATA)

SATA is a computer bus interface for connecting host bus adapters to mass storage devices such as hard disk drives and optical drives. The video discusses the use of a SATA HAT (Hardware Attached on Top) that expands the Raspberry Pi's storage capabilities by adding SATA ports for connecting multiple drives to the NAS setup.

💡Radxa Taco

Radxa Taco is a single-board computer similar to the Raspberry Pi, but with different specifications and features. In the video, it is mentioned as one of the promising projects that unfortunately did not succeed due to the great Pi shortages, highlighting the challenges of hardware development and supply chain issues.

💡Wiretrustee SATA board

Wiretrustee SATA board is a hardware component designed to add SATA ports to single-board computers like the Raspberry Pi. The video refers to this board as another promising project that faced challenges due to the Raspberry Pi shortages, indicating its relevance to the NAS building process.

💡DIY (Do It Yourself)

DIY is a term used to describe the process of building, modifying, or repairing something without the assistance of professionals or experts. In the video, the creator emphasizes the DIY aspect of building a NAS with a Raspberry Pi, highlighting the trade-offs, cost-effectiveness, and customization possibilities that come with this approach.

💡2.5 Gig Networking

2.5 Gig Networking refers to Ethernet networks that operate at a speed of 2.5 Gbps (gigabits per second). The video explores the possibility of enhancing the Raspberry Pi NAS's network performance by using a 2.5 Gigabit Ethernet adapter to potentially improve data transfer rates over a standard 1 Gigabit Ethernet connection.

💡HatNET! 2.5G

HatNET! 2.5G is a 2.5 gigabit Ethernet adapter designed for the Raspberry Pi to upgrade its networking capabilities. In the video, the creator experiments with this adapter to test whether it can provide faster network speeds for the Raspberry Pi NAS setup, aiming to enhance its performance for data transfers and network access.

💡ZFS (Zettabyte File System)

ZFS is a file system developed by Sun Microsystems, which includes features such as protection against data corruption, support for high storage capacities, and efficient data compression. In the video, the creator considers using ZFS on Open Media Vault (OMV) for the Raspberry Pi NAS to take advantage of its advanced features and improve the overall storage performance.

💡Open Media Vault (OMV)

OMV is a free, open-source network-attached storage (NAS) solution based on Debian Linux, optimized for use with Raspberry Pi devices. In the video, the creator installs OMV on the Raspberry Pi NAS to manage storage arrays, create file shares, and provide a user-friendly interface for NAS management.

Highlights

The Raspberry Pi 5's increased speed and PCI Express support make it a viable option for building a NAS (Network Attached Storage) device.

The project aims to create a cost-effective NAS alternative to commercial 4-bay NASes that typically cost $300 and up.

The use of Radxa's SATA HAT and a Raspberry Pi 5, along with other components, can result in a NAS setup for less than $150.

The Raspberry Pi 5's gigabit network speed is a potential bottleneck compared to other NAS devices that support 2.5 gigabit speeds.

The DIY nature of the project comes with trade-offs, such as lack of vendor support and the need for the builder to manage software updates and maintenance.

The assembly process involves connecting the SATA HAT to the Raspberry Pi 5 via a Flat Flexible Circuit (FFC) board.

Power supply considerations are crucial; the setup can be powered through a 12V barrel jack or an ATX Molex power supply.

The Raspberry Pi 5's lack of a built-in fan suggests the need for additional cooling solutions, especially when dealing with hard drives that can generate significant heat.

The use of a thermal imaging camera reveals that the SATA controller chip can reach temperatures up to 60 degrees Celsius, indicating the importance of active cooling.

Benchmark tests show that the RAID 0 configuration can achieve nearly 900 megabytes per second of read speed, outperforming previous Pi 4 NAS setups.

The experiment with 2.5 gigabit networking using Pineberry Pi's HatNET! 2.5G and HatBRICK! Commander results in a network speed of around 2 gigabits.

The transition to Open Media Vault (OMV) 7 for file management and the creation of a RAIDZ1 array using ZFS demonstrates the system's flexibility and compatibility with various software.

The power efficiency of the Raspberry Pi 5-based NAS is notably better than traditional prebuilt NAS devices, using only 16 Watts during operation.

The project's overall cost remains under $200, making it an affordable DIY solution for those willing to take on the responsibilities of building and maintaining their own NAS.

The experiment highlights the potential of the Raspberry Pi 5's PCI Express bus for future expansion and innovation, such as the possible release of a Compute Module 5.

The importance of using the right tools for benchmarking is emphasized, as Mac OS was found to be less efficient for network file copies compared to Windows PC.

Transcripts

00:00

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

00:05

one on Earth, the Petabyte Pi project.

00:08

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

00:11

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

00:17

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

00:22

in the water.

00:23

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

00:27

love or money.

00:28

But the Raspberry Pi 5 is here now.

00:30

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

00:35

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

00:40

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

00:45

And would it be any good?

00:46

Well, today I'm going to see.

00:48

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

00:52

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

00:55

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

01:00

NAS for less than $150.

01:03

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

01:05

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

01:10

And they have hot-swap drive bays...

01:13

And vendor support!

01:14

So yeah, comparing just on price alone is silly.

01:17

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

01:20

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

01:25

At least, I hope.

01:26

And 2.5 gig networking?

01:28

I might have a fix for that.

01:30

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

01:34

NAS.

01:35

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

01:40

Hopefully it includes everything I need.

01:43

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

01:47

need for this.

01:48

Looks like it includes this extra cable.

01:50

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

01:53

so five SATA connections.

01:55

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

02:00

guess this might be eSATA or something?

02:03

But it has SATA and power from this board.

02:07

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

02:12

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

02:15

this board."

02:16

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

02:21

or through an ATX Molex power supply here.

02:25

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

02:29

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

02:33

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

02:38

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

02:45

rail.

02:46

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

02:54

So the Pi 5 has this little guy here.

02:58

This has a much larger connector with more pins.

03:02

That could be an interesting thing.

03:04

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

03:06

So yeah, here it is.

03:08

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

03:14

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

03:22

a little bit delicate.

03:23

You can see how thin they are.

03:24

They're kind of like paper-thin.

03:27

But these are Flat Flexible Circuit boards or FFCs.

03:31

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

03:38

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

03:42

At least that's my hope.

03:45

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

03:51

happens.

03:52

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

03:55

all the way.

03:56

And it should go in pretty easy.

03:58

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

04:00

So don't do that.

04:01

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

04:04

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

04:08

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

04:11

cable down.

04:12

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

04:20

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

04:23

So it looks like it goes like this.

04:26

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

04:31

things that are put together at factories.

04:34

And there they're very careful.

04:35

They have their methodologies.

04:36

They even have tools to help with it.

04:39

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

04:43

break our first one.

04:45

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

04:49

They probably have some screws too.

04:51

Let's check.

04:52

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

04:55

There's some standoffs and things.

04:59

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

05:04

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

05:13

But that fits nicely together.

05:16

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

05:21

hard drives at the top.

05:23

They don't have that available yet.

05:25

I think they used to make it.

05:26

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

05:31

not yet available.

05:32

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

05:36

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

05:41

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

05:44

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

05:49

it could get pretty hot and toasty inside here.

05:52

Let's get our little active cooler here.

05:54

I hope this will fit.

05:56

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

06:00

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

06:03

There's no fan built into this.

06:05

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

06:10

seem like that's the case.

06:11

Okay, please still fit.

06:15

Looks like it will fit.

06:16

Oh no, you know what?

06:20

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

06:29

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

06:33

You know what I might do?

06:34

I might see if I can bend those off.

06:37

Take this back off again.

06:39

I'm going to pull this connection off.

06:45

This is a terrible idea.

06:46

I would not recommend doing it.

06:49

Just bending this back and forth.

06:51

There's one.

06:54

Shouldn't affect the performance that badly.

06:56

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

07:03

heat sink.

07:07

There's a side view of it.

07:08

You can kind of make it out.

07:10

It's kind of hard to make out.

07:11

Sorry about that.

07:13

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

07:16

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

07:20

Look at that!

07:21

That's just enough clearance.

07:23

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

07:27

I use this huge guy.

07:31

Just give these a little snug.

07:33

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

07:38

Literally.

07:39

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

07:44

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

07:50

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

07:55

on a little bandwidth.

07:56

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

08:02

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

08:04

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

08:09

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

08:13

new version of the Penta SATA hat.

08:15

Okay, so everything is put together now.

08:17

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

08:21

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

08:26

drives at least.

08:27

And I have a 5A 12V power supply.

08:30

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

08:34

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

08:40

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

08:45

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

08:48

It's going to have all kinds of issues.

08:50

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

08:55

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

09:01

power adapter.

09:04

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

09:08

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

09:15

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

09:17

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

09:24

because there's nothing plugged into it.

09:26

Power is going to come in.

09:27

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

09:33

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

09:37

Hopefully no sparks.

09:38

All right.

09:39

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

09:47

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

09:54

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

09:59

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

10:02

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

10:07

the network and see if it's actually working.

10:09

I don't see any lights.

10:11

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

10:15

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

10:18

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

10:21

SSH pi at pi-nas.local.

10:26

There it is.

10:27

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

10:31

No, we're not seeing them.

10:33

Let's try lspci.

10:36

And I'm not seeing the device at all.

10:39

I don't see any errors in here.

10:42

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

10:49

rock.sh/penta-sata-hat.

10:51

...penta-sata-hat.

10:57

So we did that.

10:58

We did that.

11:00

Oh. [hehe]

11:01

So maybe I should actually do that.

11:04

Let's try that.

11:07

Go in here.

11:09

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

11:14

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

11:17

So save that and reboot.

11:20

So let's check again.

11:25

There we go.

11:26

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

11:28

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

11:33

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

11:36

We can check that with sudo lspci -vvvv.

11:42

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

11:46

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

11:48

That's the kernel module for the SATA controller.

11:52

And we can go up to the top section.

11:54

See, it's Jmicron JMB585.

11:57

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

12:03

x2.

12:04

That's PCIe Gen 3x2.

12:06

But the status says it's 5 gigatransfers x1.

12:10

So definitely less bandwidth than the chip is capable of.

12:14

So I'm going to try PCIe Gen 3.

12:17

And I can do that following my own guide.

12:19

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

12:26

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

12:31

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

12:35

I have four drives that have nothing on them.

12:37

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

12:42

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

12:45

So let's do that.

12:46

It'll take a couple minutes.

12:48

And we have blinking!

12:50

So you can see that the LEDs actually do work.

12:53

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

12:57

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

12:59

So nice job.

13:00

I should check.

13:02

It does feel a little bit hot.

13:06

InfraRay, I found them at CES.

13:08

And they actually sent me home with a couple goodies.

13:11

This is the P2.

13:12

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

13:19

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

13:25

is kind of cool.

13:27

But their software is a little bit iffy.

13:31

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

13:34

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

13:39

But let's check the temperatures on here.

13:42

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

13:47

So we might not be seeing the actual drive value.

13:50

But the board is up to 50 degrees or so.

13:56

The SATA controller is down there.

13:58

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

14:00

And it is getting up there to 60 degrees Celsius.

14:03

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

14:09

There's the cold soda can;

14:10

16 degrees Celsius.

14:12

And there's the hot SATA chip.

14:14

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

14:18

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

14:26

So it's pretty toasty in there.

14:28

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

14:34

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

14:38

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

14:42

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

14:47

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

14:53

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

14:56

Looks like the formatting is finished.

14:58

And what's our next step here?

15:00

Mount the array.

15:01

OK, mount RAID 0.

15:04

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

15:06

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

15:10

OK, here goes FIO.

15:12

Hey, that's not bad at all.

15:14

850 to [8]60 megabytes per second.

15:17

And that's mebibytes.

15:20

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

15:24

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

15:29

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

15:37

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

15:45

at all.

15:47

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

15:52

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

15:55

Restart Samba and create a password.

16:00

Now I should be able to connect on my Mac.

16:03

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

16:08

Here it is.

16:09

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

16:15

It's 100 gigs.

16:19

And let's check this out.

16:20

Let's see how fast it is.

16:24

That is line speed.

16:25

110 megabytes per second is pretty typical.

16:28

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

16:30

I can smell that slight off-gassing here.

16:33

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

16:39

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

16:45

the entire time.

16:47

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

16:50

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

16:55

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

16:59

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

17:04

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

17:10

all kinds of fun things.

17:12

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

17:16

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

17:21

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

17:24

They have tons of space for exhibits this year.

17:26

It'd be really cool to see your project.

17:29

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

17:33

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

17:38

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

17:40

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

17:44

I don't know.

17:45

So make sure you're subscribed.

17:49

It copied everything over to the Pi.

17:52

Now let's check the read speed.

17:53

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

17:58

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

18:01

Oh, look at that.

18:02

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

18:07

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

18:10

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

18:15

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

18:20

So there are some bottlenecks.

18:21

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

18:25

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

18:29

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

18:33

like 120 megabytes per second all the time.

18:36

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

18:39

We're cranking at 120 megabytes per second.

18:44

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

18:49

more consistent than write speeds.

18:52

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

18:55

What about 2.5 gig networking?

18:58

Now PineBerry Pi makes the HatNET! 2.5G.

19:02

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

19:06

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

19:09

It has one PCI Express input.

19:11

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

19:15

How do we solve this problem?

19:16

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

19:20

networking.

19:21

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

19:26

And yes, they sent me these things.

19:27

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

19:32

and Pineberry Pi sent me this.

19:34

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

19:39

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

19:45

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

19:48

is the PCI Express signaling.

19:51

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

19:56

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

20:01

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

20:06

the HatNET! 2.5G.

20:09

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

20:14

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

20:18

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

20:25

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

20:30

gig network if the Pi 5 can support that.

20:33

I don't know if it can or not.

20:34

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

20:39

It might also not have enough power.

20:41

I don't know.

20:42

But I'm going to unplug this.

20:45

Okay, we got that connector out of here.

20:52

There is some risk here.

20:55

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

20:59

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

21:04

It's definitely not my finest work.

21:10

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

21:16

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

21:19

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

21:22

lspci...

21:23

Hey, look at that.

21:26

So we have the switch here.

21:28

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

21:35

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

21:41

So let's do an iperf test.

21:43

Now we're getting 2 gigabits.

21:45

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

21:48

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

21:52

It's still more than a gigabit.

21:53

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

21:57

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

22:02

the drives as well.

22:03

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

22:08

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

22:12

It's doing 110, 117.

22:15

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

22:17

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

22:23

writes.

22:24

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

22:30

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

22:36

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

22:41

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

22:44

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

22:47

Hopefully we can get more than 1 gigabit.

22:49

Let's check.

22:51

There we go.

22:52

217 megabytes, 250 megabytes per second.

22:55

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

23:00

So this can put through that data.

23:02

It's interesting.

23:03

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

23:07

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

23:10

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

23:16

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

23:20

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

23:23

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

23:28

not bad at all.

23:30

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

23:35

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

23:40

to put OMV on here and see how that runs.

23:42

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

23:46

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

23:52

go over here, and this hopefully will just work.

23:55

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

24:02

goes.

24:03

Let's check power consumption.

24:05

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

24:09

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

24:15

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

24:23

Maybe I have to use the IP address.

24:25

Let's try that.

24:31

Well there it is.

24:32

I guess it was still booting up.

24:33

Okay, so that was not the problem there.

24:37

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

24:43

There it is.

24:45

There's no dashboard, that's okay.

24:47

Storage is where we should see our disks.

24:49

They should show up.

24:50

Yep, 1, 2, 3, 4.

24:52

All of them are 8 terabytes.

24:55

And I want to create an array.

24:59

File systems.

25:00

Is this where we create it?

25:02

Create and mount a file system, ext4.

25:07

But I want to create a RAID array.

25:08

How do I create a RAID array?

25:10

Am I totally missing something?

25:14

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

25:19

What does this say?

25:24

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

25:30

Do you see RAID management anywhere?

25:32

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

25:38

So we can try it out on openmediavault.

25:40

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

25:45

I like this little END OF LINE here.

25:48

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

25:52

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

25:55

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

26:00

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

26:04

But here we go.

26:06

It says pending changes, 21 terabytes available.

26:11

Let's apply this.

26:12

So now the tank should exist.

26:15

Compression is on.

26:16

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

26:21

right now.

26:22

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

26:26

Tools, what do we got?

26:27

So you can scrub it.

26:28

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

26:34

That's nice.

26:35

So this is a good interface.

26:37

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

26:40

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

26:44

have a scheduled snapshot and a pool scrubbing scheduled.

26:49

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

26:52

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

26:57

You'd have to add your own scheduled tasks.

26:58

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

27:04

But now let's add a file system.

27:07

So we have one tank ZFS.

27:10

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

27:20

save, turn on Samba enabled 10.0.2.2– 11.

27:28

Okay.

27:29

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

27:34

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

27:37

I have this, this folder has a hundred gigabytes.

27:43

So I'll do that.

27:44

And here it goes.

27:46

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

27:52

It's interesting.

27:53

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

27:57

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

28:00

So far, I'm pretty impressed.

28:02

I think read speeds are where this wins.

28:06

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

28:09

get full 2.5 gigabit networking on that.

28:12

But but it's better than I was expecting.

28:15

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

28:20

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

28:29

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

28:35

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

28:40

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

28:47

about half of what most prebuilt NASs would use.

28:51

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

28:56

more efficient and more speed.

28:58

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

29:01

at some point.

29:02

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

29:06

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

29:10

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

29:16

Some of them are getting pretty good though.

29:17

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

29:21

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

29:24

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

29:33

it was doing some sort of processing.

29:35

I don't know what ZFS was doing there.

29:37

Maybe that was part of the compression.

29:38

I don't know.

29:39

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

29:42

The actual performance was interesting.

29:44

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

29:49

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

29:53

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

29:57

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

30:01

that throws off how fast your actual disk array is.

30:05

But the CPU usage was not too bad.

30:08

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

30:14

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

30:23

100 megabytes per second in RAID 0.

30:26

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

30:29

like this.

30:30

Read speeds for both are practically the same.

30:33

It's just basically line speed.

30:35

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

30:38

[interjection Jeff] So this is a little embarrassing.

30:39

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

30:45

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

30:50

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

30:57

So that changes my perspective a little bit on it.

31:00

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

31:04

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

31:09

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

31:12

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

31:15

But let's get back to the video.

31:17

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

31:21

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

31:27

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

31:33

for maintenance and updates and all that kind of stuff.

31:38

So that was a fun experiment.

31:41

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

31:46

here that lets me split up PCI Express lanes.

31:49

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

31:53

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

31:58

whenever that comes out.

32:00

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

32:03

It gave us PCI Express.

32:05

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

32:09

form factor, but we'll see.

32:11

Until next time, I'm Jeff Geerling.