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

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 monitorio.sh 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=$?
        [ "$standby_test" -eq "1" ] && break
done

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.

Sheesh, come on WD. I guess the once a minute kind of makes sense, there’s a shell script called hd_standby.sh that seems to work by specifying minutes until standby as well. They do seem to also have a lot of redundancy including some dead code here and there. Now if I could only find out what they do that seems to peg the CPU every once in a while.

If you have any interest I’ll post my script with the recent enhancements I made, in the next couple days. It’s nice to have a script that actually keeps the NAS a bit cooler, whereas WD assumes you have their Red drives in there that can work up to aluminum melting points. :stuck_out_tongue:

1 Like

I get the impression that WD does not understand the Operating system. They are just interested in the code that they write. Which by viewing this forum. They don’t have a very good handle on there own code. As for the Red drive. They have so much confidence in it that they reduced the warranty by 33% when it is installed in a MY Cloud.

Please post your code. It is always interesting to see what other people are doing.

I’ve completely given up on the hope of having this product go to sleep appropriately. I do have my USB HDD set to sleep after a while and it does so successfully and predictably, but I just set drive sleep to “off” and let the WD MyCloud spin continuously, as the way it was waking and sleeping the disk every few minutes had me worried.

I’d be interested to have you post your script.

Thanks!

Hmm, I did post the script before, but my post isn’t listed anymore. It looks like maybe WD removed that post along with the Google Docs link to it?

EDIT: It is still posted, in the other thread:

That sounds like the twonky service that scans for new media. If you search on here there’s a thread that talks about how to change it from “all the time” to daily, weekly, or less.

I believe during my troubleshooting I tested disabling the twonky service via SSH with no luck. The drive would wake up very shortly after going to sleep almost every time. At times it would get a few hours sleep, but no more than that. This is my second unit as the first one finally went bad after a few years with a bad HDD.

Hello, I’m in contact with WD support about this drive sleep. Mine start sleeping and stop after a while. This is actually increasing the Load Cycle Count of the drive. I have just sent the LOGs required by them to analyse. Lets see what is the feedback.

1 Like

Good luck with that…

1 Like

Hi,
I want to set up a log program and trace the accesses to my cloud. My cloud doesn’t sleep as well and it makes too much noise while working at nights in a silent room.
So to track the issue, which software(s) should I use.
Regards,

I find my WDMycloud gen1 firmware version latest 4.05.00-342 cannot sleep even I turn off iTune server, NTP and media server. Would you have any detail SSH steps to make the function normal again?

Solved by following this post.

WD has no intention of fixing the sleep issue. In fact they created it deliberately. If your drive shuts down, how will they ever decipher what’s on it? “Oh, they don’t do that… that would be illegal, unethical and a violation of our privacy. That’s why there are laws, to protect us.” Time to wake up sheeple. There is no privacy. Never has been. EVERYTHING you have in your computer, every drive, every storage device, every thumb drive, every stick of memory, password protected or not, is already stored in gigantic data storage facilities unknown to you. Every email, phone call, every piece of data, everything that has ever passed over fiber optics has been recorded and stored since 2008 from every network in the world. Don’t believe me? You will… some day.