The Reason why your WD Cloud ain't getting no sleep and We Should Petition WD to fix!

Unfortunatly the standard response to more than a few problems, including the sleep problem, with the My Cloud seems to be, “it will be corrected in a future firmware update” when in reality it is never fixed.

While it may appear the device is now sleeping the only way to really tell if its sleeping over time is to check the logs. Often, even with the various SSH tweaks and Dashboard setting changes, the My Cloud will sleep for a period of time, then wake up only to go back to sleep some time later.

Using something like the Sleep.awk script can help tell you how long your My Cloud is actually sleeping for.

If you look at cron. You will see that the system is setup to wake up at midnight,8AM,4PM to run some scripts.
It is also setup to wake up at 3AM to check for new firmware and do other house keeping tasks.

He-he… All what need to do - is move all temp/cache files to ramdisk (And disable logs. Who need logs? Anyone read it? Nope!).

In debian - all what need to do - Install ramlog and add simple tweak in samba init script (Move cache and temp db to ram).
Also MiniDLNA not scan media every time by cron like twonky, only when files adds/changed/deleted.

I have another question for WD - Why he using Marvell SDK (With all workarounds inside). Its ugly, bugged like a hell…
(untranslable) И вообще там костыль на костыле…

A few things I found about sleep. The current version of samba has a tendency to update the browse.dat file every few seconds or so. Supposedly this has been fixed in a later release. Also it appears that the 8 second sleep is caused by those processes that run during get removed from cache. When the system wakes up to do its housekeeping functions. Then the drive is put in standby. But then requires some code to be brought back into cache. This wakes up the disk. After a few loops thru code everything is back in cache and the drive finally can go back to standby. In previous versions o firmware atop was not running. Now atop rotates the logs every 8 hours at midnight 8AM and 4PM.

Hi…here is my trick to make wd sleep (but i dont have cloud enabled…)
Im using win7, wdmc v2 firmware, as other v2 wdmc aware that no change can be made on wd, not even scheduler, script, etc…so i need to do it everytime the wdmcv2 reboot/loss power etc.
basically i just tell wd from my pc to run specific command …

tools needed : putty, notepad
A. make simple text files with these line (there is enter at the end of the line), lets call it “wdsleep.txt”

/etc/init.d/wdmcserverd stop
/etc/init.d/wdphotodbmergerd stop
/etc/init.d/convert stop
/etc/init.d/wdnotifierd stop
/etc/init.d/wddispatcherd stop
/etc/init.d/atop stop
killall crond

B. enable ssh on wdmcv2 (please be careful)
C.make a bat file and make it autorun on pc start, with this line (lets pretend that all of your files is in E drive)
E:\path\to\your\puttyexe\putty.exe -ssh sshd@ipaddress of your wdmc -pw yoursshpw -m E:\path\to\your\text\on\step1\wdsleep.txt

I must say that this is ridiculous thing to do…but wd seems to ignore our problem.
I really hate the WD mycloud OS v2, its great that fox_exe make such a nice replacement OS.

@cloud_van.damme, check this: (Enable for stop these daemons, Disable for start again).

@Fox_exe…thank youuuu, here is my report :
as in how to in your ftp site, I replace the define js with your define js
I did removed it >> rm /usr/local/model/web/pages/function/define.js
make link >> ln -sf /mnt/HD/HD_a2/Public/define.js /usr/local/model/web/pages/function/define.js
install wdcrack and than wdsleepfix, reboot

I got a blank page on web admin, ((as in screeshot)) and than I look at
/usr/local/model/web/pages/function/ folder and the define js is :
lrwxrwxrwx define.js → /mnt/HD/HD_a2/Nas_Prog/WDSleepFix/define.js << shouldnt it be /mnt/HD/HD_a2/Public/define.js ?
I copied your define.js inside /mnt/HD/HD_a2/Nas_Prog/WDSleepFix/, reboot
webgui is fixed.

20 minutes later it sleep, yayyyyy
is there any setting to set it lower ? 10 or 15 minutes maybe…

and another oot question :slight_smile:
where is original transmission setting file on your build ?
(regular path would be /etc/config/transmission ) not the settings.json

In install folder: /mnt/HD/HD_a2/Nas_Prog/Transmission/settings (Or something similar)

Woops… My faut. Fixed.

I got a new name for wd sales division :grin:
NAS WD – NAS With Dysomnia

Next report : 23 hours later : I notice wd light is blue and the wd is waken, dont know why, and I dont know when its awaken, no log report shows exit standby no device on the network is alive ( investigating it at the moment).
Is there any settings to get more detailed log ? Or the default settings will show exit standby ?

something on log show wd notify, I dont really care but it shows wdnotifier: parseConfig() invalid configuration entry: << what is that ? I dont know if its happening before or after wdsleepfix. I will start fresh log for more info.

I think you should start a new thread @Fox.exe with your wdsleepfix…so the petition is not hijacked

SleepFix - is “workaround”. Not fix.
Maybe i need create new firmware for WD? (OMV + WD Services for example?). No, i has already bothered to correct others errors.

1 Like

Anyone test the latest firmware to see if sleep functionality has been “enhanced” ? lol

Hi all, I have a related question… Is there anyway to tell if the hard drive is sleeping, from a scripting perspective?

I have a script I’m using to engage the fan when the drive temperatures get hot, but I don’t want to inadvertently keep the HD’s awake by polling for their temperatures. If the HD’s have been put to sleep, then I’ll monitor the system’s board temperature until they wake up again.


hdparm -C /dev/sda returns the following:
drive state is: active/idle
drive state is: standby

Thank you. I was digging for an answer myself too and learned that sometimes hdparm -C can inadvertently wake up a sleeping drive. I’m not sure how true or rare that is, but because of this I’m currently trying the following:

smartctl -i -n standby /dev/sda

It’s a bit harder to parse the output, as its formatting differs from active to standby state, but it may be a more ideal option to ensure a drive continues to sleep.

Thanks again!

This is the code used in script to check if the disk is in standby. Could probably do the same thing with you code just change what you grep.
I have not noticed any time that the hdparm -C /dev/sda woke up the disk.

for i in ${drivelist[@]}; do
        hdparm -C $i | grep -q "standby"
        [ "$standby_test" -eq "1" ] && break

Good point. I was also using hdparm last night without any issue, but wasn’t sure given what I had read online in the general case. I may go ahead and just implement hdparm, it’s certainly more elegant to parse that than smartctl.

I’m excited about this fan script (created by another user with my edits to preserve sleeping hard drives), as it will do a world of good to keep the drives cooler than what WD deems necessary.

Actually you can parse the smarctl using the same method. Just grep for ACTIVE or STANDBY. I don’t have the output for a drive in standby. I just tried the smartctl code on my device. When I first logged in and ran the command it responded quick. I then tried the command later and the response was slow. Like it waited for the disk to wake up. So not sure it smartctl would return STANDBY.

I could grep but I’m using a Python script which makes it a bit more cumbersome to execute that command. It’s doable but in the end I think I prefer hdparm since there are apparently no issues with it waking up the drive.

Regarding smartctl, I think you need the right switches set (specified above) to explicitly prevent the drive from waking. I was able to read standby states with it and not have the drive wake up.

In any case, this is the snippet of what I do in Python now using hdparm. It returns active/idle or standby or sleep depending on the drive’s status. There is likely a cleaner way to do this in fewer lines (nested splits perhaps), but I like to be very explicit when I first implement code.

	sda_query = subprocess.check_output(["hdparm", "-C", "/dev/sda"])
	sdb_query = subprocess.check_output(["hdparm", "-C", "/dev/sdb"])

	sda_return = sda_query.split("\n")
	sdb_return = sdb_query.split("\n")

	sda_return2 = str.split(sda_return[-2])
	sdb_return2 = str.split(sdb_return[-2])

	sda_state = sda_return2[-1]
	sdb_state = sdb_return2[-1]

sda_state and sdb_state will then be “active/idle” or “standby” or “sleep” depending on drive state.

On the gen2 there is a program called set_pwm. This is the program that checks if the disk is in standby mode by calling hdparm -C once a minute. It also puts the disk into standby mode. I’ve been doing some work on tracing gen2 disk activity. I just recently found that Both smartctl and hdparm send a command to the disk drive to put it in standby. Not sure why this redundant I/O is being done.