5 ms·
fast 4K random writes are nice, but you know what is nicer? Filesystem designed for flash and OS tuned to NOT write randomly all the time. Pees routinely corrup
by rasz_pl 11y ago
fast 4K random writes are nice, but you know what is nicer? Filesystem designed for flash and OS tuned to NOT write randomly all the time. Pees routinely corrupts root partitions and stop booting because system images are not tuned for SD card usage, and EXT4 is terrible at being on flash.
- dspillett 11y ago> Pees routinely corrupts root partitions and stop booting because system images are not tuned for SD card usage My two Pis (currently both just running as Kodi boxes, but I've played with other things on them too) had a habit of killing SD cards, both cheaper ones which might well just be the cheapness of the cards and the better ones recommended by various people. I've taken to running them off NFS: the only thing that stays on the SD card is a boot partition and boot sector. For sequential reads this is definitely slower but they don't happen much (aside from the video playing, but that is limited by desired playback speed not IO bandwidth an happens over the network to my media array anyway), for sequential write it should be too unless using a crap card, but when-ever I've noticed a difference in responsiveness the NFS option has been faster. I find it takes longer for them to boot, but once running everything is either the same or feels just a little nippier. This is not an option for disconnected (or unreliably connected) units of course, and might be a chunk more faf to manage via wireless, but I recommend it for units that always have a wired connection to the local LAN where said LAN has an always-on machine capable of serving via NFS.
- sangnoir 11y agoCheck the amperage of your power-supply. I had the same problem when I had a questionable power supply that was providing insufficient juice. I must have gone through 4 SD cards - the problem went away when I switched to a 2-amp transformer/adaptor. Another thing you might want to check is how well ventilated your Pi is, high temperatures might also toast cards.
- geerlingguy 11y agoThis. Almost every time I've had any corruption problems, it was preceded by the little under-voltage rainbow icon appearing. Also, if you have things plugged into USB, consider setting the usb_max_current setting to 1 in /boot/config.txt
- Albright 11y agoWhat is the "under-voltage rainbow icon?" Is that on the Pi itself, or in some program?
- cnvogel 11y agohttp://i.imgur.com/673Qw1i.jpg http://i.imgur.com/673Qw1i.jpg As far as I know there's a task running on the "GPU" (where quite a few things are assisting the ARM CPU showing the screen, playing audio, actually bootstrapping the ARM, ...) that provides this icon as a feedback to the user.
- Albright 11y agoAh, hmm. So I guess you don't see it if you're using it headlessly… that's mostly how I've tinkered with my Pi.
- dspillett 11y agoThanks for the hints. I did have trouble running a USB drive that worked everywhere else off them, so perhaps power is the problem and that not working was due to it being more hungry and other drives and the Pis not having enough amps spare to hand over. This wasn't filesystem corruption though: the SD cards never worked properly again so there was presumably some physical issue rather than just damaged data. I can't say I've noticed any part of them being at all warm either in general running or after a card had died so if it is heat related the heat was temporary (and they aren't where things like direct sunlight or near-by household heating could be a variable). I'll check the power supply at some point, but for now they've both been running smoothly 24/7 for months so I'm happy with the NFS solution for the time being.
- geerlingguy 11y agoOne pro tip: if you're running a web server like Nginx or Apache, make sure you either disable all logging, or set logging to use a larger write cache so it will bundle up writes into larger (e.g. 32KB) chunks instead of flushing every line to disk immediately.