Question regarding the FAN used by WD My Cloud EX2

There is another location on my MCM Gen2, in which these config files are also located. Maybe you can check if the /usr/local/modules/etc/wd/ directory exists on the EX2. If not, I would suggest first to look if the process wdtms is active on your EX2 by doing ps aux | grep "wdtms". On my MCM Gen 2 this daemon is running on /opt/wd/bin/wdtms with the parameter -config=/etc/wd/BMVZ-thermal.xml. So when you also have this wdtms daemon running, look for this config parameter and where it is located.

I have to point out, that my above mentioned approach needs a minor tweak: You have to make sure, that the value changed in line 59 (in my example changed to 37.0) can be reached after some time when the fan is running at 100%. So maybe don’t set it as low as I described in my example, otherwise the the drive_temperature_state won’t decrease and your fan will keep on increasing its rpm.
My suggested values per line would therefore be:
line 54: 61.0
line 55: 57.0
line 56: 53.0
line 57: 49.0
line 58: 45.0
line 59: 41.0
line 60: 1.0
line 61: 42.0

When it reboots it resets the file to the default parameters. Using an EX2 Ultra. I think the files in both directories have to be modified.

The files in /usr/local/modules/etc/wd/ cannot be modified. The files in /etc/wd/ are rewritten upon reboot.

That is true, right now I’m copying the files everytime I start my MCM Gen2 from the harddrive to the folder and restart the daemon. Maybe someone can figure out if that can be done via a script, which will be executed automatically when the MCM Gen2 (or EX2 Ultra) starts.
Right now I’m happy that configuring the fan is at least possible.

What size drives does your my cloud have? What were the temps getting to? I have 8TB HGST drives in mine and they were getting to 55c. They run cooler that the 6 TB & lower drives though.

I bought mine with 2 WD 8TB Reds, but replaced them with one small and one Red 6TB drive, running as JBOD. I am using my MCM as archive drive for storing only the most important files (small documents (going on the small drive) and images (large drive) ). Running the stock fan curve the temps go easily up until the mid-high 50c like you said. With custom fan curve they get cooled down to 40c.

I ended up picking up a fan like AdamODonnell did in the post above. A lot less messing around. I wish that they had not messed with the fan profile in the last firmware update. It was working fine.

I picked up this thread searching for fan issues on the MCM 2 TB. After reading it looks like same apply.

My system was throwing fan errors, WD refused to properly acknowledge the issue. So today, I said why not void the warranty. I tore my MCM apart, found the dinky little fan had dust on it in the manner it would if it actually worked.

So I built a new case for my system out of plywood, I put a 140mm fan in the bottom blowing upward, and a 140mm at the top blowing out. Flow worked great. By the time it booted far enough for me to log in, the fans quit. I found these forums and figured it was a software issue that will never get fixed because WD has to have a proving ground for it’s red drives. Heaven forbid they allow us to keep them cool. So, I soldered the pair of fans to a separate 12vdc power supply. Now my drives are at 26 deg celsius. Room temp is right around 20. , so I am happy with that now.

I think the software may have been OK for a while, but then I just started getting fan alerts again and decided to fix it myself. Rather than post yet another thread somewhere, I revived this one. I don’t have an EX2, so this may be not relevant.

I think if I would have had the larger drives primarily mentioned in this thread, I would have had failures too. Not anymore. Now I can put big drives in without worrying. I’ll just cut a little filter out of a roll of furnace filter material I’ve got to keep the dust down.

Obviously my solution isn’t for everyone, I have a table saw, router, miter saw, etc. The end result would actually look good if I wasn’t using scraps :slight_smile:

Off the topic. I like the black theme. its for long night usage. Is the theme is region specific. Can i change in my Ex2.

I current have white theme. Its good. But black would be my preference.

i had a experience yesterday that once the cpu usage is beyond 80% more time the fan speed kicks in at max say 10k rpm and till the usage came down to 50 % and below the rpm was between 8k-10k

I dont think so . Check you cpu network usage . If the cpu doesnt turns up heavy usage then fans will stay at off state.

ok now i get only ex2 is black theme . For ultra its white

Um … “System Over Temperature”, and “Fan not working”

Why else does a fan exist but to avoid high temps? And what else could “Fan not working” mean but … um … fan not working?

The HDD has TDP of upto 67 for red series. If you are using your own HDD may it doesnt get cooled.

So just see if you see some cpu spikes. Also if HDD hits 58+ and still fan speed is nill then time to go for replacement

Wondering if the bay changes and hdd is intact . How does the data be valid.

How does the RAID be re-build even if we have config file’s saved. Once hardware changed can the raiid be re-build. I dont think so.

FYI, I’ve got a 2x4 if that affects how much heat is generated. I noticed that the enclosure was sitting pretty low and inhibiting airflow so I had raised it like many of you. I also noticed that the drive pull tabs were covering about 40% of the core heat exhaust vents. I don’t plan on doing much if any hot swapping so I removed those tabs and freed up all that all that blocked airflow. If I need to swap drives, I’ll turn the unit over and use the gravity assisted, digitally controlled drive removal procedure. We’ll see how that works for now. It hasn’t been put through a big task operation yet. Otherwise, I’ll be looking for one those USB fans to mount on top of my unit like of some you have. How loud are those fans, anyway? My case is sitting by the tv and I don’t want to have to listen to a noisy fan when I’m watching tv.

OK. I’m answering my post but… I decided to get the same infinity fan shown in pictured above. To prevent any inflow of air from the sides making the arrangement less efficient, I removed the bottom fan guard so it rests on top of the case with zero space between the bottom of the fan and the vented lid of the case. There is enough clearance that the fan doesn’t rub on the case at all without the guard. You just have to use caution when you’re moving the fan around… i.e. turn it off before moving it around. One last drastic thing you is tape up the rest of grates/vents on the lid around the fan so there is no reverse flow around the fan, but my unit is sitting at 32 - 37 deg compared 68 deg and I figure the that’s goods enough. The USB fan is really quiet and works so well that the case fan never even runs.

Summary…
Raise the case about an inch higher, remove those drive pull out tabs and get a fan ($15) with the bottom guard removed on top of the case and you’re golden.

I only placed a very quiet fan on the top - no other measures. Got the same temperature results like you. The fan got the energy from the USB connecter of the EX2 itself. Thats all. So it runs with 5V indeed permanently, but absolutel unhearable.

So I realize your post is a bit old, but I wanted to let you know that I did implement your script on my own EX2.

The only thing I’ve changed so far, is that I added the following line to your log function…
sys.stdout.flush()

Without this line, I was unable to redirect your script’s output to a log file when running.

I may also add in some hysteresis. In example, the threshold to turn the fan on from an off state. The “on” condition could be the temperature specified plus 1 degree, and the condition to turn it back off could be the temperature specified minus 1 degree. This may help prevent the fan from toggling on and off as much, as shown in the log below:

2017-07-24 21:42:49 program_fan - temps - board: 52 hd1: 41 hd2: 41 - fan idx: 1 speed 4411 rpm
2017-07-24 21:42:52 program_fan - fan speed index changed from 1 to 0.
2017-07-24 21:52:55 program_fan - temps - board: 52 hd1: 42 hd2: 42 - fan idx: 0 speed 0 rpm
2017-07-24 21:52:58 program_fan - fan speed index changed from 0 to 1.
2017-07-24 22:03:01 program_fan - temps - board: 51 hd1: 40 hd2: 41 - fan idx: 1 speed 4477 rpm
2017-07-24 22:03:04 program_fan - fan speed index changed from 1 to 0.
2017-07-24 22:13:06 program_fan - temps - board: 51 hd1: 41 hd2: 41 - fan idx: 0 speed 0 rpm
2017-07-24 22:23:12 program_fan - temps - board: 51 hd1: 41 hd2: 42 - fan idx: 0 speed 0 rpm
2017-07-24 22:23:15 program_fan - fan speed index changed from 0 to 1.
2017-07-24 22:33:18 program_fan - temps - board: 51 hd1: 40 hd2: 41 - fan idx: 1 speed 4347 rpm
2017-07-24 22:33:21 program_fan - fan speed index changed from 1 to 0.

Additionally, I used the following command to start your script, so that I did not need to have a persistent SSH session present. (I like to turn off my other computers with the exception of the NAS, as it’s wholly unnecessary for me to keep them running and I’m not a fan of wasting energy).

nohup /usr/local/bin/program_fan -t 600 -L > /shares/Public/fanLog.txt 2<&1 &

As you can see, in my case I have the logging enabled, and have the script running again every 10 minutes. I may eventually convert this to a cron job and have it execute a single loop each time. I don’t know if that would have less CPU utilization or not, though it may allow the script to start running again without my intervention in the case of a reboot or power outage.

Thanks a bunch for writing and posting this Python script!

1 Like

Hi Clarkson,

Thanks for letting me know about your use of the script! After I dropped it into the forum, there was nary a ripple of response, so I thought nobody was using it. My EX has been running well and one time the script ran for > 90 days without a glitch until I needed to reboot the controlling iMac. Fan speed index never exceeded 3.

I tried redirecting stdio/err back when I first wrote it, but failed; it’s been a long time since I did much serious shell-scripting or I’d probably have remembered the need to flush. Thanks for the sys.stdout.flush() hint! I’ll add it to my version. I also like the nohup, may keep the script running when the controlling pty goes away (i.e. when my iMac crashes, or I quit the Terminal app or close its window).

At short intervals, yes, I agree hysteresis is a good idea. That’s why furnace and air conditioner systems typically use ±1deg, IIUC. But at the 600-sec intervals we’re using I find that for my needs it’s fine without. The speed change seems to require little CPU or other resource, so aside from a bit of background noise-level change, a simple, symmetric, non-hysteresis ramp is adequate for my use. Of course, it’s Python, so you can change it for your own use case, which is the beauty of Python over compiled languages like C or C++.

Note - I’ve been considering dropping down to 300 sec or even less. So far, 600 sec seems just fine–max 1-2 deg excursions observed in that interval–but if something goes wrong in the h/w (e.g. a book falls on it and partly blocks the top vent), and it starts heating quickly, a shorter interval may catch the heat-up sooner and protect the equipment/data from consequential damage. There’s no safety net.

As for cron, there are probably a number of folks who’d like that flexibility, especially if it auto-restarts after a reboot of the EX. Maybe a crontab that checks whether the looping implementation is currently running and kicks it off if not would also be a good thing for a lot of users; I don’t think there’s much to gain in resource use with cron, as time.sleep() seems to be implemented very cheaply, with CPU usage being minuscule, and the fan I/O operations don’t seem to put much of a load on the cpu, and should not interfere with disk or LAN i/o. I haven’t really tested those assumptions though, just done some casual observations.

Please post your changed version in case anyone else wants to use it. If you do a single-stepping cron version, please give the new version a new name.

Many thanks

Glad you were able to see my reply to you! I wasn’t sure if you were still monitoring these forums. I am still tweaking the script a bit.

For the hysteresis, it occurs to me that a longer time in the loop is almost the same effect. In other words, if I choose to monitor every 30 minutes, for example, the temperature will creep up and the fan will turn on, and 30 minutes later the temperature should be much lower. Of course, the trade-off here is whether or not you may miss an event that causes significant heating in a 30 minute window, but in my case that should not happen.

I agree with you that there is probably not much benefit to a cron job over how this is currently implemented. I was initially concerned at the CPU spikes I observe through the EX2 web interface, but it appears that’s WD’s own code doing things in the background, as the spikes are present regardless of whether or not your script is running. Wish I knew what the heck WD was doing, it seems excessive in my opinion.

The other thing I’m tweaking right now is an attempt to identify if the hard drives are in a sleep state, and if so, fall back to reading only the temperature from the system board even if drives are selected. My understanding here is that reading HD temperatures will prevent them from sleeping or cause them to come out of sleeping. I don’t even know if the method I found to check for them sleeping will work though, but I just kicked off that variant for testing. Along the same lines, I’ve modified my nohup to do the logging to the same /usr/local/bin location as the script, to avoid writing to the hard drives. I’ll modify my post above to reflect that change as well if this change (errr, hack…) ends up working.

Anyways, thanks again for posting the script. At least one person got use out of it, possibly many others. I saw it last year but didn’t have time to do the research to finally test it. Now that I have some time, and more of a need (read: additional NAS use) I’d like to see if I can get it to do what I’ve been envisioning for a fix.

Of course, your script already accomplished 90% of what I wanted. :smile: I will absolutely be sure to post my updated version for your consideration and the potential benefit of others, probably in the coming week or so after my small attempt at testing and validation.

1 Like