{"id":415,"date":"2014-07-01T22:44:56","date_gmt":"2014-07-01T20:44:56","guid":{"rendered":"https:\/\/www.dont-panic.cc\/capi\/?p=415"},"modified":"2019-07-13T23:11:57","modified_gmt":"2019-07-13T21:11:57","slug":"linux-western-digital-green-load-cycle-count","status":"publish","type":"post","link":"https:\/\/www.dont-panic.cc\/capi\/2014\/07\/01\/linux-western-digital-green-load-cycle-count\/","title":{"rendered":"Linux, Western Digital Green &#038; Load Cycle Count"},"content":{"rendered":"<p>Today when looking at my <a href=\"http:\/\/munin-monitoring.org\/\">Munin<\/a> graphs for <a href=\"http:\/\/en.wikipedia.org\/wiki\/S.M.A.R.T.\">S.M.A.R.T.<\/a> values of my always-on PVR box, I noticed that within a year, my Western Digital Green-line disks had degraded their Load_Cycle_Count attribute to a shocking low level of below 20 (in S.M.A.R.T., low levels are bad). The raw value indicated that the three of the four disks had parked their heads more than a half million times, each:<\/p>\n<blockquote><p><code>#$ for D in sda sdb sdc sdd; do sudo smartctl -A \/dev\/$D | grep \"^193\"; done<br \/>\n193 Load_Cycle_Count 0x0032 014 014 000 Old_age Always - 559966<br \/>\n193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 111<br \/>\n193 Load_Cycle_Count 0x0032 010 010 000 Old_age Always - 572713<br \/>\n193 Load_Cycle_Count 0x0032 013 013 000 Old_age Always - 563615<\/code><\/p><\/blockquote>\n<p>Munin&#8217;s year graph for one of the disks showed shocking truth, the disk was aging fast:<\/p>\n<p><a href=\"https:\/\/www.dont-panic.cc\/capi\/wp-content\/uploads\/2014\/07\/smart_sdd-year.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-417\" src=\"https:\/\/www.dont-panic.cc\/capi\/wp-content\/uploads\/2014\/07\/smart_sdd-year.png\" alt=\"\/dev\/sdd over the last year\" width=\"497\" height=\"484\" srcset=\"https:\/\/www.dont-panic.cc\/capi\/wp-content\/uploads\/2014\/07\/smart_sdd-year.png 497w, https:\/\/www.dont-panic.cc\/capi\/wp-content\/uploads\/2014\/07\/smart_sdd-year-300x292.png 300w\" sizes=\"auto, (max-width: 497px) 85vw, 497px\" \/><\/a><\/p>\n<p>When watching the above shell script with watch over time, I noticed, that some of the disks parked their heads about 2-3 times per minute. As the machine is always on, this sums up pretty quickly.<\/p>\n<p>Research soon got me to several blog posts and forum discussions of the issues. <a href=\"http:\/\/wdc.custhelp.com\/app\/answers\/detail\/a_id\/5357\">Western Digital itself recommends<\/a> using <code>hdparm<\/code> to disable advanced power management of the disk. This seems to be unsupported, by my drives, though.<br \/>\nAnother way provided by WD, which has been often recommended, was downloading a DOS tool from Western Digital to set the idle timer of the disks. Not really the way I wanted to go.<\/p>\n<p>Fortunately, I also found <a href=\"http:\/\/www.sgvulcan.com\/load-cycle-count-of-western-digital-green-drives-and-how-to-fix-it-from-linux\/\">a blog entry<\/a> that directed me to the <a href=\"http:\/\/idle3-tools.sourceforge.net\/\">idle3<\/a> project, that provides a way to set it from Linux.<\/p>\n<p>The tool was very easy to compile (just one call to <code>make<\/code>), and then provided me with the current settings:<\/p>\n<blockquote><p><code>#$ for D in sda sdb sdc sdd; do sudo .\/idle3ctl -g \/dev\/$D; done<br \/>\nIdle3 timer set to 80 (0x50)<br \/>\nIdle3 timer set to 80 (0x50)<br \/>\nIdle3 timer set to 80 (0x50)<br \/>\nIdle3 timer set to 80 (0x50)<\/code><\/p><\/blockquote>\n<p>Disabling the timer was easy enough for all four drives:<\/p>\n<blockquote><p><code>#$ for D in sda sdb sdc sdd; do sudo .\/idle3ctl -d \/dev\/$D; done<br \/>\nIdle3 timer disabled<br \/>\nPlease power cycle your drive off and on for the new setting to be taken into account. A reboot will not be enough!<br \/>\nIdle3 timer disabled<br \/>\nPlease power cycle your drive off and on for the new setting to be taken into account. A reboot will not be enough!<br \/>\nIdle3 timer disabled<br \/>\nPlease power cycle your drive off and on for the new setting to be taken into account. A reboot will not be enough!<br \/>\nIdle3 timer disabled<br \/>\nPlease power cycle your drive off and on for the new setting to be taken into account. A reboot will not be enough!<\/code><\/p><\/blockquote>\n<p>The warning should be taken seriously though, the command took only effect after powering the whole system down, even though the drive itself reported idle timer to be disabled right away.<\/p>\n<p><strong>Update 2019-07-13:<\/strong> As I needed to adjust the IDLE mode of one of my Western Digital Red (WD30EFRX-68EUZN0) drives, I found out that more recent versions of hdparm support getting\/setting the mode, <em>even via certain USB adapters<\/em>. This was a huge improvement for me, since the tool mentioned above requires the drive directly attached to a SATA port, which always required shutting down the PC and re-wiring the disks for changing the settings. The relevant command is as follows (replace it with your appropriate device). And yes, you need the scary parameter.<\/p>\n<pre>hdparm -J 0 --please-destroy-my-drive \/dev\/sde<\/pre>\n<p>It is still necessary to power down the device before the setting takes effect.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today when looking at my Munin graphs for S.M.A.R.T. values of my always-on PVR box, I noticed that within a year, my Western Digital Green-line disks had degraded their Load_Cycle_Count attribute to a shocking low level of below 20 (in S.M.A.R.T., low levels are bad). The raw value indicated that the three of the four &hellip; <a href=\"https:\/\/www.dont-panic.cc\/capi\/2014\/07\/01\/linux-western-digital-green-load-cycle-count\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linux, Western Digital Green &#038; Load Cycle Count&#8221;<\/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":[6,13],"tags":[230,223,222],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-computer","category-hardware","tag-hardware","tag-s-m-a-r-t","tag-western-digital"],"_links":{"self":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":11,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"predecessor-version":[{"id":546,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/posts\/415\/revisions\/546"}],"wp:attachment":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}