Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] NAS and replacing with larger drives
Date: Thu, 08 Dec 2022 23:30:26
Message-Id: 015b49e3-a7d4-45f0-1ffd-b9be97215a54@gmail.com
In Reply to: Re: [gentoo-user] NAS and replacing with larger drives by Rich Freeman
1 Rich Freeman wrote:
2 > On Thu, Dec 8, 2022 at 7:37 AM Dale <rdalek1967@×××××.com> wrote:
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 > For this sort of application the key improvement of the Pi4 over its
7 > predecessors is IO. The Pi4 has USB3 and gigabit ethernet, and they
8 > are independent, so you get the full bandwidth of both (in theory).
9 > That is a massive step up over USB2 and 100Mbps ethernet that consumes
10 > the USB2 bandwidth.
11 >
12 > I can't really speak to the commercial solutions as I haven't used
13 > them. Main concern there is just the limited capacity, lack of
14 > expandability, and so on. Some are no doubt better than others in
15 > those regards.
16 >
17 > As far as DIY goes, you can definitely do all of that with a Pi4.
18 > Don't expect it to perform as well as sticking it on a decent amd64
19 > motherboard, but for backup and saturating the throughput of 1 hard
20 > drive at a time it can probably mostly make do. Encryption can be
21 > accomplished either with cryptsetup or a filesystem that has native
22 > encryption like ZFS. I've done both on Pi4s for storage. I will warn
23 > you that zfs encryption is not hardware-optimized on ARM, so that will
24 > not perform very well - it will be completely functional, but you will
25 > get CPU-bound. Linux-native encryption (ie cryptsetup/LUKS) will use
26 > hardware capabilities on the Pi4, assuming you're using something it
27 > supports (I think I'm using AES which performs adequately).
28 >
29 > For the Pi4 you would need to use USB storage, but for hard drives IMO
30 > this is perfectly acceptable, especially on a Pi. The gigabit
31 > ethernet and internal IO of the Pi is only going to max out one hard
32 > drive no matter how you connect it, so the USB3 interface will not be
33 > a bottleneck. On ARM SBCs that have PCIe you don't really get any
34 > better performance with an HBA and SATA/SCSI simply because the board
35 > IO is already pretty limited. USB3 is actually pretty fast for
36 > spinning disks, but depending on the number of hosts/etc it could
37 > become a bottleneck on a decent motherboard with a large number of
38 > drives. If you're talking about an amd64 with a 10GbE NIC and a
39 > decent HBA with sufficient PCIe lanes for both then obviously that is
40 > going to saturate more spinning disks. For NVMe you absolutely need
41 > to go that route (probably need to consider server-class hardware
42 > too).
43 >
44 > I use USB3 hard drives on Pis for my bulk storage because I care about
45 > capacity far more than performance, and with a distributed filesystem
46 > the performance is still good enough for what I'm doing. If I needed
47 > block storage for containers/VMs/whatever then use a different
48 > solution, but that gets expensive fast.
49 >
50 > Oh, one other thing. One of your issues is that you're using a backup
51 > solution that just dumps everything into a single file/directory and
52 > requires all the backup storage to be mounted at the same time in a
53 > single filesystem. There are solutions that do not have this
54 > requirement - particularly ones that are adaptable to tape.
55 > Unfortunately the best FOSS option I've found for this on linux is
56 > bacula and that is a serious PITA to use. If anybody has a better one
57 > I'm all ears (the requirement is to be able to store a backup across
58 > multiple hard drives, and this can't involve first storing it all in
59 > one place and then splitting it up later, or having more than one
60 > storage drive attached at the same time - basically I want to treat
61 > hard drives like tapes).
62 >
63 > If you're storing a LOT of backups then LTO is another option. Every
64 > time I do the math on that option it never makes sense unless you're
65 > backing up a LOT of data. If you got to a point where your backups
66 > consumed 10+ max-capacity hard drives it might start to make sense.
67 > Those USB3 hard drives on sale for $15/TB though are just really hard
68 > to beat when the tapes aren't all that much cheaper and the drives
69 > cost $1k.
70 >
71
72 From my understanding, you are right about USB3 and GB ethernet being
73 the big change.  They also have more memory and faster CPUs but if you
74 bottleneck the data with slow USB and ethernet with the old ones, who
75 needs a fast CPU?  I think they realized that the USB and ethernet had
76 to improve.  It got better from there. 
77
78 https://shop.allnetchina.cn/collections/sata-hat/products/dual-sata-hat-open-frame-for-raspberry-pi-4
79
80 I found the above.  From my understanding, it allows a SATA drive to
81 connect to either 2 or 4 bays.  That card appears to connect with USB3
82 ports but I can't see the bottom.  Odds are, especially if data is
83 encrypted, the CPU will likely max out before the USB and ethernet.  I'd
84 think anyway.  From what little I've read, they seem to be pretty fast. 
85
86 One thing I like about the Raspberry option, I can upgrade it later.  I
87 can simply take out the old, put in new, upgrade done.  If I buy a
88 prebuilt NAS, they pretty much are what they are if upgrading isn't a
89 option.  Some of the more expensive ones may be upgradable, maybe. 
90
91 I just wonder, could I use that board and just hook it to my USB port
92 and a external power supply and skip the Raspberry Pi part?  I'd bet not
93 tho.  ;-)
94
95 Dale
96
97 :-)  :-) 

Replies

Subject Author
Re: [gentoo-user] NAS and replacing with larger drives Rich Freeman <rich0@g.o>
Re: [gentoo-user] NAS and replacing with larger drives Frank Steinmetzger <Warp_7@×××.de>
Re: [gentoo-user] NAS and replacing with larger drives William Kenworthy <billk@×××××××××.au>