Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] NAS and replacing with larger drives
Date: Thu, 08 Dec 2022 13:52:57
Message-Id: CAGfcS_nX6ipPsRFj0SWoRpX23YdikcHzs2BRSukyPtCfuGD94Q@mail.gmail.com
In Reply to: [gentoo-user] NAS and replacing with larger drives by Dale
1 On Thu, Dec 8, 2022 at 7:37 AM Dale <rdalek1967@×××××.com> wrote:
2 >
3 > Path two, I've researched building a NAS using a Raspberry Pi 4 8GB as
4 > another option. They come as parts, cases too, but the newer and faster
5 > models of Raspberry Pi 4 with more ram seem to work pretty well.
6
7 For this sort of application the key improvement of the Pi4 over its
8 predecessors is IO. The Pi4 has USB3 and gigabit ethernet, and they
9 are independent, so you get the full bandwidth of both (in theory).
10 That is a massive step up over USB2 and 100Mbps ethernet that consumes
11 the USB2 bandwidth.
12
13 I can't really speak to the commercial solutions as I haven't used
14 them. Main concern there is just the limited capacity, lack of
15 expandability, and so on. Some are no doubt better than others in
16 those regards.
17
18 As far as DIY goes, you can definitely do all of that with a Pi4.
19 Don't expect it to perform as well as sticking it on a decent amd64
20 motherboard, but for backup and saturating the throughput of 1 hard
21 drive at a time it can probably mostly make do. Encryption can be
22 accomplished either with cryptsetup or a filesystem that has native
23 encryption like ZFS. I've done both on Pi4s for storage. I will warn
24 you that zfs encryption is not hardware-optimized on ARM, so that will
25 not perform very well - it will be completely functional, but you will
26 get CPU-bound. Linux-native encryption (ie cryptsetup/LUKS) will use
27 hardware capabilities on the Pi4, assuming you're using something it
28 supports (I think I'm using AES which performs adequately).
29
30 For the Pi4 you would need to use USB storage, but for hard drives IMO
31 this is perfectly acceptable, especially on a Pi. The gigabit
32 ethernet and internal IO of the Pi is only going to max out one hard
33 drive no matter how you connect it, so the USB3 interface will not be
34 a bottleneck. On ARM SBCs that have PCIe you don't really get any
35 better performance with an HBA and SATA/SCSI simply because the board
36 IO is already pretty limited. USB3 is actually pretty fast for
37 spinning disks, but depending on the number of hosts/etc it could
38 become a bottleneck on a decent motherboard with a large number of
39 drives. If you're talking about an amd64 with a 10GbE NIC and a
40 decent HBA with sufficient PCIe lanes for both then obviously that is
41 going to saturate more spinning disks. For NVMe you absolutely need
42 to go that route (probably need to consider server-class hardware
43 too).
44
45 I use USB3 hard drives on Pis for my bulk storage because I care about
46 capacity far more than performance, and with a distributed filesystem
47 the performance is still good enough for what I'm doing. If I needed
48 block storage for containers/VMs/whatever then use a different
49 solution, but that gets expensive fast.
50
51 Oh, one other thing. One of your issues is that you're using a backup
52 solution that just dumps everything into a single file/directory and
53 requires all the backup storage to be mounted at the same time in a
54 single filesystem. There are solutions that do not have this
55 requirement - particularly ones that are adaptable to tape.
56 Unfortunately the best FOSS option I've found for this on linux is
57 bacula and that is a serious PITA to use. If anybody has a better one
58 I'm all ears (the requirement is to be able to store a backup across
59 multiple hard drives, and this can't involve first storing it all in
60 one place and then splitting it up later, or having more than one
61 storage drive attached at the same time - basically I want to treat
62 hard drives like tapes).
63
64 If you're storing a LOT of backups then LTO is another option. Every
65 time I do the math on that option it never makes sense unless you're
66 backing up a LOT of data. If you got to a point where your backups
67 consumed 10+ max-capacity hard drives it might start to make sense.
68 Those USB3 hard drives on sale for $15/TB though are just really hard
69 to beat when the tapes aren't all that much cheaper and the drives
70 cost $1k.
71
72 --
73 Rich

Replies

Subject Author
Re: [gentoo-user] NAS and replacing with larger drives Dale <rdalek1967@×××××.com>