{"id":1173,"date":"2016-12-31T16:44:27","date_gmt":"2016-12-31T21:44:27","guid":{"rendered":"http:\/\/zitstif.no-ip.org\/?p=1173"},"modified":"2017-04-14T15:49:34","modified_gmt":"2017-04-14T20:49:34","slug":"io-error-text-message-notification","status":"publish","type":"post","link":"http:\/\/zitstif.no-ip.org\/?p=1173","title":{"rendered":"I\/O error text message notification"},"content":{"rendered":"<p>Recently a good friend be-gifted me <a title=\"https:\/\/en.wikipedia.org\/wiki\/Banana_Pi#Banana_Pi_M3\" href=\"https:\/\/en.wikipedia.org\/wiki\/Banana_Pi#Banana_Pi_M3\" target=\"_blank\">Banana PI M3<\/a> for my birthday. I decided to turn it into a NAS. Granted it is no <a title=\"https:\/\/en.wikipedia.org\/wiki\/Synology_Inc.\" href=\"https:\/\/en.wikipedia.org\/wiki\/Synology_Inc.\" target=\"_blank\">Synology NAS <\/a>but it gets the job done and <a title=\"http:\/\/wiki.openmediavault.org\/index.php?title=Main_Page\" href=\"http:\/\/wiki.openmediavault.org\/index.php?title=Main_Page\" target=\"_blank\">openmediavault <\/a>is a wonderful software suite to use on it. I thought to myself, &#8220;It would be nice to get a notification if there are any I\/O errors via dmesg on my homemade NAS. So I whipped up a simple solution:<\/p>\n<p>vim \/bin\/ioerrorcontact<\/p>\n<p>#!\/bin\/bash<\/p>\n<p>if dmesg | fgrep &#8216;I\/O error&#8217; &amp;&gt; \/dev\/null;<br \/>\nthen<br \/>\ncurl http:\/\/textbelt.com\/text -d number=MyPhoneNumber -d message=&#8221;I\/O Error on your NAS&#8221; &amp;&gt; \/dev\/null;<br \/>\nfi<\/p>\n<p>crontab -e<\/p>\n<p>0 * * * *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 bash \/bin\/ioerrorcontact<\/p>\n<p>This is just a quick and simple hack but it&#8217;s peace of mind knowing that I have something in place to notify me if my simple NAS is having any issues, especially since I do not have RAID 1 configured on it. RAID 1 via BananaPi or really any other Pi devices at this point isn&#8217;t really that great because you would have the split one SATA channel\/bandwidth to be able to get it to work. I also strongly recommend that if you&#8217;re going to build a low powered NAS device using a Pi device, to use the BananaPi because it has gigabit Ethernet. Other than that, if you have the money to shell out and want a better solution, I recommend Synology NAS products.<\/p>\n<p>#Update 4\/14\/2017<\/p>\n<p>Textbelt.com now requires a key parameter and is no longer &#8216;free&#8217;:<\/p>\n<blockquote class=\"imgur-embed-pub\" lang=\"en\" data-id=\"a\/GLQzF\"><p><a href=\"\/\/imgur.com\/GLQzF\"><\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/s.imgur.com\/min\/embed.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently a good friend be-gifted me Banana PI M3 for my birthday. I decided to turn it into a NAS. Granted it is no Synology NAS but it gets the job done and openmediavault is a wonderful software suite to use on it. I thought to myself, &#8220;It would be nice to get a notification &hellip; <a href=\"http:\/\/zitstif.no-ip.org\/?p=1173\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">I\/O error text message notification<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,3],"tags":[830,829,835,832,831,834,836,833],"class_list":["post-1173","post","type-post","status-publish","format-standard","hentry","category-code","category-posts","tag-bananapi","tag-bananapim3","tag-dmesg","tag-openmediavault","tag-simplenas","tag-sms-from-command-line","tag-synology-nas","tag-textbelt-com"],"_links":{"self":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/1173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1173"}],"version-history":[{"count":7,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/1173\/revisions"}],"predecessor-version":[{"id":1179,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/1173\/revisions\/1179"}],"wp:attachment":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1173"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}