Question regarding the FAN used by WD My Cloud EX2

Below is a link to the updated program_fan code that I’ve been using (I’ve bumped it to version 0.5 from 0.3). As a reminder, the changes allow the installed drives to successfully stay asleep when they are configured to do so through your own MyCloud configuration settings. When the MyCloud isn’t accessed much throughout the day, sleeping the drives is the best way to keep them cool. The temperatures are substantially cooler when the drives sleep.

Preventing the script itself from waking the drives back up is accomplished by avoiding temperature readouts of the drives when they are asleep. I also added some additional logging details when logging is enabled.

Recommended usage:

  • Copy into /usr/local/bin and then do the following commands:
  • Change permissions so program is executable:
    chmod 500 /usr/local/program_fan
  • Start script independent of ssh session.
    nohup /usr/local/bin/program_fan -t 900 -L > /var/log/program_fan.log 2<&1 &
    -t 900 sets the script loop to run every 15 minutes
    -L enables logging
    The remaining portion of the command redirects all logging into the log file/path specified, i.e. /var/log/program_fan.log As an aside, the location referenced in this example code is separate from the installed drives, so writing the log here will not wake up the drives if they’re sleeping.

Note that if you restart your MyCloud or there’s a power outage, the script gets wiped and you need to perform the above steps again. I’m considering a setup that will automatically re-copy the script and execute it on startup, but it’s a lower priority for me.

Feedback welcome!

3 Likes