Author Topic: Western Digital Green HD - A fix to stop destroying your drive in Linux  (Read 12712 times)

0 Members and 1 Guest are viewing this topic.

Offline Skully

  • Jr. Mitglied
  • **
  • Posts: 96
  • Branch: stable
  • Desktop: KDE
  • GPU Card: nVidia GTX 660ti 2gb
  • GPU driver: non-free
  • Kernel: 3.18 x86_64
  • Skill: Advanced
 I have recently discovered (a bit too late) that western digital green hard drives have a serious issue when used in Linux as a main drive or a nas drive.
The problem can also occur in certain situations in windows too.
The problem is due to a feature called intellipark. Which parks the heads on the drive after 8secs of drive inactivity.

 Many Linux installations write to the file system a few times a minute in the background (eg. writing logs). As a result, there may be 100 or more load cycles per hour, and the load cycle rating may be exceeded in less than a year. This problem also makes the drives very unresponsive and makes your system feel slow as the heads need to be unparked when you try and load something.

 My friend has killed two 1tb green drives on his xbmc media box in 4years.  The 500gig drive in my partners machine is in deep trouble as the load_cycle count is at 1991353 after a power_on_hours of 29549hrs. Compare that to my WD black 1tb wich has a load_cycle count of 721 after 13579hrs.

 Now Western Digitals specsheet says that the drives are good for 300,000 Load/unload cycles, so this is a pretty big deal.
http://www.wdc.com/wdproducts/library/SpecSheet/ENG/2879-771438.pdf

If you have a Western Digital green drive, please check your SMART information before it's too late :
You will need to install the package called smartmontools.
Code: [Select]
$ sudo pacman -S smartmontoolsor install with pamac or octopi.

Now check like this changing "sda" to whatever your green drive is. (Use lsblk in terminal or gparted or i-nex or something to work out which drive it is)
Code: [Select]
$ sudo smartctl -A /dev/sda | grep "^193"193 Load_Cycle_Count        0x0032   253   253   000    Old_age   Always       -       1991353
If the Load cycle count exceeds a few thousand, you're affected by the idle3 timer problem.

Here is how the output should look when this isn't a problem
Code: [Select]
$ sudo smartctl -A /dev/sdb | grep "^193"193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       721

Ok so you have the problem and want to fix it. Western digital have made a DOS utility to fix it if you ask them for it. Or can find it. Its called wdidle3.exe

But we arn't going to use that. Instead we are going to use a linux unnofficial alternative called idle3-tools. It is already packaged in Manjaro so no need
to compile it. but here is the source http://idle3-tools.sourceforge.net/

Install idle3-tools with pamac or octopi or like this in the terminal
Code: [Select]
$ sudo pacman -S idle3-tools
Now check what your drives timer is currently set as. (Replace sda if needed with your own drive)
Code: [Select]
$ sudo idle3ctl -g /dev/sdaIt will likely say it's set to 80 [8sec]

Now really we want to just disable the timer altogether like it is on a black drive, and just let our systems power management handle the drive.
If you want to just increase the time, then goto http://idle3-tools.sourceforge.net/ and read the instructions.

To disable the timer (Replace sda if needed with your own drive)
Code: [Select]
$ sudo idle3ctl -d /dev/sda
Next step is to shutdown and power off your computer. Rebooting isn't enough!
You need to power off, so the drive will turn on with the new settings.

now check again
Code: [Select]
$ sudo idle3ctl -g /dev/sdaand it should say disabled.

Optional step: Remove idle3-tools and smartmontools with octopi or pamac or in a terminal
Code: [Select]
$ sudo pacman -R idle3-tools smartmontools

That's it! All done. You can now enjoy the reliability and speed from the green drive that you expected to have when you bought it.

Offline CyberWolf2k14

  • Held Mitglied
  • *****
  • Posts: 1184
  • Computers make very fast, very accurate mistakes.
  • Branch: Stable-sysd229-LightDM
  • Desktop: MATE/Cinnamon/GNOME
  • GPU Card: nVidia GeForce GT740
  • GPU driver: nVidia-NF-364.19
  • Kernel: 4.4.9x64 / 4.2.8.9x64 / 4.1.23x64
  • Skill: Intermediate
I believe as a precautionary step all things considered MAYBE someone should STICKY this one so it becomes a PERMANENT reference in forum.
PowerSpec Quad core Intel Core i5-4690K w/ 16GB RAM
Dual Boot = Win 7 Ult x64 and Manjaro 15.12 x64
===================================================
"A computer lets you make more mistakes faster than any invention in human history...
with the possible exceptions of handguns and tequila".

Offline Seboss666

  • Sr. Mitglied
  • ****
  • Posts: 360
  • Spoon does not exist
    • Le blog de Seboss666
  • Branch: stable
  • Desktop: KDE 4.14
  • GPU Card: intel GMA4500HD
  • GPU driver: free
  • Kernel: 3.14.x 64bit
  • Skill: Intermediate
It could have its own wiki entry, thanks for the trick :)

Offline PingoDindo

  • Sr. Mitglied
  • ****
  • Posts: 405
  • Branch: Arch-Stable
  • Desktop: XFCE
  • GPU Card: nVidia GT218 (340xx)
  • GPU driver: Non-free
  • Kernel: 3.19x (Arch-x86_64)
  • Skill: Intermediate
Great one. This should be Wikified.
Do mark thread solved if done by editing your original post and prepending [Solved] in subject.

My Arch XFCE desktop:
http://pastebin.com/Zbn2xRZj

Offline Ayceman

  • Core Team
  • *****
  • Posts: 2113
  • Security Chief :P
  • Branch: stable, unstable
  • Desktop: Xfce
  • GPU Card: GTX780/HD3000/AMD8400
  • GPU driver: Nvidia/Intel/Catalyst
  • Kernel: latest stable+lts (64)
  • Skill: Advanced
Stickied.

Offline Zenny422

  • Vollwertiges Mitglied
  • ***
  • Posts: 114
  • Manjaro KDE and Loving it
  • Branch: Stable
  • Desktop: KDE
  • GPU Card: ATI-5700 HD
  • GPU driver: non-free
  • Kernel: Linux 4.1
  • Skill: Novice
Was wondering if there anything to worry about when it comes to SSDs !?!?

Offline Jonathan

  • Held Mitglied
  • *****
  • Posts: 940
  • Branch: testing
  • Desktop: Cinnamon
  • GPU Card: ATI Mobility Radeon HD 4330/4350/4550
  • GPU driver: free
  • Kernel: 3.18.0-1-mainline
  • Skill: Intermediate
Was wondering if there anything to worry about when it comes to SSDs !?!?
... in this context here: with a very high personal confidence rating: NO
(this was about too frequent spin down (and park) features of one certain brand and model of a really moving HDD)

... and very nicely described to work around it - and done as well.
Thanks!
« Last Edit: 13. November 2014, 23:00:15 by Jonathan »

Offline ron

  • Vollwertiges Mitglied
  • ***
  • Posts: 152
  • It is what it is
  • Branch: stable
  • Desktop: Xfce
  • GPU Card: ATi X1400
  • GPU driver: free
  • Kernel: various
  • Skill: Intermediate
This is ACE !
I replaced my WDG because of all the trouble it gave me, time to give it another shot now.

Thanks for this very informative post !
Be humble, be human, your ego does not need stroking, your eyes and heart need to open up!
Mankind will bring forth it's own demise, but in the meantime we don't have to be totally blind for the suffering we force upon others.
Sadly we choose to look away... anyway...

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline CyberWolf2k14

  • Held Mitglied
  • *****
  • Posts: 1184
  • Computers make very fast, very accurate mistakes.
  • Branch: Stable-sysd229-LightDM
  • Desktop: MATE/Cinnamon/GNOME
  • GPU Card: nVidia GeForce GT740
  • GPU driver: nVidia-NF-364.19
  • Kernel: 4.4.9x64 / 4.2.8.9x64 / 4.1.23x64
  • Skill: Intermediate
@Ayceman: Thanks.
@handy: Most excellent wikification. (OK, so I REALLY enjoy butchering the English language, got to have at least several vices and this is one). ;D ;D 8)
PowerSpec Quad core Intel Core i5-4690K w/ 16GB RAM
Dual Boot = Win 7 Ult x64 and Manjaro 15.12 x64
===================================================
"A computer lets you make more mistakes faster than any invention in human history...
with the possible exceptions of handguns and tequila".

Offline Skully

  • Jr. Mitglied
  • **
  • Posts: 96
  • Branch: stable
  • Desktop: KDE
  • GPU Card: nVidia GTX 660ti 2gb
  • GPU driver: non-free
  • Kernel: 3.18 x86_64
  • Skill: Advanced
Re: Western Digital Green HD - A fix to stop destroying your drive in Linux
« Reply #10 on: 15. November 2014, 04:49:36 »
@handy:  Thanks for putting on the wiki. Looks good, glad to have it in front of as many people as possible in-case they have the drive.
@Ayceman:  Same for the sticky.

Offline leledumbo

  • Sr. Mitglied
  • ****
  • Posts: 371
    • Pascal Warrior's Journey
  • Branch: stable
  • Desktop: KDE
  • GPU Card: Intel HD 4400 + nVidia GeForce GT 740M (HP notebook), Intel HD 5500 + nVidia GeForce GT 940M (ASUS notebook), nVidia GeForce GT 220 (desktop)
  • GPU driver: non-free
  • Kernel: linux-latest-x64 and linux-latest LTS-x64
  • Skill: Intermediate
Re: Western Digital Green HD - A fix to stop destroying your drive in Linux
« Reply #11 on: 16. November 2014, 18:24:53 »
Probably this is what happened to my previous (original) notebook HDD. Fortunately I'm still in the warranty period, so I have my disk replaced for free (it's Toshiba instead of WD now, doesn't seem to have any S.M.A.R.T. or green-ish label or something), but all my data is simply lost. I'll be watching next time I have this greeny HDD again.
Manjaro Net edition 64-bit + Self installed KDE
Kernel latest supported + latest LTS
HP Pavilion 14-n038tx
Asus A455LB-WX034D
Self built desktop

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: Western Digital Green HD - A fix to stop destroying your drive in Linux
« Reply #12 on: 16. November 2014, 19:00:50 »
Thas interesting.
I do have 1TB wdc green drive.

After disabling the timer, I still get this, which is about same values as with timer enabled.

Code: [Select]
193 Load_Cycle_Count        0x0032   143   143   000    Old_age   Always       -       173267

Offline Seboss666

  • Sr. Mitglied
  • ****
  • Posts: 360
  • Spoon does not exist
    • Le blog de Seboss666
  • Branch: stable
  • Desktop: KDE 4.14
  • GPU Card: intel GMA4500HD
  • GPU driver: free
  • Kernel: 3.14.x 64bit
  • Skill: Intermediate
Re: Western Digital Green HD - A fix to stop destroying your drive in Linux
« Reply #13 on: 16. November 2014, 19:09:42 »
It's an "absolute" counter, so it's not reinitialized between powerons/poweroffs. Just like Power-on hours, instable clusters... It can't go back. That's not a bug ;)

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: Western Digital Green HD - A fix to stop destroying your drive in Linux
« Reply #14 on: 16. November 2014, 23:04:26 »
@artoo: When you turn off the WD drive's intellipark "feature" with the following command line (for whatever sd* drive):

Code: [Select]
$ sudo idle3ctl -d /dev/sda

It stops intellipark from sending your drive's load_cycle count numbers up any more, which should make your drive last longer than if you didn't use the above command to kill intellipark.
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak