Skip to content

Instantly share code, notes, and snippets.

@diffficult
Created April 16, 2017 07:42
Show Gist options
  • Save diffficult/730dc2b018f4b1b6da46c3645758c235 to your computer and use it in GitHub Desktop.
Save diffficult/730dc2b018f4b1b6da46c3645758c235 to your computer and use it in GitHub Desktop.
Fan control notes for WD My Cloud EX2 Ultra
~ # fan_control -?
*** Fan Cobtrol Help Message ***
fan_control b c: for NAS booting
fan_control 0 d : [auto: low/medium/high/max] open debug msg
fan_control 0 c : [auto: low/medium/high/max] close debug msg
fan_control -L [value] : set Lower (THYST)
fan_control -H [value] : set Upper(TOS)
fan_control -g 0 : get current temperature
fan_control -g 1 : get Lower temperature
fan_control -g 2 : get Upper temperature
fan_control -g 3 : get fan state
fan_control -g 4 : get fan rpm
fan_control -f 0 : set fan stop
fan_control -f 1 : set fan rpm4000
fan_control -f 2 : set fan rpm5000
fan_control -f 3 : set fan rpm6000
fan_control -f 4 : set fan rpm7000
fan_control -f 5 : set fan rpm8000
fan_control -f 6 : set fan rpm9000
The command "fan_control -f 3" can manually turn it on. Its noise and air flow can be easily detected. The larger the number, the faster is the fan speed. The command "fan_control -f 0" can manually turn it off. The fan is working !!!
The commands "fan_control -g 0" would give the hard drive temperature. "fan_control -g 4" give the fan RPM. The figures are the same as in the dashboard.
Using these commands, I have managed to bring down the temperature from 55 back to 45 manually.
So the problem is not in the fan but in the automatic temperature control. Perhaps some DIY people can write a background monitor program to check the temperature and change the fan speed periodically.
Another finding is a file called /etc/fan_temperature.txt Its contents is here:
~ # cat /etc/fan_temperature.txt
TEMPERATURE_STOP = "39"
TEMPERATURE_LOW = "45"
TEMPERATURE_HIGH = "49
@migpprmp
Copy link

I have a EX2 Ultra. Use "fan_control -f 4" and the fan start 3 sec and next torn off. Any ideia i can put the fan start until i turn off manually? The CPU temp is 80C, disk 1 and 2 is 45C and the fan dont start. Sometimes the fan star and the CPU is 75C. I dont understand!!!

@diffficult
Copy link
Author

I have a EX2 Ultra. Use "fan_control -f 4" and the fan start 3 sec and next torn off. Any ideia i can put the fan start until i turn off manually? The CPU temp is 80C, disk 1 and 2 is 45C and the fan dont start. Sometimes the fan star and the CPU is 75C. I dont understand!!!

I will edit later on accordingly, this info was from an old WD forum post from 2014, the EX2 doesn't like you touching anything related to fan control and other stuff like user permissions through ssh. Going manually was a temporary solution at best and every time you reboot it will revert back any changes or settings.

What I believe is happening to you is that after setting a higher fan rpm, the board cools down and reach the TEMPERATURE_STOP value or even the TEMPERATURE_LOW value and just slows down and you can't hear it anymore. I recommend you just go and edit the fan_temperature.txt file located in /etc and just play around with the thermal ranges there. Remember those are expressed in Celsius. I don't have that drive with me anymore, is off-site, but honestly if I recall correctly I found it futile to set it by hand since there was always another process that checked temps and just autoswitched the rpm.

@migpprmp
Copy link

I've seen many users recommend changing the fan_temperature.txt file. I'm not an experienced person and I don't know how to do it. Is there a video where you can learn to change the file or even another solution? I have the WD open and I guarantee that with the CPU temperature at 85C and HDD at 52C the FAN is off. Sometimes she calls. If you test the system, the FAN starts and says it is ok. Even restarting the FAN it starts as much as normal. Thanks

@ejaquay
Copy link

ejaquay commented Sep 27, 2021

Here is a short script that prints drive temps
------------------------------- cut --------------------------
#!/bin/sh

print_drive_temp() {
echo -n "$1 Temperature: "
smartctl -d ata -A $1 |
awk '{if ($2 == "Temperature_Celsius") print $10}'
}
print_drive_temp /dev/sda
print_drive_temp /dev/sdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment