logoalt Hacker News

inigyouyesterday at 12:04 PM14 repliesview on HN

Raspberry Pis are notorious for SD card corruption with unknown causes. In this era you might replace it with a mini-PC (NUC style).


Replies

exadecitoday at 12:58 PM

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

danparsonsonyesterday at 12:17 PM

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.

show 1 reply
1vuio0pswjnm7yesterday at 5:38 PM

"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

show 4 replies
billforyesterday at 2:31 PM

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.

show 1 reply
BobbyTables2yesterday at 2:38 PM

I suspect it isn’t the hardware but the bullheaded approach of running a desktop Linux environment from an SD card.

show 1 reply
marysol5today at 10:21 AM

More just that lots of standard images don't bother with tmpfs for logging. So all that IO onto the disk kills them

traceroute66yesterday at 6:15 PM

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

show 1 reply
Havocyesterday at 11:52 PM

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

show 1 reply
baqyesterday at 7:09 PM

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

show 1 reply
plasticchrisyesterday at 1:41 PM

Make the sdcard a read only root fs, problem solved

show 2 replies
nubinetworkyesterday at 12:14 PM

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.

show 1 reply
celsoazevedoyesterday at 5:19 PM

My issues with Pis and SD cards ended when I switched to using SSDs as boot drive.

show 1 reply
andrubyyesterday at 7:10 PM

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

rustyhancockyesterday at 2:33 PM

Just have the raspberry pi boot from a USB/SSD.

Rpi5 has a pcie slot if you want a cleaner setup.

show 1 reply