The ULTIMATE Raspberry Pi 5 NAS

Jeff Geerling
4 Apr 202432:14

Summary

TLDR视频中,Jeff Geerling 构建了一个基于 Raspberry Pi 5 的 NAS 系统,使用了 Radxa 发送的 SATA HAT 和其他组件,总成本不到 150 美元。他测试了系统的读写速度,发现虽然写入速度没有达到 1Gbps,但读取速度却超过了预期。此外,他还尝试了使用 PineBerry Pi 的 HatNET! 2.5G 和 HatBRICK! Commander 扩展网络功能,并成功实现了超过 1Gbps 的网络传输速度。最后,他还安装并测试了 Open Media Vault 7 和 ZFS on RMS,展示了其易用性和高效能。视频强调了 DIY NAS 的成本效益和灵活性,同时也提醒了维护和更新的责任。

Takeaways

  • 📷 视频作者尝试使用Raspberry Pi 5构建了一个NAS系统,这是相较于之前尝试的Pi 4和Compute Module 4的升级。
  • 🚀 Raspberry Pi 5相较于前代产品,性能提升,支持PCI Express,并且现在容易购买。
  • 💡 作者使用了Radxa提供的SATA HAT,这个设备提供了四个SATA接口,并且价格合理。
  • 🛠️ 构建过程包括了连接FFC(扁平柔性电路板)以及确保所有连接器正确安装,以避免损坏。
  • 🔌 视频提到了电源供应的重要性,说明了如何通过12V电源适配器为整个系统供电。
  • 🔥 散热是构建NAS时需要考虑的一个关键因素,尤其是在使用2.5英寸硬盘时。
  • 📈 作者对系统进行了基准测试,包括磁盘性能和网络传输速度,发现读取速度接近900MB/s。
  • 🌐 尝试了2.5G网络扩展卡,通过HatBRICK! Commander实现了PCI Express的扩展。
  • 💻 视频作者还提到了Open Media Vault(OMV)操作系统的使用体验,以及ZFS文件系统的性能。
  • 🔧 在整个构建过程中,作者强调了DIY NAS系统的灵活性和成本效益,同时也指出了维护和更新的责任。
  • 💡 视频最后,作者分享了对于未来可能的Compute Module 5的期待,以及对Raspberry Pi 5 PCI Express总线扩展的探索。

Q & A

  • Raspberry Pi 5 与前代相比有哪些改进?

    -Raspberry Pi 5 相比前代产品速度更快,具有 PCI Express 接口,并且最重要的是,用户现在可以实际购买到它。虽然它比 Raspberry Pi 4 稍微贵一些,但考虑到市面上现成的 4 盘位 NAS 设备价格通常在 300 美元以上,Raspberry Pi 5 仍然具有成本效益。

  • 作者尝试使用什么设备来构建成本更低的 NAS?

    -作者尝试使用 Radxa 公司发送的小型 SATA HAT 设备来构建成本更低的 NAS。这个设备售价 45 美元,并且已经发货。

  • 构建 Raspberry Pi NAS 的总成本大约是多少?

    -除了 SATA HAT 设备外,还需要一个 12V 电源、一个 Raspberry Pi 5、一个风扇和 microSD 卡,总共的成本可以控制在 150 美元以下。

  • Raspberry Pi 5 在网络传输速度上有何限制?

    -Raspberry Pi 5 仅支持千兆以太网,而其他 NAS 设备可以达到 2.5Gbps 的速度。

  • 作者提到了哪些可能影响 Raspberry Pi NAS 性能的瓶颈?

    -作者提到了 Raspberry Pi 5 的网络传输速度限制,以及缺少热插拔硬盘托架和厂商支持等因素可能成为性能瓶颈。

  • 作者如何解决 Raspberry Pi 5 的网络速度限制问题?

    -作者尝试使用 PineBerry Pi 制作的 HatNET! 2.5G 网卡来提高网络速度,并通过 HatBRICK! Commander 来扩展 PCI Express 接口。

  • 在构建 NAS 时,作者提到了哪种类型的硬盘会产生更多的热量?

    -作者提到,如果使用 2.5 英寸的硬盘,那么它们可能会产生相当多的热量,因此有一个风扇吹过它们会比较好。

  • 作者在测试 Raspberry Pi NAS 性能时使用了哪些软件工具?

    -作者使用了 FIO 来进行磁盘基准测试,iperf 进行网络性能测试,以及 Open Media Vault (OMV) 作为 NAS 的操作系统。

  • 作者在测试过程中遇到了哪些问题,并且是如何解决的?

    -作者在测试过程中遇到了硬盘没有被识别的问题,通过启用 PCI Express 并重启解决了这个问题。另外,作者还遇到了网络速度没有达到预期的问题,通过使用 HatBRICK! Commander 和 HatNET! 2.5G 进行了改进。

  • 作者对 Raspberry Pi NAS 的最终性能满意吗?

    -作者对 Raspberry Pi NAS 的读取速度表示满意,因为它几乎达到了线速度。但是写入速度没有达到预期,尤其是在使用 2.5G 网络时。尽管如此,作者认为对于一个 DIY NAS 项目来说,这个性能是可接受的。

  • 作者在视频最后提到了哪个即将到来的活动?

    -作者提到了 Open Sauce 活动,它将在 6 月 15 日至 16 日在旧金山举行,作者将出席并与许多其他创作者一起展示他们的项目。

  • 作者在构建 NAS 时考虑了哪些成本以外的因素?

    -除了成本,作者还考虑了设备的尺寸、功耗、易用性、软件支持以及维护更新等因素。

  • 作者为什么认为使用 Mac 进行网络文件复制的基准测试可能不是最佳选择?

    -作者发现使用 Mac 进行基准测试时,即使 Mac 拥有 10Gbps 网络,文件复制速度也没有达到预期。在切换到 Windows PC 后,作者发现文件复制速度有了显著提升,因此得出结论 Mac OS 在处理文件复制方面可能不是最佳选择。

Outlines

00:00

🛠️ Raspberry Pi NAS构建挑战与新希望

视频作者介绍了自己之前构建的多个Raspberry Pi NAS项目,包括一个全SSD的小型NAS和一个庞大的Petabyte Pi项目。尽管使用了SSD,但之前的作品在网络传输速度上未能达到每秒100MB。提到了两个有前景的项目Wiretrustee SATA板和Radxa Taco,但都因Raspberry Pi短缺而失败。现在,随着Raspberry Pi 5的发布,作者看到了新的希望,因为它更快,支持PCI Express,并且容易获得。作者计划使用Radxa发送的小型SATA HAT来构建一个新的NAS,预计成本不到150美元,并对是否会有性能瓶颈表示怀疑。

05:04

🔧 组装Raspberry Pi 5 NAS的初步尝试

作者展示了组装Raspberry Pi 5 NAS的过程,包括使用Radxa的SATA HAT和额外的电缆。讨论了如何为系统供电,包括通过12V电源插座或ATX Molex电源供应,并强调了确保电源电路能够提供足够的电流给Raspberry Pi的重要性。作者还提到了FFC(Flexible Flat Cable)的使用,这是一种薄而易损的连接方式,用于连接Raspberry Pi的PCI Express接口。

10:08

🔥 散热问题和硬件兼容性的解决

作者在组装过程中意识到了散热的重要性,尤其是在使用2.5英寸硬盘时。尝试安装了一个散热器,但遇到了电源插孔与散热器接触的问题。通过调整散热器,作者解决了这个问题,并成功安装了散热器。此外,作者还提到了在组装过程中遇到的一些问题,如驱动识别问题,并通过查阅文档解决了PCI Express的配置问题。

15:10

📈 性能测试与网络文件传输

在成功组装并配置了NAS之后,作者进行了性能测试,包括硬盘的读写速度和网络文件传输速度。测试结果显示,RAID 0配置下,硬盘的读写速度达到了每秒近900MB。作者还尝试了通过Samba共享进行大文件传输,发现传输速度能够达到每秒110MB,接近千兆以太网的极限。此外,作者还提到了对2.5千兆网络的探索,尽管遇到了PCI Express接口的限制。

20:15

🌐 探索2.5G网络的可能性

作者尝试使用PineBerry Pi的2.5G网络扩展帽和HatBRICK! Commander来实现2.5G网络连接,并探讨了如何将这个网络扩展帽与SATA控制器一起工作。尽管这限制了PCI Express的速度为第二代,但作者发现在2.5G网络下,读取速度能够达到每秒250MB,写入速度也有小幅提升。这表明对于读密集型的NAS,这个设置是一个可行的选择。

25:20

📊 ZFS文件系统和RAID管理的尝试

作者尝试在NAS上安装Open Media Vault(OMV)7,并探索了ZFS文件系统。他发现OMV的界面直观,易于管理,但缺少了一些自动化的任务,如定期快照和池清理。尽管在复制大文件时,ZFS的性能起初超过了RAID 0,但最终速度略有下降,显示出ZFS在缓存方面的策略。作者还注意到了ZFS在复制过程中的CPU使用和功耗情况。

30:23

🔄 性能对比与未来展望

在视频的最后,作者对比了使用ZFS的RAID Z1和RAID 0的性能,发现写入速度上ZFS略慢,但读取速度相当。他还提到了在Windows PC上进行的测试,发现写入速度有了显著提升,这改变了他对系统性能的看法。作者强调了DIY NAS的责任,包括软件维护和更新,并对未来可能的Compute Module 5表示期待。

Mindmap

Keywords

💡Raspberry Pi NAS

Raspberry Pi NAS指的是使用树莓派(Raspberry Pi)构建的网络附加存储设备。在视频中,作者讨论了使用不同版本的Raspberry Pi来构建NAS的可能性和挑战。例如,作者提到了从小型全SSD NAS到Petabyte Pi项目的各种构建,展示了Raspberry Pi在存储解决方案中的应用。

💡PCI Express

PCI Express是一种通用的计算机总线,用于计算机硬件设备之间的连接。在视频中,作者强调了Raspberry Pi 5支持PCI Express的重要性,因为它允许连接更多的高速设备,如SATA板和网络扩展卡,从而增强了NAS的性能。

💡Wiretrustee SATA板

Wiretrustee SATA板是一种为Raspberry Pi设计的扩展板,提供SATA接口以连接硬盘驱动器。视频中提到,尽管这个项目很有前景,但由于Raspberry Pi的短缺,它并没有成功推出,说明了DIY项目有时会受到供应链问题的影响。

💡Radxa Taco

Radxa Taco是另一种为Raspberry Pi设计的SATA扩展板。视频作者提到了这个项目,指出它同样受到了Raspberry Pi短缺的影响,这展示了外部因素如何影响硬件项目的可用性和成功。

💡FFC

FFC,即Flat Flexible Circuit,是一种扁平的柔性电路板。在视频中,作者使用了FFC来连接Raspberry Pi 5和SATA HAT,说明了这种连接方式在紧凑空间和DIY项目中的实用性。

💡JMB585

JMB585是一种SATA控制器芯片,用于管理SATA接口的数据传输。视频中提到了这个芯片,指出它支持PCIe Gen 3x2,但由于某些限制,实际使用中可能只能达到Gen 2的速度,这影响了NAS的最大理论性能。

💡RAID

RAID(Redundant Array of Independent Disks)是一种将多个硬盘驱动器组合成一个逻辑单元的数据存储虚拟化技术。视频作者在构建NAS时考虑了RAID配置,如RAID 0和RAID 10,以提高性能和/或数据冗余。

💡ZFS

ZFS是一种先进的文件系统和卷管理器,它提供了数据完整性、压缩和去重等功能。在视频中,作者尝试在OpenMediaVault上使用ZFS来管理NAS的存储池,展示了ZFS在提升存储效率和数据保护方面的潜力。

💡HatNET! 2.5G

HatNET! 2.5G是PineBerry Pi生产的一种网络扩展板,为Raspberry Pi提供2.5千兆以太网接口。视频中,作者尝试将这个扩展板与Raspberry Pi 5结合使用,以探索超过千兆以太网速度的网络性能。

💡HatBRICK! Commander

HatBRICK! Commander是一个PCI Express开关,允许多个设备共享Raspberry Pi上的PCI Express总线。在视频中,作者使用这个设备来同时连接SATA HAT和HatNET! 2.5G,展示了如何扩展Raspberry Pi的硬件能力。

💡Open Media Vault

Open Media Vault是一个基于Debian的Linux发行版,专为构建NAS而设计。视频作者在Raspberry Pi NAS上安装并使用了OMV,以展示其易用性和功能,包括存储管理、文件共享和网络服务。

Highlights

构建了多种树莓派NAS设备,包括全SSD NAS和Petabyte Pi项目。

树莓派4和Compute Module 4性能仅是勉强够用,即使使用SSD也未能达到每秒100MB的网络速度。

Wiretrustee SATA板和Radxa Taco项目因树莓派短缺而失败。

树莓派5的发布带来了更快的速度和PCI Express支持,且容易购买。

尽管价格高于树莓派4,但自制NAS的成本可能低于市面上的4盘位NAS。

使用Radxa发送的小型SATA HAT,成本仅为45美元,已经发货。

组装包括12V电源、树莓派5、风扇和microSD卡的NAS,总成本不到150美元。

树莓派5仅支持千兆以太网,而其他NAS支持2.5G,且具有热插拔硬盘位和厂商支持。

自制NAS总是存在权衡,但相比过去的构建,这次的妥协更少。

尝试使用2.5G网络,使用PineBerry Pi的HatNET! 2.5G和HatBRICK! Commander扩展PCI Express。

组装过程包括连接FFC(扁平柔性电路板)和GPIO引脚供电。

散热是组装过程中需要考虑的重要因素,特别是对于长时间运行的设备。

使用Zigbee智能插座进行功耗测试,显示启动时功耗达到14.2瓦特。

通过SSH连接并使用命令行检查硬盘驱动器和PCI设备,发现需要手动启用PCI Express。

使用FIO工具对RAID 0配置的硬盘阵列进行基准测试,达到接近900MB/s的速度。

尝试通过Samba共享在1Gbps以太网上持续传输数据,速度达到110MB/s。

使用Open Media Vault(OMV)作为NAS的操作系统,并探索其RAID管理功能。

在OMV上首次尝试使用ZFS文件系统,创建了RAIDZ1阵列,并测试了其性能。

最终测试显示,ZFS在RAID Z1配置下的写入速度略低于RAID 0,但读取速度相当。

在Windows PC上重新测试后发现,写入速度可达到接近线速度,而Mac OS在文件复制方面表现不佳。

整个项目的成本效益和DIY的灵活性展示了自制NAS相对于市售产品的潜在优势。

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)

相关标签
Raspberry PiNAS构建性能测试DIY项目硬件评测网络存储PCIe应用系统优化散热方案文件传输