4 ms·
There are SD cards rated for "high endurance" for example https://www.amazon.com/gp/aw/d/B07B984HJ5 https://www.amazon.com/gp/aw/d/B07B984HJ5 is designed for co
by mrb 7y ago
There are SD cards rated for "high endurance" for example https://www.amazon.com/gp/aw/d/B07B984HJ5 https://www.amazon.com/gp/aw/d/B07B984HJ5 is designed for continuous 24/7 writes such as surveillance cameras. These should have great longevity when used in a RPi.
What I would really like to see is RPi configurations optimized to reduce writes. For example mount the whole SD card read-only, mount a few essential filesystems as ramfs (/var, /tmp, /run), and have, say only one partition like /srv mounted read-write (+ noatime). If you run a webserver, and serve files off /srv you can still update them whenever with no hassle, but when the webserver is otherwise just serving the files, there should be zero writes.
- elcritch 7y agoThat's essentially what the Nerves Project does [1]. You can boot Phoenix webserver serving static files with zero writes. The root filesystem and server code is written to one of two read-only partitions updated using an A/B scheme. Then a separate ext4 partition is RW and mounted to `/root` by default. The trick is dealing with stateful apps (e.g. sensors) that write continuously. Power outages are painful on SD cards. Lately I've moved to a separate USB drive for writing bulk sensor data with Pi's. Then the application data partition on the SD card can be used for backup sensor readings -- probably summarized data written rarely to reduce chance of SD card corruption. Mostly when I've had SD card issues its with just the RW partition, specifically the database I'm using gets checksum errors. Never had one not boot due to a bad SD. Though I'm contemplating trying out BTRFS mirror'ing on a single USB drive, though bcachefs looks promising once mainlined. It's cheaper to buy two 32GB USB Thumbdrives (mirrored) or even a full usb based ssd than buying an SD card with a large amount of SLC based storage. The new Pi's will be a significant upgrade in speed with external USB SSD/Thumbdrives. 1: https://github.com/nerves-project/nerves/blob/master/docs/Advanced%20Configuration.md#partitions https://github.com/nerves-project/nerves/blob/master/docs/Ad...