Raspberry Pis are notorious for SD card corruption with unknown causes. In this era you might replace it with a mini-PC (NUC style).
Flash memory generally doesn't have great lifespan for repeated writes; using it as a root device is going to kill it pretty quickly. I had a similar problem once running a NAS off a USB stick; within a year of so the stick would no longer accept new data and I swapped it out for an SSD instead.
"Raspberry Pis are notorious for SD card corruption with unknown causes."
This is not specific to RPis. When an SD card is subjected to "unpredictable" writes it creates potential risk of corruption. The writes are triggered by software, not the RPi hardware
There is no rule that says the RPi user must mount the root filesystem r/w on the card. It can be mounted r/w on mfs or tmpfs, for example, and the card can be removed after boot. Been doing this since 2012
Zero writes to the card, no corruption
It's true these corruption issues are "notorious" but that's due to RPi owner behaviour, not the RPI hardware
I have a rasperry pi 2 and 4 that have been running on the same size uSD (reputable brand) for 5 years and haven’t had any issues. I have swap turned off. You just have to be aware of the i/o and not do anything stupid. Clearly for heavy i/o with multitasking they are not ideal.
You can buy cards that support SMART if you want to track wear, but they are expensive.
I suspect it isn’t the hardware but the bullheaded approach of running a desktop Linux environment from an SD card.
More just that lots of standard images don't bother with tmpfs for logging. So all that IO onto the disk kills them
> Raspberry Pis are notorious for SD card corruption
True SD cards are less than ideal.
But also I suspect half the problem specifically with Pi and SD cards is that people use cheap-ass SD cards and maybe ones they found in the bottom of a drawer that may or may not have previously been used in another device (e.g. camera).
I suspect if people bought industrial SD cards instead of consumer-grade junk they might get a better lifespan out of them.
Alternatively cheapest fix is an m10 optane and nvme enclosure. You maybe need to enable usb quirks in the kernel depending on on enclosure. Costs about 20 bucks all in
That’ll keep the rasp online for essentially forever cause optane isn’t going to wear out
I’ve got an rpi4 booting from an usb ssd and bought a n100 minipc anyway… last February for $150. Should have bought a 40ft container of these
Make the sdcard a read only root fs, problem solved
Can confirm, I've got a pi 5 here that's been running 24/7 for over a year (possibly two)... it boots fine, but anything else makes it run so slowly because the sdcard is trashed.
The current setup writes to the systemd journal at least twice every minute... It's next iteration is getting a proper nvme.
My issues with Pis and SD cards ended when I switched to using SSDs as boot drive.
I'm super happy with an Odroid H3 as a NAS: low power usage, silent, x86, nvme + 2 sata ports. Runs home assistant, smb shares and a few more things
Just have the raspberry pi boot from a USB/SSD.
Rpi5 has a pcie slot if you want a cleaner setup.
You can flash them to boot on an USB drive so any ssd, I have a RPI4 that had the sdcard slot ripped, flashed an sd card to instruct it to boot on usb, held it against the pins and now it boots without any sdcard.
Though I'd agree that if you got none the NUC is the better solution as if you add an ssd and power supply to the PI it becomes as if not more expensive for less power