I want to set up a simple NAS at home, I've seen some options on the internet but they're either too complex or use a usb dock for the drive, which limits the bandwidth. I was wondering if it is possible to achieve a nice setup by using a usb-c 3.1 SSD, but I don't know much about the current boards, the Raspberry 4 seems to have a usb-c but for power supply. Is there a board that would fit this purpose? or some kind of component to connect the ssd to some board to take advantage of the usb-c 3.1 bandwidth?
2 Answers
USB is a bit of a mess right now with USB-A, USB-C, USB 3.0, USB 3.1 Gen 1 and Gen 2, USB 3.2 Gen 1, Gen 2 and Gen 2x2. But you don't need a type-C connector to get the speeds you need.
For a NAS for home use (i.e. with probably a limited number of users, unlikely to all actually use the NAS at the same time, with at best Gigabit Ethernet connections), as long as you get over standard USB 2.0, your limiting factor is much more likely to be the network (or the CPU) than the interface between the CPU and the drive.
Any of USB 3.x variants support at least 3.2 Gbit/s of throughput, which is much more than Gigabit Ethernet or any of the current actual Wi-Fi speeds available.
So anything that supports USB 3.x should do, though you may very well have bottlenecks other than the interface itself:
- The drive itself
- All the logic between the USB interface, RAM and CPU
- RAM itself
- The CPU itself if you have any sort of crypto going on
- All the logic between RAM, CPU and the network interface
- The network interface
A Raspberry Pi 4 has two USB 3.0 interfaces (in standard USB-A shape, with a blue colour), they should be more than enough to connect a suitable SSD drive.
Raspberry Pi 4 USB benchmarks show performance in the region of 320-360 Mbytes/s, which translates to 2.5 to 2.8 Gbit/s. Again, a lot more than what even the Gigabit Ethernet interface can deliver. RAM has decent performance as well, and ditto for the Gigabit Ethernet. Do not count on Wi-Fi for decent results.
So if your drive comes with a USB-C connector, all you need is a USB 3.0 USB-A to USB-C cable. You can recognise it by the blue colour of the USB-A plug (and if you look closely you'll see there are 9 contacts in there instead of the 4 in USB-A 2.0). The drive actually probably comes with such a cable.
Note that in your question you mention USB docks "which limit the bandwidth". This really depends on exactly what kind of USB and interface.
You can use a USB-c to USB A 2.0 converter like this and connect it to the Raspberry PI 4 with 4 GB RAM.
If you can spend more money then you can go with HiKey 960 Which has "USB – 2x USB 3.0 type A host ports, 1x USB 2.0 type C OTG port" and it's quite powerful.
-
1It would seem to be a much better idea to use a USB 3 cable (with a blue plug).– jcaronMar 13, 2020 at 13:18