Skip to content

Instantly share code, notes, and snippets.

@kaizhu256
Created March 9, 2019 11:39
Show Gist options
  • Save kaizhu256/c3871fda354882bb09641ef047d89990 to your computer and use it in GitHub Desktop.
Save kaizhu256/c3871fda354882bb09641ef047d89990 to your computer and use it in GitHub Desktop.
wd mycloudex2ultra fan control
https://community.wd.com/t/question-regarding-the-fan-used-by-wd-my-cloud-ex2/98304/150
martin953
1
Aug '17
Hi everybody!
I’m the owner of WD My Cloud Mirror Gen2 8 TB and my drives (2 WD Red’s) were constantly running at around 52º C, so I was among others who were concerned about high operating temperature of WD My Cloud drives.
I’ve read this thread top to bottom and accumulated suitable solution (at least for me it is). Basically, My Cloud OS already have temperature controlling program (daemon), we only need to make it do it’s job somewhat more passionate. The temperature thresholds are stored in four .xml files in /etc/wd/ folder:
BVBZ-thermal.xml BWAZ-thermal.xml BWVZ-thermal.xml BWZE-thermal.xml
Each file is meant for particular WD NAS model.
То determine what file is used for your device you need to login to your WD NAS via ssh and run the following command:
ps | grep wdtms
The output will be something like this:
5434 root 33984 S /opt/wd/bin/wdtms -config=/etc/wd/BWVZ-thermal.xml
So, the My Cloud Mirror uses BWVZ-thermal.xml and yours might be different. Anyway, this is а fairly simple xml config file and by changing it contents we could force the fan to run faster. Obviously, any configuration changes are forgotten upon reboot, so we do need to manipulate this settings after every restart. This is how I do it now:
Change current directory to Public:
cd /mnt/HD/HD_a2/Public
Create two files in Public folder. First wdmc_lower_drive_temperature with following content:
#!/bin/sh
sed -i -f wdmclowtemp.sed /etc/wd/BWVZ-thermal.xml
/etc/init.d/wdtmsd restart
Of course you need to substitute BWVZ with what you’ve got from your ps | grep wdtms output
Second wdmclowtemp.sed containing this:
s/"[0-9][0-9].0" interval="300" goto="set_drv_extreme"/"65.0" interval="300" goto="set_drv_extreme"/
s/"[0-9][0-9].0" interval="300" goto="set_drv_pending"/"61.0" interval="300" goto="set_drv_pending"/
s/"[0-9][0-9].0" interval="300" goto="set_drv_danger"/"57.0" interval="300" goto="set_drv_danger"/
s/"[0-9][0-9].0" interval="300" goto="set_drv_hot"/"52.0" interval="300" goto="set_drv_hot"/
s/"[0-9][0-9].0" interval="300" goto="set_drv_warm"/"44.0" interval="300" goto="set_drv_warm"/
s/"[0-9][0-9].0" interval="300" goto="set_drv_content"/"42.0" interval="300" goto="set_drv_content"/
s/"[0-9][0-9].0" interval="300" goto="set_drv_cool"/"40.0" interval="300" goto="set_drv_cool"/
Obviously enough, values after second back slash represent different temperature thresholds. Those that are above I’ve got after a little of experimentation. They got my drive temperatures from around 52º C to around 43º C with fan speed floating from 4500 rpm to 8000 rpm depending on load.
Screen Shot 2017-08-29 at 12.51.53.png743×427 22 KB
Your mileage may vary, so you can experiment with those values on your own.
Set correct permissions (you only need to do it once):
chmod 700 wdmc_lower_drive_temperature
and execute script:
./wdmc_lower_drive_temperature
Just to be sure, you can check that wdtms is indeed running with
ps | grep wdtms
If not, type
/etc/init.d/wdtmsd start
and hit enter.
On next reboot you need to login via ssh again, cd to Public directory and execute script.
That’s it! You’ve got a lot cooler and a quite a bit noisier NAS beside you. I’m okay with noise, since it’s in my office, not at home. More importantly, I hope, it will now serve a lot longer. I understand WD’s desire to keep it quiet for us but I do not consent with risk of reducing MTBF over this. All in all I think it is a good example of bad thermal design.
Big thanx to twins and Ben_W for their findings!
And remember, if you do this, do it at your own risk. I’ve merely provided an example that worked for me. If you f##k this up, please, do not hold me responsible. This is a makeshift solution, so maybe someone will come up with something more elegant. Kudos!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment