Hacker News new | ask | show | jobs
by michaelt 2101 days ago
1. A modern filesystem will stop the filesystem getting corrupted by power loss - but a file that was mid-write, or an install process that had copied half the files it needed to, will still leave that thing incomplete.

2. SD cards can wear out (i.e. too many write-erase cycles) regardless of the filesystem.

3. SD cards have controllers running firmware, doing things like write levelling and bad block remapping. Some cards have bugs, and if the card is lying to the OS about a write completing, or if the remapping table is less resilient than the filesystem's journaling, you get problems even if the OS and everything on it is perfect.

4. Problems like pins with poor connections and power supplies not providing enough current are exacerbated, as microsds have no space for power capacitors and few SD card holders are rated for hundreds of insertion cycles.

5. SD cards start out a lot cheaper than SSDs (easier to find a sub-$10 SD card than a sub-$50 SSD) and the market is awash in fakes

All these problems look very similar - "My RPi stopped booting, I replaced the SD card with a freshly written one and it started booting again" - making forum anecdotes and user bug reports hard to rely on.

2 comments

Lots of points you make are true. Yes, if you yank the plug without saving you lose your work. Or Exim will have to flush the queue again. Or vim will have a dangling swapfile that it will ask you about next time. Or you’ll have to start over on your game of solitaire.

And yes, SD cards have flaws.

My question was: if I turn my computer off every day by yanking the power cord, I expect nothing to break, so what am I missing when people seem so wary of doing it?

(Recall that this was all in the context of a parent comment lamenting a lack of a dedicated shutdown button on the RPi.)

I just spent $10k on 4 Siemens 32Gig industrial SD cards for S7-1500 PLC's, in safety service.

Gauranteed 500,000 writes, probably much more, but they have "mission life" quoted at ten years on the vendor cert, so will be ditched after ten years and replaced.

Apparently they are a whole different type of logic design, hence the cost. Even the no-name or branded equivelent I could find were close to $1k each, but given use in safety service we went legit all the way anyway.

Anything with the magic S word stamped on it seems to double in price...