Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5349

General discussion • Re: RPI NAS with 2x4TB storage: comments please

$
0
0
Hi. This is my first time on the forum. I’m new to Raspberry Pi.

I’m thinking of putting together a NAS on a wired ethernet connection with 4TB of RAID1 storage. The box would ideally run a minimal install of Debian stable as I only really need rsync and ssh for backups. It would be great if the box could be woken with wake-on-lan (WoL) and be pretty power efficient. My budget is around £500.

Some initial comments:
  • Use Raspberry Pi OS not plain Debian. It's where the Pi development happens and is the most comonly used OS by folks on here.
  • There is no hardware support for RAID1 (or any other RAID level) on Pi. That means it is all done by the CPU and all writes go over the bus twice - once for each drive.
  • No Pi supports wake on lan.
I came across the Waveshare CM4 NAS box which can take 2 x NVME drives and requires only an RPi compute module 4. (I don’t expect to make full use of the speed of the NVME drives.)

I'm not familiar with that board but as there is only a single PCIe lane exposed on the CM4 it must have a PCIe switch onboard. That means two things:
  1. More latency due to the switch
  2. Both NVMe drives share the bandwidth of the single PCIe lane. That said, network clients won't notice as their limit will be the LAN speed.
  3. You cannot boot from the drives connected to this board as the bootloader has no support for a PCIe switch.
There seem to be other interesting possibilities out there, such as the Wiretrustee SATA, but the Waveshare seems smaller and more convenient. I’m a bit worried about heat dissipation, though.


There are many options. My CM4 NAS currently uses a mix of SSDs and HDDs connected via a pair of SATA cards and a PCIe packet switch. Boot partition is on SD card (it's a CM4 lite) everything else is on a SATA drive.

Everything is stuffed into an mATX case and powered by an ATX PSU.
I’d be grateful for comments on the feasibility of my proposed setup, which is detailed below.

Thanks!
Rory

Waveshare CM4
https://www.waveshare.com/cm4-nvme-nas-box.htm
About £88.52

RPI Compute module 4
CM4008008 (8GB storage, 8GB RAM) for boot disk
About £80

2 x NVME drives
For swap, tmp and storage

Use a separate swap partition outside the RAID array and put /tmp in RAM.
2x Fikwot FN950 4TB (~ @£170 on sale; never used these)
About £340

There's no real benefit to using NVMe. The performance limit is the network link at 1Gbps and unless you're doing a lot of small, random, uncached disc I/O you won't see a decrease in latency over HDDs. Spinning rust HDDs will give you more MB per £ too.
OS
Use a Debian image from https://raspi.debian.net/tested-images/

Nope. I'd use RPiOS lite or RPiOS full configured to boot to command line without auto login (just in case you need any GUI tools)
WoL
Wake On LAN doesn’t seem to be supported on Raspberry Pis

Correct. But it can be achieved with additional hardware ([shameless self promotion]https://github.com/thagrol/fakewake/tree/master/pico[/shameless self promotion])

If I were building a new NAS, and assuming the CM5 isn't about to launch I'd spec it as follows:
  • Raspberry Pi 5
  • NVMe HAT+ (or other NVMe board)
  • Small capicty M.2 NVMe drive for boot, root, /home (if on a separate partition), and swap. Optional. A good uSD card or USB thumb drive would also work.
  • /tmp in RAM
  • No RAID. It's a false sense of security. It protects against drive failure but not other forms of data loss. It's useful when you need high availability but is not a substitute for backups.
  • Either a multi-bay USB 3 drive enclosure that does the RAID in hardware (if you really must have RAID) or two USB HDDs one connected to each USB 3 port (more bandwidth per drive than using your proposed NVMe based as there's a PCIe x4 link between RP1 and SoC)
  • Self powered drive enclosures unless you're using a pair of drives that need less than a combined total of 1.6A (less what's needed by enclosures and other connected USB devices) and are using the official 27W PSU.
  • Raspberry Pi OS running Samba, NFS, and SFTP.
[shameless self promotion]
You might find my guide to Building A Pi Based NAS to be of interest.
[/shameless self promotion]

Oh, you don't appear to have budgeted for a PSU.

Statistics: Posted by thagrol — Sat May 25, 2024 11:59 pm



Viewing all articles
Browse latest Browse all 5349

Trending Articles