Letting Sleeping Drive lie - don't wake up

problem: The WD Cloud would wake up at random intervals throughout the night. Some as short as 2 minutes, 6 minutes, 20 minutes and the longest sleep is 70 minutes.  After rebooting the device with no jobs killed or restarted, the device managed to sleep for 2 hours and 12 minutes. I do not know why it woke up. (Static IP, all scan jobs off). 

I can fully understand why a PC would wake up and defrag its drive once a week, or re-build an index for faster searches but that is the old days…

As more and more devices are capable of sleeping, I have become use to putting a device to sleep and they have remain sleeping; devices such as iPhone, iPad, laptops, etc.

Even my PC is set with the indexing service turned off as I don’t have any media files on my PC for it to index or search. Defrag is off since it is a SSD.  Even the net waking the pc has been turned off. The only thing that wakes my PC is the keyboard, not even the mouse (as a bump on the desk would wake a sleeping pc).

Although the hard drive does spin down theWD Cloud doesn’t really sleep as the processor inside is constantly maintaining a vigil on everything; hence it is constantly warm to the touch. However once in awhile the hard drives spins up and everyone has been saying well, it is a small computer and such things like DHCP needs to refresh its IP, logs have to be written to the disk, etc. etc. etc…

I think one of the best quote that I have read on one of the posts in regards to the cloud taking days to scan all the media files has been “I bought a storage device and not a super computer calculating the value of pi”.

A storage device should not be waking up every hour, just like your TV doesn’t turn on every hour to scan its channels to ensure that it indexes shows for you to watch the next day? Nor does your phone spend time defragging memory or use GPS to ensure that you haven’t wandered away from your house while it is sleeping?

If any device does wake up, it should be more discreet!

Just because it is a mini linux computer that has a cron (job scheduler) and multitasking doesn’t mean it should be designed that way. When my cloud drive sleep, it should sleep for weeks/months or even years sipping power or even suspended like a person on cryogenics; dreamless. There should be NO daily/weekly/monthly jobs unless it is user specified. If the process is needed, such as the scanning process to build photo images and other functions for DLNA, these scans must be a user controllable function.

Move items like the time update so it is done when the user wakes up the device and not a cron job that wakes the storage device up in the middle of the night. Can you imagine your smart tv turning on just because NTPD needs to run. Perhaps the smart tv does, but at least it isn’t turning on the TV to do so and just the same with the storage device that the drive should remain sleeping … until the user accesses it.

All log transfers even though they should be kepted in case of a power failure should not wake up the drive everyday just to write the logs. Either include a small SD card to keep the logs or don’t write to disk until the user wakes up the device.

This is just common sense and I’m so glad you don’t write the OS for my car as I cannot imagine my car starting up every half hour just to warm up because it is cold :stuck_out_tongue:

"this is a storage dev

Hi

Been suffering from the same stuff as my MC/2TB is bothering me with its presence when it shouldn’t be.
What’s more, the times it’s up are frequent, random and of variable length, whereas they should be more regular, as the scan I set is every 8 hrs or so (Twonky). This would be acceptable (although I’d prefer it to rescan when it’s up because it’s being used).

What bothers me even more is the lack of solution from the WD team. I issued a ticket with support, wrote here and even got some help via forum (that is: someone pushed my enquiry to the Support, apparetly). So far nothing came back. Not even a hint (except the usual “have you tried turning it off and on again”, which I did).

My idea: the WD product phone home and they cannot admit it in public.

As Ralphael posted

Mine acts the same way, Exactly !!  It never sleeps for very long. To be honest, I think WD is no different than Seagate or any other manufacturer when it comes to an inexpensive NAS. They use software that is readily available … Brand an interface and place it on the market.  Seagate has stopped selling the NAS 110 and up due to the same type of issues and lack of fixes as I am seeing with WD’s My Cloud and this all happened within 2-3 years of Seagate’s launch.

I don’t think they have the expertise in resolving the issues or it is strickly a Business case of economics for the Share Holders. It really doesn’t matter the reasoning … we are left with the results. You can see since October the post count of this forum and the issues presented. You also see the fixes available. The math speaks for itself. I will say WD Support has made several attempts to fix my own My Cloud, but issues keep coming back.

The true lack of “Sleep Mode” has me worried about a prematured death of this device, or wondering what it is doing when it does wake up. Is this where the issues are rooted? Who knows and I really do not expect that WD would say if they did know. That would be suicide for them as every competitor would spin it to their advantage. The best we can hope for is a proper Firmware upgrade that fixes this and many other issues.

I am still hoping WD comes through. :wink:

Feb 23 15:52:58 WDMyCloud logger: exit standby after 8 (since 2014-02-23 15:52:50.765498000 -0800)
Feb 23 16:17:10 WDMyCloud logger: exit standby after 241 (since 2014-02-23 16:13:08.665498000 -0800)
Feb 23 16:53:18 WDMyCloud logger: exit standby after 1563 (since 2014-02-23 16:27:15.055498000 -0800)
Feb 23 17:32:58 WDMyCloud logger: exit standby after 1775 (since 2014-02-23 17:03:23.615498000 -0800)
Feb 23 19:55:03 WDMyCloud logger: exit standby after 7919 (since 2014-02-23 17:43:04.055498000 -0800)
exec: No such file or directory
exec: No such file or directory
Feb 23 20:25:10 WDMyCloud logger: exit standby after 293 (since 2014-02-23 20:20:16.975498000 -0800)
Feb 23 21:54:00 WDMyCloud logger: exit standby after 1700 (since 2014-02-23 21:25:40.835498000 -0800)
Feb 23 22:05:10 WDMyCloud logger: exit standby after 65 (since 2014-02-23 22:04:05.655498000 -0800)
Feb 23 23:17:15 WDMyCloud logger: exit standby after 3720 (since 2014-02-23 22:15:15.535498000 -0800)
Feb 24 00:37:25 WDMyCloud logger: exit standby after 4205 (since 2014-02-23 23:27:20.675498000 -0800)
Feb 24 00:47:37 WDMyCloud logger: exit standby after 7 (since 2014-02-24 00:47:30.955498000 -0800)
Feb 24 02:56:57 WDMyCloud logger: exit standby after 7155 (since 2014-02-24 00:57:42.285498000 -0800)

Remember that these numbers are in seconds. With the WD Live the activity was documented in “messages”. For some reason they have removed both the wakeup logging and the reason from messages with Cloud.

The only thing remaining log is the user.log which gives us the wakeup times, but not the reason. I have been looking through the cron and I have my suspicions.

I’ve done the following to ensure max sleep:

1: The activities do not include any media scans as I’ve deactivated those.

  1. I do have cloud access

  2. media serving per shares are off except external USB drive.

4: turned off NTP service

  1. fixed ip, so no dhcp renewal

basically summerizing the above… 

3:52pm wakes up  after 8 seconds?

4:17pm wakes up after 4 minutes

4:53pm wakes up after 26 minutes

5:32pm wakes up after 29 minutes

7:55pm wakes up after 2 hours 12 minutes

8:25pm wakes up after 5 minutes

9:54pm wakes up after 28 minutes

10:05pm wakes up after 1 minute

11:17pm wakes up after 10 minutes

12:37pm wakes up after 1 hour 10 minutes

12:47pm wakes up after 7 seconds

 2:57pm wakes up after 2 hours

At 3:05am everyday…

from the “messages” log

Feb 24 03:05:02 WDMyCloud kernel: [49136.321978] md: md0 stopped.
Feb 24 03:05:03 WDMyCloud kernel: [49137.497996] md: cannot remove active disk sda1 from md1 …
Feb 24 03:05:03 WDMyCloud kernel: [49137.553988] md: cannot remove active disk sda2 from md1 …
Feb 24 03:05:04 WDMyCloud kernel: [49138.659141] EXT4-fs (sda4): re-mounted. Opts: user_xattr,barrier=0,data=writeback,noinit_itable,init_itable=10

and from the user.log

Feb 24 03:05:01 WDMyCloud logger: disable lazy init

In a 12 hour span, the device has basically woke up 12 times. While its true that my WD Live did last more then 2 years with the same spin up time, I am really concerned.I might be able to accept a wake up time of 2 hours but the ones that really concerns me are the 8 seconds, 4 minutes, 5 minutes, 1 minute, 10 minutes and 7 seconds. 

While it is true, the more expensive NAS servers may be constantly running, jobs in the background, bit torrents downloading files, Web servers serving etc. the WD Cloud represents a new generation of cheaper Cloud systems that is similar to a TV, a home stereo or an iPad.

When my Mac/PC sleeps, it does not wake up every hour to defrag my hard drives and we expect the same from the Cloud that it doesn’t wake up in the middle of the night to watch movies.

Lets get this fixed? it has been several years since the release of the WD Live and now the Cloud, isn’t it about time we get some sleep?

So in my infinite wisdom, I figure the problem must be in the cron (the job scheduler). Shut down the cron and all the jobs will not be scheduled… right?

/etc/init.d/cron stop

and then I went to bed…

Feb 24 05:54:58 WDMyCloud logger: exit standby after 7 (since 2014-02-24 05:54:51.075498000 -0800)
Feb 24 07:09:28 WDMyCloud logger: exit standby after 3865 (since 2014-02-24 06:05:03.765498000 -0800)
Feb 24 07:26:28 WDMyCloud logger: exit standby after 415 (since 2014-02-24 07:19:33.945498000 -0800)
Feb 24 09:02:52 WDMyCloud logger: exit standby after 5179 (since 2014-02-24 07:36:33.725498000 -0800)
Feb 24 09:32:46 WDMyCloud logger: exit standby after 1189 (since 2014-02-24 09:12:57.595498000 -0800)
exec: No such file or directory

5:54 7 seconds

7:09 1 hour 4 minutes

7:26 7 minutes

9:02  1 hour 26 minutes

9:32  about 20 minutes

so please tell me why?

well since WD thinks I’m a pain in the a**, I’ll have to be happy with the fact that it even sleeps occasionally. 

Although during the day, I’ve decided to turn it on always and turn off the LED light. 

I’ve been searching the script files to see if I can change the hard coded 10 minute value for sleep but have been unsucessful.  WD Live use to give us a variable time slider that allowed us to set from 10 minutes to an hour. My preference is an hour since my activities vary. 

So if anyone knows where this 10 minute value is set, it would be appreciated.

I’m new here and I have made a thread of my own on this, but i’ll just share my recent discoveries with you in this thread as well. After becoming aware of this “feature” i checked my log (the one you can save to your PC from Dashboard) and lo and behold: On feb. 18 it had 67…67! exit standby’s The longest sleep was 1319 seconds (21 mins.) The shortest 6 secs.  And this was on a day where i was away for about half a day and my PC was off during this time (as in shut off, no sleep), same with TV and other network devices. The past week (the log doesen’t go further back than that) the average exit standby’s is around 50/day.

Everything is as when it came out of the box, and DLNA is ON.

To be honest i don’t know if has been doing this from the beginning but i remember that whenever I was looking at the device (without actively accessing the device) the blue LED was pulsating. Maybe i accidentally only looked on the device when it was actually in sleep mode - seems a bit unlikely though.

Some things like the media scan will probably not be active at the begining, but the media scan would probably be the worse for waking the device up.

Media Scan? It did the indexing at the beginning and took a day or so to finnish.
Is media scan and indexing two different things?

Actually I have no idea what WD media scans/indexing is doing. However I do know that they create thumbnails for photos and leave a hidden directory with probably a empty filename (which is the index) in every single directory your have.

Also I know they have a mechanism that list all your filenames everyday to see what files has been added and thus something scans the new media so it can be listed in DLNA, Twonky or iTunes.

To me this is worse then the Microsoft utilities that does their virus scans and the indexing program. I leave my computer alone for a few minutes and then my hard drive is clicking away without me. The worst program yet was the Norton viral utilities that simply takes over your computer every single day. 

The first thing I do with any PC is to ensure these services are deactivated and this is the first thing I do when I buy a WD Cloud now. I don’t use DLNA, nor Twonky, nor itunes and not having a thumbnail for the photos is just fine by me.

So I was figure I would go “all out” with killing every service that I think is causing the interruption. Even if I killed the wrong service, all I need to do is pull the plug and the system would be restored since I’m only stopping the services on the current session.

I got this golean.sh script from the WD Live forum last year and have adapted it to the Cloud adding the wdnotifierd, wdmcserverd and wddispatcherd without really knowing what these services do. The other services are common linux services which I don’t use but things like the time machine, DLNA may not work once these services are stop.

So here is my golean.sh

#!/bin/bash

/etc/init.d/nfs-kernel-server stop

/etc/init.d/nfs-common stop

/etc/init.d/upnp_nas stop

/etc/init.d/mDNSResponder stop

/etc/init.d/wdphotodbmergerd stop

/etc/init.d/wdnotifierd stop

/etc/init.d/wdmcserverd stop

/etc/init.d/wddispatcherd stop

Once I save it, I chmod 755 golean.sh and I simply type golean.sh at the prompt to run it.

after this was done, I stopped one more service just for fun

/etc/init.d/cron stop

and this is the result from last nigh, after I stopped all the above services and

Turn on Energy Saver

ejected my Cloud mapped drive from my mac

and went to bed…

Feb 26 02:18:52 WDMyCloud logger: exit standby after 8 (since 2014-02-26 02:18:44.670000001 -0800)
Feb 26 02:38:40 WDMyCloud logger: exit standby after 583 (since 2014-02-26 02:28:57.170000001 -0800)
Feb 26 08:25:36 WDMyCloud logger: exit standby after 20211 (since 2014-02-26 02:48:45.900000001 -0800)
exec: No such file or directory

The initial one of 8 seconds always seems to be there. It is like just as the drive nods off to sleep, it just gets this nodding off and waking up type of effect.

Then it starts to settle in after another 10 minutes, then wakes up 10 minutes.

Then finally I get 5 hours and 36 minutes of device sleep. I did wake it up this morning as I wanted to check how it was doing so it could have gone a lot longer then the 5 and a half hour.

This goes to prove that something in those jobs are really messing up the device sleep and it can be done…

Continuation of the same test from yesterday… All the processes that were stopped yesterday remained stopped for the last couple of days; including the cron which meant no daily jobs were being executed during the day.

The most interesting part of my log is that initial 8 second wakeup. 10 minutes into the first sleep, the device wakes up exactly 8 seconds before finally settling into sleeping fitfully throughout the night.

Feb 26 22:18:04 WDMyCloud logger: exit standby after 8 (since 2014-02-26 22:17:56.780000001 -0800)
Feb 26 23:48:45 WDMyCloud logger: exit standby after 4836 (since 2014-02-26 22:28:09.350000001 -0800)
Feb 27 00:48:01 WDMyCloud logger: exit standby after 2950 (since 2014-02-26 23:58:51.100000001 -0800)
Feb 27 01:18:06 WDMyCloud logger: exit standby after 1200 (since 2014-02-27 00:58:06.670000001 -0800)
Feb 27 03:30:03 WDMyCloud logger: exit standby after 7312 (since 2014-02-27 01:28:11.940000001 -0800)
Feb 27 09:20:06 WDMyCloud logger: exit standby after 20397 (since 2014-02-27 03:40:09.030000001 -0800)
exec: No such file or directory

The numbers are better in the sense that at least we are not waking up every 7-95 seconds after the drive spins down and we actually get a good 5 hours and 40 minute sleep. 

I don’t have the drive mapped to my Mac in the morning but I kept an eye on the slow blinking blue light of the drive and noticed that it woke itself up at 9:20 despite no access from my Mac (PC is off).

I was hoping for a solid night sleep, no wakeups at all, then I could write a script that upon wakeup to start up the services that I had stopped. However, even though, the sleep logs are impressive they are not what we want from a sleeping device; we would like a solid sleep through even if we don’t access the drive for a month, there should be no record of it waking up for the entire time.

So seeing that my ramlog doesn’t get saved to the hard drive every night because the cron is stopped, I decided to turn on the cron for the afternoon and got the following results for 6 hours

Turned on energy saver  around 12:40 and as you can see the device woke up at 8, 14 and 9 seconds after the drive spins down. Apparently with cron on, the longest sleep we get is 1 hour and 36 minutes. This 36 minutes after the hour seems like a pattern?

Feb 27 12:50:03 WDMyCloud logger: exit standby after 8 (since 2014-02-27 12:49:55.960000001 -0800)
Feb 27 13:00:22 WDMyCloud logger: exit standby after 14 (since 2014-02-27 13:00:08.540000001 -0800)
Feb 27 13:17:10 WDMyCloud logger: exit standby after 403 (since 2014-02-27 13:10:27.230000001 -0800)
Feb 27 13:27:25 WDMyCloud logger: exit standby after 9 (since 2014-02-27 13:27:16.400000001 -0800)
Feb 27 14:54:26 WDMyCloud logger: exit standby after 4615 (since 2014-02-27 13:37:30.990000001 -0800)
Feb 27 15:44:49 WDMyCloud logger: exit standby after 2418 (since 2014-02-27 15:04:31.640000001 -0800)
Feb 27 17:18:49 WDMyCloud logger: exit standby after 5035 (since 2014-02-27 15:54:54.650000001 -0800)
Feb 27 19:04:59 WDMyCloud logger: exit standby after 5765 (since 2014-02-27 17:28:54.830000001 -0800)

Seriously, this 7, 8, 9 and 14 seconds waking up of the drive after it spins down is definitely not a good thing. There is something in your code that suddenly notices that the drive is spinning down and spins it back up (and it takes between 7-20 seconds to notice).

hi Ralphael,

I appreciate all your posts on the MyCloud, they are very helpful. I enjoy your methodical approach as well.

I see similar behaviour:

Feb 27 03:15:15 WDMyCloud logger: exit standby after 7 (since 2014-02-27 03:15:08.473690000 -0800)
Feb 27 03:27:13 WDMyCloud logger: exit standby after 112 (since 2014-02-27 03:25:21.043690000 -0800)
Feb 27 04:35:10 WDMyCloud logger: exit standby after 3471 (since 2014-02-27 03:37:19.023690000 -0800)
Feb 27 05:00:53 WDMyCloud logger: exit standby after 938 (since 2014-02-27 04:45:15.833690000 -0800)
Feb 27 05:35:36 WDMyCloud logger: exit standby after 1478 (since 2014-02-27 05:10:58.763690000 -0800)
Feb 27 06:40:10 WDMyCloud logger: exit standby after 3269 (since 2014-02-27 05:45:41.553690000 -0800)
Feb 27 06:57:52 WDMyCloud logger: exit standby after 457 (since 2014-02-27 06:50:15.213690000 -0800)
Feb 27 07:09:42 WDMyCloud logger: exit standby after 105 (since 2014-02-27 07:07:57.623690000 -0800)
Feb 27 07:23:14 WDMyCloud logger: exit standby after 207 (since 2014-02-27 07:19:47.643690000 -0800)
Feb 27 09:03:24 WDMyCloud logger: exit standby after 5405 (since 2014-02-27 07:33:19.773690000 -0800)
Feb 27 09:17:10 WDMyCloud logger: exit standby after 220 (since 2014-02-27 09:13:29.983690000 -0800)
Feb 27 09:28:32 WDMyCloud logger: exit standby after 77 (since 2014-02-27 09:27:15.573690000 -0800)
Feb 27 09:38:51 WDMyCloud logger: exit standby after 13 (since 2014-02-27 09:38:38.103690000 -0800)
Feb 27 09:49:09 WDMyCloud logger: exit standby after 13 (since 2014-02-27 09:48:56.693690000 -0800)
Feb 27 09:59:22 WDMyCloud logger: exit standby after 7 (since 2014-02-27 09:59:15.123690000 -0800)
Feb 27 10:11:52 WDMyCloud logger: exit standby after 145 (since 2014-02-27 10:09:27.683690000 -0800)

One thing I’m wondering, how do we know that these entries are showing the HDD sleep cycle, and not some other standby / alive process? (maybe I missed this in an earlier post). Also, it would be interesting to correlate the sleep timing in this log an audible indication that the drive is spinning and the indicator is flashing (or solid).

I wonder if the 3:05AM logs you see each day is related to the auto firmware-update… it seems the default time for that is 3AM… this is what I see in my log there:

Feb 27 03:00:03 WDMyCloud logger: Trigger auto-update
Feb 27 03:00:03 WDMyCloud updateFirmwareToLatest.sh:02/27/14 11:00:03:: ( reboot )
Feb 27 03:00:03 WDMyCloud /usr/local/sbin/updateFirmwareToLatest.sh: no upgrade
Feb 27 03:05:01 WDMyCloud logger: disable lazy init

For anyone curious, these entries are found in the user.log under /var/log

Thank you.

cheers,

Sean

@bigstorage

I’ve been so obsessed with my cloud these days that I actually watch it and touch it for spin ups and spin downs. Although I don’t  watch through out the night, I can correlate the begining and end cycles with the timings.

For the 7 second spin down, I do not know if they actually spin down then immediately spin back up but I would guess that the 1 or 2 minutes exits do.

So lets assume that the log entries do indicate the correct spin down and ups since I have monitored these at the begining and end.

Looking at your Log, the two 7 seonds, and two 13 seconds are disconcerting.  The longest is an hour and forty five minutes.  In a 7 hour span, your device has spinned down 16 times. 

I agree with you with the 3:05 auto update, except on mine I have turned it off at the panel but yet it continues to wake up at 3:05 and attempts to remove active disk sda1 from md1 and remove active disk sda2 from md1. 

I do think that WD should seriously take a look at creating a device that actually sleeps.

hi Ralphael,

Thanks for your feedback, and for confirming the correlation between log entries and drive sleep cycles (or more accurately nap cycles!).

cheers,

Sean

So since I have been a programmer for a large portion of my life (burnt out at the moment), I’ve decided to take on this huge undertaking of delving into the WD code which was really surprising since it is all written in Script.

I’ve already found the *stupid* “disable lazy init” logger message followed by the mount -o remount, noinit itable $dataVolumeDevice.

The reason that I say *stupid* is that I have my autoupgrade turned off, yet this script 20-checkRaid.sh continues to execute regardless of the upgrade status resulting in the following messages

In messages

Feb 25 03:05:02 WDMyCloud kernel: [135562.621082] EXT4-fs (sda4): re-mounted. Opts: user_xattr,barrier=0,data=writeback,noinit_itable
Feb 25 03:05:02 WDMyCloud kernel: [135562.656946] md: md0 stopped.
Feb 25 03:05:03 WDMyCloud kernel: [135563.877265] md: cannot remove active disk sda1 from md1 …
Feb 25 03:05:03 WDMyCloud kernel: [135563.940744] md: cannot remove active disk sda2 from md1 …
Feb 25 03:05:04 WDMyCloud kernel: [135565.037492] EXT4-fs (sda4): re-mounted. Opts: user_xattr,barrier=0,data=writeback,noinit_itable,init_itable=10

in user.log

Feb 25 03:05:01 WDMyCloud logger: disable lazy init

The other interesting code is monitorio.sh which contains the snippet of code that causes the blue led light to blink slowly and the actual issuing of the hdparm -y sda4 which puts the hard drive into standby. You can SSH into the device and put the drive to sleep by typing

hdparm -y /dev/sda4   <==== puts drive into standby

hdparm -C /dev/sda4      <== queries drive usually active/idle when active.

Now Monitorio.sh has a function called file_tally() of which someone in the WD Live forum posted up a script edit that renamed the existing file_tall() to file_tally_old() and created a new file_tally() {} that did nothing.

Now I’m not convinced that simply dummying out the function will stop the consequences of the file_tally but I’m following the logic.

file_tally checks if any files has changed and has a TALLY_TRIGGER_THRESH_KB of 1,000,000 size change? Theorectically file_tally scans through your media files to do this which of course triggers your drive out of standby, which if there are changes and it exceeds the Tally Trigger Threshold then it starts up the MEDIACRAWLER REWALK…

and also in the mismash of code a comment says "this will allow individual components to register for wakupevents, run-parts /etc/nas/wakeup.d

what a mess :frowning:

I had a phone call from WD Support, and the fellow told me that the quick sleep/wake cycle issue is something they are aware of and is work-in-progress. No indication of if/when a solution might be available however.

bigstorage wrote:

 

I had a phone call from WD Support, and the fellow told me that the quick sleep/wake cycle issue is something they are aware of and is work-in-progress. No indication of if/when a solution might be available however.

 

 

WD Support says that to all of our problems :stuck_out_tongue:

“It is a work-in-progress”

and its not that I don’t believe them but they have been saying that since 2011 with the WD live drive. 

For the interim though, I’ve whittle down as of the problem as much as I can and provided myself with a solution. This is probably my final words on this as I cannot proceed any further.

Thanks for keeping me updated. 

solution: Monitorio and the 7 second wake up