meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
raspberry [2016/04/19 21:13] – niziak | home_automation:raspberry:card_wear [2018/09/10 14:36] (current) – niziak | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Reduce SD Card wearing ====== | ====== Reduce SD Card wearing ====== | ||
- | ===== noop elevator ===== | + | [[https:// |
+ | [[https:// | ||
- | ===== Headline | + | ===== Check who is writing |
- | [[https:// | + | Start logging disc access and kernel |
- | [[https:// | + | < |
- | + | sysctl vm.block_dump=1 | |
- | + | dmesg -e -T -w | |
- | < | + | </ |
- | Remove syslog | + | Stop logging: |
- | < | + | < |
- | + | sysctl vm.block_dump=0 | |
- | Use syslog from busybox package with circular log buffer in RAM: | + | |
- | < | + | |
- | apt-get install busybox-syslogd | + | |
</ | </ | ||
- | Use journald and configure it to use RAM | + | |
- | <file | /etc/systemd/ | + | ===== Set noop elevator ===== |
- | Storage=volatile | + | <file | /etc/rc.local> |
- | Compress=yes | + | ... |
+ | echo noop > / | ||
+ | exit 0 | ||
</ | </ | ||
+ | ===== Use tmpfs ===== | ||
<file | / | <file | / | ||
- | tmpfs | + | tmpfs |
+ | tmpfs / | ||
+ | tmpfs / | ||
</ | </ | ||
- | Move some volatile dirs to tmp folder | + | Move some volatile dirs to tmp folder: |
<code bash> | <code bash> | ||
rm -rf /var/run /var/lock | rm -rf /var/run /var/lock | ||
Line 40: | Line 43: | ||
</ | </ | ||
- | ==== Run fstrim weekly ==== | + | |
+ | ===== Disable logging to disc ===== | ||
+ | |||
+ | <code bash> | ||
+ | systemctl stop mosquitto | ||
+ | systemctl disable mosquitto | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | Remove syslog | ||
+ | < | ||
+ | |||
+ | Use syslog from busybox package with circular log buffer in RAM: | ||
+ | < | ||
+ | apt-get install busybox-syslogd | ||
+ | </ | ||
+ | |||
+ | <file / | ||
+ | SYSLOG_OPTS=" | ||
+ | KLOG_OPTS="" | ||
+ | </ | ||
+ | |||
+ | Use journald and configure it to use RAM: | ||
+ | <file | / | ||
+ | Storage=volatile | ||
+ | Compress=yes | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Run fstrim weekly | ||
Check TRIM support | Check TRIM support | ||
- | <codE>sudo hdparm -I /dev/sda | grep "TRIM supported"</ | + | <code>sudo hdparm -I /dev/sda | grep "TRIM supported"</ |
<file | / | <file | / | ||
Line 71: | Line 104: | ||
</ | </ | ||
- | ==== Broken SD Card ==== | + | ===== Broken SD Card ===== |
Bad magic number in super-block | Bad magic number in super-block | ||