
I'm booting my Raspberry Pi 4 from a USB SSD - geerlingguy
https://www.jeffgeerling.com/blog/2020/im-booting-my-raspberry-pi-4-usb-ssd
======
yummypaint
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.

~~~
jbverschoor
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.

~~~
schwartzworld
the lifespan is mostly due to writes, right? so couldn't you just boot from an
SD card but save your actual data on an external drive?

~~~
johntash
Yes, I have several pis that boot from an sd card and then all of the file
systems get mounted over NFS. The sd card only needs to be read from once
every few weeks/months when it boots.

Even if it does wear out, storing all the data on NFS (or a usb drive) makes
it a lot less worrying.

------
ajflores1604
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 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

~~~
schlopper
PXE Boot w/ NFS root - you won't get the bandwidth (about 112MB/s over gigabit
Ethernet), but you'll definitely see the response time improvements (IOPS +
latency).

~~~
geerlingguy
This. I intend to do some more testing with my current cluster to see how much
improvement I can get with one Pi 4 serving the traffic (vs each Pi running
from its microSD card). And ideally seeing if a faster machine with faster
storage could do even better.

~~~
ajflores1604
If you end up doing this you should definitely make a post about it. I'm sure
I'm not the only one incredibly curious on the real world performance and
tradeoffs

------
peter_d_sherman
>"The results really speak for themselves. For sequential operations, using a
USB SSD is 3-4x faster than using a microSD card. And for random access,
random reads are a bit faster, but writes are about 6x faster!"

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

~~~
dividuum
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...](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md)

[2] [https://github.com/raspberrypi/rpi-
eeprom/blob/master/firmwa...](https://github.com/raspberrypi/rpi-
eeprom/blob/master/firmware/release-notes.md#2020-05-15-add-
pieeprom-2020-05-15-beta-with-usb-boot)

~~~
geerlingguy
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!

------
kingosticks
Really great article and very helpful, but where does the 8x faster for writes
come from? I make it 6.2x.

~~~
geerlingguy
Oops! My math must've been a bit broken. I'll update that part.

~~~
kingosticks
Thanks! I tried to leave a comment on the article itself but it said I was
blacklisted (first time visitor so I think something might be going wrong
there).

~~~
geerlingguy
D'oh; I'm still trying to get my spam settings fixed on the site, after a
major upgrade a couple weeks ago. Sorry about that.

