{"id":2984,"date":"2018-02-11T18:33:44","date_gmt":"2018-02-11T05:33:44","guid":{"rendered":"http:\/\/www.zoyinc.com\/?p=2984"},"modified":"2018-02-11T18:37:40","modified_gmt":"2018-02-11T05:37:40","slug":"hard-disk-smart-monitoring-and-alerts-in-omv","status":"publish","type":"post","link":"http:\/\/www.zoyinc.com\/?p=2984","title":{"rendered":"Hard disk SMART monitoring and alerts in OMV"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3019 size-medium\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring08-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring08-300x169.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring08-150x84.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring08-500x281.jpg 500w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring08.jpg 692w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>All modern hard drives come with SMART, <strong>S<\/strong>elf-<strong>M<\/strong>onitoring, <strong>A<\/strong>nalysis, and <strong>R<\/strong>eporting <strong>T<\/strong>echnology, which in essence allows you to monitor the status of your disks and if they have any errors. This will often alert you to dangerous situations where you have a disk that might be failing.<\/p>\n<p>SMART is not always going to save you but it&#8217;s probably the best and easiest thing you can keep an eye on. This post is about how to enable this and ensure that you get email alerts from Open Media Vault if there are SMART errors.<\/p>\n<h1>What to do<\/h1>\n<p>First ensure your OMV box is sending emails, this is configured under &#8220;System | Notification&#8221; and you can get more info from the posts <a  href=\"http:\/\/www.zoyinc.com\/?p=2461\">http:\/\/www.zoyinc.com\/?p=2461<\/a> and <a  href=\"http:\/\/www.zoyinc.com\/?p=2615\">DNS problems, email notifications not being sent<\/a> for more information. You should ensure you are getting some sort of regular email from OMV &#8211; its not going to be much use monitoring if you don&#8217;t get the alert.<\/p>\n<p>Go to &#8220;System | S.M.A.R.T.&#8221; and ensure you have selected the &#8220;Settings&#8221; tab.<\/p>\n<p>You need to select &#8220;Enable&#8221; and set some values for the temperature monitoring. For this I did a bit Googling and put some reasonable temperatures &#8211; don&#8217;t just copy mine \ud83d\ude42 :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2989\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring02.jpg\" alt=\"\" width=\"500\" height=\"432\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring02.jpg 500w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring02-150x130.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring02-300x259.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring02-347x300.jpg 347w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Now select the &#8220;Devices&#8221; tab and this will list the drives you have. Select a drive and click on &#8220;Edit&#8221; this will give you the dialog below, ensure you select &#8220;Activate S.M.A.R.T. monitoring.&#8221; and click on &#8220;Save&#8221;.<\/p>\n<p>Do this for all your disks, including SSDs and your system disk if it is separate like mine is:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2991\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring03.jpg\" alt=\"\" width=\"600\" height=\"298\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring03.jpg 600w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring03-150x75.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring03-300x149.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring03-500x248.jpg 500w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Next select the &#8220;Scheduled tests&#8221; tab and add a scheduled job for each disk, it should look something like below. Obviously ensure it is enabled, you have picked &#8220;Short self-test&#8221; and a time, in this case at 4am every day.<\/p>\n<p>Repeat this for all disks and when finished click on apply as normal.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2993 size-full\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring04.jpg\" alt=\"\" width=\"300\" height=\"272\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring04.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring04-150x136.jpg 150w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>I would suggest you also set up a regular long self-test, maybe on the 1st of the month:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3005\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring07.jpg\" alt=\"\" width=\"300\" height=\"272\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring07.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring07-150x136.jpg 150w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Having done this for each disk for each scheduled task, select the task and click on run and click on &#8220;Start&#8221; from the dialog as below. You don&#8217;t need to wait for the test to complete, just click on &#8220;Close&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2999\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring05b.jpg\" alt=\"\" width=\"400\" height=\"241\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring05b.jpg 400w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring05b-150x90.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring05b-300x181.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>After you have run the tests for all the disks go back to the &#8220;Devices&#8221; tab and select a disk and click on &#8220;Information&#8221; this will bring up a dialog with various bits of info including a &#8220;Slef-test logs&#8221; tab &#8211; select this. Hopefully you should see the tests completed ok. Below is an example where it didn&#8217;t work, unfortunately this is a failing drive for me that needs to be replaced:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2995\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring06.jpg\" alt=\"\" width=\"500\" height=\"289\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring06.jpg 500w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring06-150x87.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2018\/02\/SMARTMonitoring06-300x173.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<h1>Email alerts<\/h1>\n<p>If there are any errors you should receive an email like:<\/p>\n<p style=\"padding-left: 30px;\"><strong>SMART error (OfflineUncorrectableSector) detected on host: nas2 [nas2.mydomain]<\/strong><\/p>\n<p style=\"padding-left: 30px;\">This email was generated by the smartd daemon running on:<\/p>\n<p style=\"padding-left: 30px;\">\u00a0\u00a0 host name: nas2<br \/>\nDNS domain: mydomain<br \/>\nNIS domain: (none)<\/p>\n<p style=\"padding-left: 30px;\">The following warning\/error was logged by the smartd daemon:<\/p>\n<p style=\"padding-left: 30px;\">Device: \/dev\/disk\/by-id\/scsi-SATA_ST3000DM001-1ER_Z5001LCQ [SAT], 2552 Offline uncorrectable sectors<\/p>\n<p style=\"padding-left: 30px;\">For details see host&#8217;s SYSLOG.<\/p>\n<p style=\"padding-left: 60px;\">You can also use the smartctl utility for further investigation.<br \/>\nThe original email about this issue was sent at Sat Jan 27 17:46:54 2018 NZDT Another email message will be sent in 24 hours if the problem persists.<\/p>\n<p style=\"padding-left: 30px;\">\n","protected":false},"excerpt":{"rendered":"<p>All modern hard drives come with SMART, Self-Monitoring, Analysis, and Reporting Technology, which in essence allows you to monitor the status of your disks and if they have any errors. This will often alert you to dangerous situations where you have a disk that might be failing. SMART is not always going to save you [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3019,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[404,313],"tags":[412,410,100,407,406,7,405,330,319,320,409,413,411,408,414],"class_list":["post-2984","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hardware","category-open-media-vault","tag-computer","tag-configuration","tag-error","tag-failure","tag-hard-disk","tag-hdd","tag-monitoring","tag-nas","tag-omv","tag-open-media-vault","tag-s-m-a-r-t","tag-seagate","tag-settings","tag-smart","tag-western-digital"],"_links":{"self":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2984"}],"version-history":[{"count":8,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2984\/revisions"}],"predecessor-version":[{"id":3020,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2984\/revisions\/3020"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/media\/3019"}],"wp:attachment":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2984"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}