Live data from Hacker News

I'm booting my Raspberry Pi 4 from a USB SSD

jeffgeerling.com

11–20 of 33 posts

Re: I'm booting my Raspberry Pi 4 from a USB SSD

#11

Does anyone know if its theoretically possible to run a cluster of Pi's off of the same external ssd at the same time? I'd like for say 4 Pi's to get a speed boost of not running off microSD, but I also don't want to shell out for 4 separate hard drives. 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 c…

Networked storage but that won't be as fast as native drives.

I tend to disagree. It will depend on the network and the storage but it is not uncommon for network storage to actually be faster than local flash card.

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.

Re: I'm booting my Raspberry Pi 4 from a USB SSD

#13

Awesome! Do you think this is feasible also for Raspberry Pi 3B?

Yes. The Pi3 could always boot from USB once you enable[1] it. The difference with the Pi4 is that it's initial boot eeprom is now updatable. The first release didn't include the option for USB booting. It has just recently been added [2].

[1] https://www.raspberrypi.org/documentation/hardware/raspberry...

[2] https://github.com/raspberrypi/rpi-eeprom/blob/master/firmwa...

Re: I'm booting my Raspberry Pi 4 from a USB SSD

#15

Excellent. The biggest obstacle ive had to using Pis for practical things is that the memory cards eventually go bad. Looking forward to seeing this in the main release.

Eventually sounds like far far away In reality, they really have short lifespan, are slow, and halt the system

Therefore I wouldn’t recommend the rpi anymore.

Re: I'm booting my Raspberry Pi 4 from a USB SSD

#16

Awesome! Do you think this is feasible also for Raspberry Pi 3B?

Yes. The Pi3 could always boot from USB once you enable[1] it. The difference with the Pi4 is that it's initial boot eeprom is now updatable. The first release didn't include the option for USB booting. It has just recently been added [2]. [1] https://www.raspberrypi.org/documentation/hardware/raspberry... [2] https://github.com/raspberrypi/rpi-eeprom/blob/master/firmwa...

The other major difference is the Pi 4 has USB 3.0 and the network interface is not on the same bus. So, while the 3/3+ also benefit from USB boot, the 4 can benefit quite a bit further!

Re: I'm booting my Raspberry Pi 4 from a USB SSD

#18

Does anyone know if its theoretically possible to run a cluster of Pi's off of the same external ssd at the same time? I'd like for say 4 Pi's to get a speed boost of not running off microSD, but I also don't want to shell out for 4 separate hard drives. 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 c…

I'm not aware of any solution that exists to connect a single USB device to multiple hosts simultaneously.

Re: I'm booting my Raspberry Pi 4 from a USB SSD

#19
post #10
post #8

Earlier quoted context omitted.

Putting /var/log/ somewhere else mitigates this.

Couple more things to remember: - 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

Something I never understand:

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.

Re: I'm booting my Raspberry Pi 4 from a USB SSD

#20
post #19
post #10

Earlier quoted context omitted.

Couple more things to remember: - 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

Something I never understand: 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.

What is right for Raspberry Pi might not be right for a desktop might not be right for a server.

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.

Post reply on HN