I'm booting my Raspberry Pi 4 from a USB SSD
jeffgeerling.com
jeffgeerling.com
- don't use swap
- make sure you have noatime on all your filesystems
- identify other folders with frequently changing data (/tmp, $HOME/tmp, etc.) and also make sure you keep them in memory
- you can use NFS for many of these things if that is possible
Why is this not the default?
So many people struggle with the same stuff over and over again, yet, there's no mechanism in Linux distros to package default settings for a use case.
Typically things are geared for desktop users who have not much idea what they are doing and everybody else is expected to understand and configure to their needs.
Nowadays distributions started preparing separate profiles (workstation, desktop, embedded, etc.) that save a little bit of work.
noatime is a default for most distributions but a person that does install on Raspberry Pi might be configuring filesystem manually and not be aware to put it there.
Swap is very tempting to have on the Pi but is going to kill the card in a hurry.
What they ought to do is put an easy way to set that in `raspi-config`
Therefore I wouldn’t recommend the rpi anymore.
Even if it does wear out, storing all the data on NFS (or a usb drive) makes it a lot less worrying.
Ideally the next Pi gets some interface that allows more integrated storage, like eMMC or NVMe, but even with USB the speed and durability justifies annoying cabling situations.
After swapping out the SD card with a new one, it appears to be fixed. This was hard to diagnose as there was nothing in system logs / error messages about what might have went wrong.
I've looked in the past and have only found links to partitioning the drive so that it could be used when moving from one pi to another. But nothing about using it concurrently.
I'm not even sure what this would look like physically. Like if a hub exists that could pass traffic to a single drive connected on the other side. Or how the drive would internally separate the writes. But im curious if something like this has been done before. Or why it couldn't be done
At home I have couple of older laptops my kids use for various things. I have installed linux on them and configured to boot over wifi and it actually sped up these machines significantly. I would not advise for everybody to do this, though. The setup is complex (there is no built in support in any distro and you are pretty much on your own) and you need excellent wifi coverage (I have no less than 5 5GHz access points to cover the area densely).
One thing flash card will be difficult to beat is random small accesses if the only thing you care about is latency and not throughput.
[1] https://www.raspberrypi.org/documentation/hardware/raspberry...
[2] https://github.com/raspberrypi/rpi-eeprom/blob/master/firmwa...