Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


SD Card corruption?
#1
Just had my first SD card corruption on my pi 3B+ which was running moode 24/7. Anyone else experience this?  Does moode make an effort to not write lots of data to the disk?

I found some blog posts about how to minimize SD card corruption on pi's. Does anyone know if these practices are in place for moode? Is moode (and dependant applications) logging files to the sd card by default?
https://lassesunix.wordpress.com/2015/07...pberry-pi/
Reply
#2
Maybe its just a defective card?

Nothing special is done in moOde for minimizing writes to boot media. Linux and many of the applications maintain disk logs of their activity. Having the logs persist after a reboot is sometimes crucial for troubleshooting. moOde does run a maintenance job every 6 hours (default) that purges a lengthly list of logs in /var/log to keep them from eating too much disk space.

Maybe I'm very lucky but over the past 5 years I've only had 3 cards go bad (and I don't know why) and most of my systems run 7/24 and experience heavy writes due to being reloaded constantly during development. The cards I use are SanDisk Ultra Class 10 consumer-grade cards. And yes I occasionally just pull the plug on some of my systems and of course there are the occasional power outages :-0

There are other SDCard memory options that provide higher levels of reliability for example eMMC or SLC NAND but they are more costly, especially SLC. I'd probably use one of these alternatives if I were experiencing issues and they were cost competitive with common MLC NAND based SDCards like the SanDisk consumer lineup.

https://allo.com/sparky/emmc.html
https://www.mouser.com/Embedded-Solution...55Z1yxxwsy

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Thanks for the information Tim!
Reply
#4
(04-25-2019, 09:58 PM)christopherr Wrote: Thanks for the information Tim!

Moode is pretty quiet by itself but the underlying system can spam the log files. There’s a setting called loglevel or something that you can set in one of the /boot files that limits the level of event that gets logged.
Reply
#5
You can also use log2ram, it put /var/log on ramdisk, so no writes on sdcard. Only if you don't care about logs.
Reply
#6
(04-26-2019, 07:41 AM)TookaFace Wrote: You can also use log2ram, it put /var/log on ramdisk, so no writes on sdcard. Only if you don't care about logs.

Thanks !
----------
bob
Reply
#7
Anyone is using log2ram to minimise read/write on the SDcard with MoOde 7.0.1 currently?

Greg
Reply
#8
ext4 journaling does some writing. Iotop shows continuous activity by jbd2, it is like 10-20kB written every 5 seconds.

Anyway, you can run Moode with overlayfs. The downside is, that all history and configuration changes are forgotten at restart.
Reply
#9
(03-12-2021, 02:34 PM)popej Wrote: ext4 journaling does some writing. Iotop shows continuous activity by jbd2, it is like 10-20kB written every 5 seconds.

Anyway, you can run Moode with overlayfs. The downside is, that all history and configuration changes are forgotten at restart.


That 5s write cycle is controlled by an ext4 mount option. From the man page

Quote:      commit=nrsec
              Start a journal commit every nrsec seconds.  The default
              value is 5 seconds.  Zero means default.

As shipped, moOde does not define a value for this option, so it defaults to 5s, but certainly one could experiment with setting it explicitly to, say, 30s, as a way of greatly reducing the number of cycles without totally giving up on the concept.

I wouldn't bother but to each his or her own.

Regards,
Kent
Reply
#10
Thanks for the info. I think this cycle can be much longer for system like Moode, where disk IO traffic is low and saved data is not that important.
Reply


Forum Jump: