Compute Module 4 NAS With Custom Carrier Board

At this point, we’ve seen more Raspberry Pi Network Attached Storage (NAS) builds than we can possibly count. The platform was never a particularly ideal choice for this task due to the fact it could only connect to drives over USB, but it was cheap and easy to work with, so folks made the best of it. But that all changed once the Compute Module 4 introduced PCIe support to the Raspberry Pi ecosystem.

If this impressive NAS built by [mebs] represents the shape of things to come, we’re more than a little excited. On the outside, with its 3D printed case and integrated OLED display to show system status, it might look like plenty of builds that came before it. But pop the top of this cyberpunk-styled server, and you realize just how much work went into it.

At the heart of this NAS is a purpose-built carrier board that [mebs] designed based on the KiCad files the Raspberry Pi Foundation released for their official CM4 IO Board. While not much larger than the CM4 itself, the NAS board breaks out the board’s PCIe, Ethernet, HDMI, and USB. There’s also a header for I2C, used primarily for the OLED display but naturally expandable to additional sensors or devices, and nine GPIO pins for good measure.

Of course, that alone doesn’t make a NAS. Into that PCIe port goes a four channel SATA controller card, which in turn is connected to the hard disk drives that are nestled into their respective nodes of the printed case. A central fan blows over the electronics at the core, and thanks to clever design and a few cardboard seals, pulls air over the drives by way of intake vents printed into the sides.

As impressive as this build is, not everyone will need this level of performance. If you don’t mind being limited to USB speeds, you can 3D print a NAS enclosure for the standard Raspberry Pi. Or you could always repurpose an old PC case if you’d like something a bit more substantial.

20 thoughts on “Compute Module 4 NAS With Custom Carrier Board

  1. Looks really good, I’ve been using an original small ram model B as a NAS (and server for other things too) since I got it, and its been very much adequate for the tiny user numbers mostly streaming our music library off it, while cutting down on the power bill hugely over that time – used to run it all off an ‘efficient’ goal part selection mini-ATX – so idling at more than the Pi can draw under full load, though it was potent enough to host a Minecraft (among a few other games) server for quite a few users which the Pi can’t… But as soon as I started playing with the Pi4 it was clear that it was now really worth the upgrade (actually have a CM on order for a very long time for it).

    For me till now the performance, cost and documentation quality of the other SBC options has all written them off, sure some of them will be a little better than my very old Pi, but limited to usb 2 speeds (with maybe one native sata of some sort) and thus you are still stuck with all the extra power cables those USB disks will need anyway for most of them, so its not enough of gain to be worth changing… Till now at least.

    1. I’ve done something similar lately replacing two barely utilised x86 boxes with one ARM box, at least for basics like SMB and Plex. Power consumption’s gone down by about 50W which saves me £5-6/month and pays for the ARM board in a couple of years. My RockPro64 (RK3399 based) isn’t quite peformant enough, I still have to think about when I want to watch a video and get Plex to transcode it ahead of time but it’ll process at 0.7x realtime for 1080p content so there isn’t too much delay. The open-ended PCIe slot let me fit a PCIe to SATA card solving USB power oddities.

      What I’m really excited for are RK3588 boards, that chip’s got a lot of bells and whistles.

      1. Yeah some neat chips out there, but for me if the documentation and support isn’t good I can’t be bothered.
        I’ve found no issues streaming video in HD off the original Pi, but that isn’t using something like Plex, just streaming via smb…

        1. Agreed and for support there’s no competing with Raspberry Pi’s manufacturer and community backing. They’re not the only option though, I’d encourage you to look around next time you’re buying something. If it’s got mainline linux support and Armbian support it’s probably fine. Allwinner H3s were good choices and incredibly cheap so were raspberry pi 3 competitors. Rockchip RK3399s are well supported because they’re used in industry, chromebooks, media players etc and they’ll outpace a raspberry pi 4.

          1. Indeed, I have looked around from time to time, and been tempted. Main thing that put me off was no money spare for the project that could use the extra features of x SBC at the time. If one of the many pi’s I have (got lots of older models cheap) will do the job no point in getting a new one, and if I have a project idea the Pi can’t handle I can’t afford to start right now, again no point….

            Worth mentioning for me at least it is not just supported now, but the expectation of long term support that matters – its nice to know that SBC you rediscover in an old project can just be updated and used easily. Still doesn’t lock you into only the Pi foundation, but enduring support is less universal than I’d like.

  2. I just rebuilt my NAS this weekend based on a Raspberry Pi 4 and my “case” is a book the Pi is mounted on with 4 M3 bolts (yes, the holes are M2.5, but a file made them fit M3). I used to have a Raspberry Pi 1 which was mounted ín this same book, but the hotness of the Pi 4 made me decide this was not a good idea. The Pi 4 is mounted vertically to optimize airflow (as per https://www.raspberrypi.org/blog/thermal-testing-raspberry-pi-4/, search for “orientation”).
    The 3 wires going into the book are for a power switch and power status LED (very vaguely visible withing the “c” on the bookend): http://iivq.net/wp-content/uploads/sites/4/2021/04/AsteriskPi1.jpg

    The original model Pi 1 model B was, as [Foldi-One] says, more than adequate enough for the streaming of music/media, but it took a minute or 10-20 to upload a movie to it over NFS, in the meanwhile locking up my computer’s dolphin. My whole home network is rewired to Gigabit ethernet and now a movie upload is an half-minute affair.

    1. I’ve seen a lot of different ways to mount a Pi. 3d peinted cases, lasercut cases, repurposed old electronics… But that’s the first time I’ve seen one bolted to a book. It sounds silly, but in that pic it actually looks really neat and clean. Nice one!

  3. nice! A clean build! Feature packed. I’d buy something like this anyway over the QNAPS and other dubious NAS vendors out there, with all their security vulnerabilities, closed source stuff, and other artificial limitations.

  4. Four SATA 2.0 (3Gbit/second raw signaling rate) disks could in theory generate after you factor in the 10b/8b encoding used on the cable a maximum datarate of ~1144.4 MiB/second (~286.1 MiB/second from each disk).

    One PCIe 2.0 lane (5Gbit/second raw signaling rate) could in theory transfer (after after you factor in the 10b/8b encoding used) a maximum datarate of ~476.8MiB/second.

    One gigabit Ethernet link (1Gbit/second raw datarate, which unlike SATA and PCIe is after the 10b/8b encoding used on the cable) could in theory transfer a maximum datarate of roughly ~112MiB/second (after you factored in the IP and TCP packet header overheads).

    I do not see anything really bad about the bottlenecks above to the flow of actual data, but I also do not see anything that stands out as being great about using a RPi 4 for a four hard disk dataserver either. Am I missing something ?

    1. If you use raid5/6, zfs, brtfs, or anything that requires cpu power to read/write data the CPU itself is still a bottleneck.
      Its able to saturate the gigabit ethernet connection most of the time, so its not that bad. With ZFS it definitely can’t, but you don’t want to run zfs on it.

      1. Got a itx server with a AMD Kabini A4-5000 and 16 gigs of ram along with four 6TB disks in RaidZ1.
        Going full ham scrubbing the disks takes about 1 to 1 1/2 cpu core, but I presume it’s because it got so much memory to deal with that means the processor is slightly spared.

    2. Real-world testing shows around a 400 MiB/sec maximum throughput on the PCIe bus. I’ve been testing various scenarios using PCIe on the CM4, and the other bottleneck you run into if you try pumping more data through (e.g. with a PCIe switch and a 2.5G network card) is that the Pi’s CPU pins network traffic interrupts to one CPU core, so unless you overclock or use jumbo frames (or the NIC has some offloading capabilities, which few do), then you’re also limited to 1.7 Gbps network throughput.

      The nice thing is, though, you can do things like set up ‘real’ RAID over SATA/SAS/NVMe with an actual PCIe bus, rather than flaky RAID (some apps like OMV disallow it) over USB drives, if you want the reliability or other characteristics that RAID provides.

      Something something RAID is not a backup and all that jazz…

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.