{"id":515,"date":"2017-10-24T08:52:20","date_gmt":"2017-10-24T13:52:20","guid":{"rendered":"http:\/\/www.k2dls.net\/blog\/?p=515"},"modified":"2017-10-24T09:16:04","modified_gmt":"2017-10-24T14:16:04","slug":"reducing-sd-card-writes-with-raspbian","status":"publish","type":"post","link":"https:\/\/www.k2ie.net\/blog\/2017\/10\/24\/reducing-sd-card-writes-with-raspbian\/","title":{"rendered":"Reducing SD Card Writes With Raspbian"},"content":{"rendered":"<p>A common concern of those running applications on a Raspberry Pi is SD Card exhaustion.\u00a0 It seems that after some amount of write activity, some SD cards fail to record further data.\u00a0 I first noticed this on an APRS system when system updates disappeared upon reboot.<\/p>\n<p>The systemd journal is a useful tool that has largely replaced the syslog in modern Linux systems.\u00a0 It can also be redirected from the SD card to volatile memory.\u00a0 Note that by changing this you will reduce the number of SD card writes but your journal will not survive reboots.<\/p>\n<p>The key to changing the storage location of the journal is found in \/etc\/systemd\/journald.conf.\u00a0 Look for this line:<\/p>\n<p><code>[Journal]<br \/>\n#Storage=auto<\/code><\/p>\n<p>Uncomment the line by removing the #.\u00a0 Change auto to volatile:<\/p>\n<p><code>[Journal]<br \/>\nStorage=volatile<\/code><\/p>\n<p>Restart the systemd journal and your journal data will be written to \/run\/log, which is memory resident.<\/p>\n<p><code>sudo systemctl restart systemd-journald.service<\/code><\/p>\n<p>Only use good quality SD cards such, such as the SanDisk Ultra Class 10 memory cards.\u00a0 <a href=\"https:\/\/www.amazon.com\/gp\/product\/B01ATK1TFA\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B01ATK1TFA&amp;linkCode=as2&amp;tag=k0a5c-20&amp;linkId=e7d9dd091a50e109fb068e195f6324c4\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;MarketPlace=US&amp;ASIN=B01ATK1TFA&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL250_&amp;tag=k0a5c-20\" border=\"0\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border: none !important; margin: 0px !important;\" src=\"\/\/ir-na.amazon-adsystem.com\/e\/ir?t=k0a5c-20&amp;l=am2&amp;o=1&amp;a=B01ATK1TFA\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" \/>I recently had one that failed but was pleased when the <a href=\"https:\/\/kb.sandisk.com\/app\/answers\/detail\/a_id\/5232\/\">SanDisk warranty program<\/a> replaced the card at no charge.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A common concern of those running applications on a Raspberry Pi is SD Card exhaustion.\u00a0 It seems that after some amount of write activity, some SD cards fail to record further data.\u00a0 I first noticed this on an APRS system when system updates disappeared upon reboot. The systemd journal is a useful tool that has &hellip; <a href=\"https:\/\/www.k2ie.net\/blog\/2017\/10\/24\/reducing-sd-card-writes-with-raspbian\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Reducing SD Card Writes With Raspbian&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[74,72,18,12,71,70,73],"class_list":["post-515","post","type-post","status-publish","format-standard","hentry","category-technology","tag-journal","tag-linux","tag-raspberry-pi","tag-raspbian","tag-sandisk","tag-sd-card","tag-systemd"],"_links":{"self":[{"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/posts\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/comments?post=515"}],"version-history":[{"count":2,"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":518,"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/posts\/515\/revisions\/518"}],"wp:attachment":[{"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/media?parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/categories?post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.k2ie.net\/blog\/wp-json\/wp\/v2\/tags?post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}