Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've personally had so many issues with SD card corruption on raspberry pi's that I've decided it was a mistake to even allow SD card disks

I only ever use USB storage on my pi's now and not had a single issue since



Most SD cards for sale are not suitable for write-intensive random-access workloads. However, they do make SD cards that are intended for this, I've had very good luck with cards marked "high-endurance." They cost more, but they work.

I've always been amazed that the Foundation never mandated the use of validated brands or types of SD cards.

Not that it matters much to me, I've had to retire all of my Pis earlier than the 4. It seems that all of my Raspberry Pis prior to the 4 all had some sort of design issue with their power regulation. After a couple years of constant operation, they just start locking up randomly around once every day or so. I've had everything from a Pi 1 through 3 exhibit this behavior. I spent WEEKS troubleshooting this and conclusively ruled out wonky SD cards, power supplies, connected devices, proximity to other equipment, and every other factor I can think of. I found many threads with other people reporting the same issues but the Foundation refuses to acknowledge it as a problem. I only run Pi 4's now, and am gradually switching over to Intel N100-based systems for low-power operation.


My money is on the use of a single USB 2 port for power for both of these issues :

https://news.ycombinator.com/item?id=40024355


Same with "real" servers. For a while there, it was trendy to boot ESXi from an SD card stuck to the system board and use all of the 2.5" disks for just data storage, no OS. It worked great... until it didn't. It turns out that writing logs and swap to an SD card roasts it after 2-4 years pretty consistently.


I wouldn't rule out running the OS off of that kind of storage if you had a read only root file system, but what madness would inspire you to write logs to it? And swap!?


The smart ESXi admins I knew used Compact Flash cards as the system boot disk. (It has been too long since I've been in touch with those guys to remember if they offloaded logs to local disks (or maybe a datastore on a SAN) or if they also wrote them to the CF device. I bet they did the former, but I no longer clearly remember.)

Using an SD card is just nuts.


Indeed, except if you run an in-memory overlay filesystem this might change dramatically for you. I have several Pi's that run for years and years without SD card corruption this way. Normally, however, as in my sbts-aru project, I don't just do that but also create separate data partitions that are read-write. It appears that even though there are some partitions on the card that are read-write, if they are not the system one it is also much more resilient to fatal corruption.


I heard that this is caused by not supplying enough power to the Pi, did you use the official powerbrick? I have had corruptions happen a couple of times but I have never tried with a good powersource if it actually does a difference.


SD cards are not made to run an OS from. They are quite limited in read/write cycles .


Using SD cards for an OS is a really bad idea in general. You may make it work with a read only filesystem, but if you don't sooner or later you will have issues.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: