WD Live wakes from sleep every 30 minutes whenever an AFP share is mounted

You can also watch the log file “live”. Enable SSH, then log into your Mybook and type

    tail -f /var/log/messages

The last few lines of the file will be shown and additional lines will be shown as soon as some process on the Mybook writes them to this file.

Hi,

I would like to be able to look at my logs.

Would you mind telling me how to enable SSH, and logging into MBL?

Thanks a lot.

It’s easy to enable ssh on the MBL.  You should also disable SSH when you are done looking around - as it is a security risk to leave it enabled.

Open the normal http://MyBookLive web page  ( http://MyBookLive.local - if using a Mac)

Log in to the UI as you normally would.

After successful login - change the url to http://MyBookLive/ssh   (or http://MyBookLive.local/ssh - on a Mac)

This will bring up the hidden ssh enablement dialog.  Check the enable box and note the default password for root login.

If you are on a Mac - go to Applications/Utilities and open the Terminal app.

At the command prompt type:   sudo ssh MyBookLive.local

When it asks for password - enter your Mac login password  (you must be logged into Mac using an admin login)

Next it will ask you to enter the password for root

Enter the password that you saw on the SSH enablement dialog window when you enabled ssh.

The log files are in the /var/log directory.  The log file we are looking at in this thread is called messages.

On windows you may need an ssh utility to ssh to the drive.

In the examples in my post - substitue your actual MBL drive name in place of MyBookLive.

Here is the log from one of my MBL’s after upgrading to 02.03.01-024.  I am still seeing the wake every 30 minutes after mounting a share on a Mac - even after the Mac has gone to sleep.  Previously I stated that the MBL wasn’t sleeping for 8 hours after mounting a share and after the 02.03.01-024 upgrade - apparently the 30 minute timing is off by 5 minutes and I was looking at the drive at the wrong time - assuming it was constantly awake.  So nothing has really changed with the new firmware - regarding this isssue.  My comments are to the right of the ← for easier viewing.  The wake/sleep pattern does in-fact stop as soon as the share is no longer mounted.

Nov  8 16:31:06 localhost logger: Enter standby                    ← Sleeping

Nov  8 21:47:32 localhost logger: exit standby after 18986  ← Wake after 4 hours

Nov  8 21:58:36 localhost logger: Enter standby                    ← Entering Standby after 10 min

Nov  8 22:51:54 localhost logger: exit standby after 3198    ← Wake because I mounted a share on Mac

Nov  8 23:08:28 localhost logger: Enter standby                    ←   Sleep after 16 min

Nov  8 23:22:55 localhost logger: exit standby after 867      ← Wake ~23 past hour

Nov  8 23:35:09 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  8 23:53:01 localhost logger: exit standby after 1072    ← Wake 53 past hour

Nov  9 00:13:10 localhost logger: Enter standby                    ←   Sleep after 20 min

Nov  9 00:23:01 localhost logger: exit standby after 591      ← Wake 23 past hour

Nov  9 00:35:07 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  9 00:53:01 localhost logger: exit standby after 1074    ← Wake 53 past hour

Nov  9 01:05:07 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  9 01:23:01 localhost logger: exit standby after 1074    ← Wake 23 past hour

Nov  9 01:35:07 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  9 01:53:01 localhost logger: exit standby after 1074    ← Wake 53 past hour

Nov  9 02:05:07 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  9 02:22:29 localhost logger: exit standby after 1042    ← Wake ~23 past hour

Nov  9 02:34:35 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  9 02:53:01 localhost logger: exit standby after 1106    ← Wake 53 past hour

Nov  9 03:05:07 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  9 03:23:01 localhost logger: exit standby after 1074    ← Wake 23 past hour

Nov  9 03:35:07 localhost logger: Enter standby                    ←   Sleep after 12 min

Nov  9 03:53:01 localhost logger: exit standby after 1074

Nov  9 04:13:10 localhost logger: Enter standby

Nov  9 04:23:01 localhost logger: exit standby after 591

Nov  9 04:35:07 localhost logger: Enter standby

Nov  9 04:53:00 localhost logger: exit standby after 1073

Nov  9 05:05:07 localhost logger: Enter standby

Nov  9 05:23:01 localhost logger: exit standby after 1074

Nov  9 05:35:07 localhost logger: Enter standby

Nov  9 05:53:01 localhost logger: exit standby after 1074

Nov  9 06:05:07 localhost logger: Enter standby

Nov  9 06:23:01 localhost logger: exit standby after 1074

Nov  9 06:36:08 localhost logger: Enter standby

~Scott

Mounts are expired after a computer goes to sleep (or SHOULD be…)

This might sound like a dumb question, but are you sure your mac is actually OFF the NETWORK when it’s sleeping?

Macs (MacBookPro/MacBookAir/iMac) are sleeping.  A Mac does not entirely go off the network when it sleeps - (in a wired setup at least) the Mac will maintain the link signal - as it will respond (wake up) upon receiving a request from another device or application on the network.  In a wireless scenario (for a portable Mac) - the Mac will support the wake for network access provided the Mac is running on AC power. 

Please note (I believe I posted the infor below in an earlier post on this thread).

I mount a share on apple time capsule (AFP) - Time Capsule will sleep after 5 minutes - and will not wake until share is actually accessed - whether Mac is sleeping or not.

I can mount a share on DNS-323 (containing WD Drives) - mount is SMB - DNS-323 will spin down after specified sleep interval - and not wake until a file on the share is actually opened - whether Mac is sleeping or not.

I can mount a share from a Windows box on the MyBook Live (SMB) and the drive will spin down after specified sleep interval - and not wake until a file on the share is actually opened (whether PC is sleeping or not)

I mount a share on my Mac to any of my 3 MyBook Live drives - and the drive will not spin down after the 10 minute sleep interval initially.  It will eventually  sleep - but then proceed to wake every 30 minutes thereafter until there are no shares mounted via AFP from the drive on any Mac.

To make this more interesting - I happen to have the 3 MBL’s on a single switch off of my main switch.  I can pull the ethernet cable coming from the main switch to the secondary switch to which the MBL drives are connected.  At this point - nothing on my network is connected to any of the MBL’s - yet the drive to which the shares were mounted continues happily along - waking and sleeping every 30 minutes - not having any idea that is connected to a switch that goes nowhere - at that point I could turn the Mac off - and the MBL wouldn’t even know.

It seems that once an AFP share is mounted on a Mac - some type of flag is being set within the drive which is causing it to wake every 30 minutes - everything else (most other drive functionality) is disabled.

So - this is something that WD needs to look into.  You will be able to replicate this with any MBL and any Mac.  What I cannot tell you is whether this behavior is specific to Mac OS X Lion - because all Macs were already on Lion before I got the MBL’s thus no way to know whether the problem was present on OS X Snow Leopard or earlier.

In the case of Time Machine mounting the MBL for backup - this is mounting via AFP - but after backup completes - Time Machine unmounts the share - and the drive will sleep.

~Scott

Tony - to summarize the previous post into a couple of sentences - It appears that my other NAS drives remain in standby state until such time as the device which initially mounted the share actually attempts to open a file - regardless of whether the device holding the share is itself in a standby state.  Yet - the MBL appears to be waking up every 30 minutes as if to check whether the device with the mounted share is requesting anything - and if were actually waking to do that - should i really be spinning up the drive to perform that function?

Let me try specifically mounting a share to the MBL from the Mac using smb://MybookLive.local and see if the 30 minute wake no longer happens,  I have not specifically tested that scenario - come to think of it.

~Scott

We will have an additional fix to help with this sleep issue in the next firmware release.

Hello Tony

can you give details about the fix?

My Mybook never sleeps since I have enabled Twonky, even when I unplug it from the network. Also it constantly seems to be active (I can hear the hard drive crackling).

When Twonky is not enabled, it sleeps, but not reliably (seems to wake up occasionally, even when disconnected from the network).

Thanks very much  sbeattie2 !

Last night at 7pm I mounted a share from my Mac (OS X 10.7.2 Lion) via SMB specifically (smb://MyBookLive.local) and the MyBookLive behaved “normally” - for the mostpart.  That is it only woke one or two times during the night.  So the 30 minute wake seems to be AFP related.

Here is the log after mounting the share via SMB - up through this morning.

Nov  9 18:57:22 localhost logger: exit standby after 2216  ← Login and mount share via smb://MyBookLive.local

Nov  9 19:22:09 localhost logger: Enter standby                  ← Sleep

Nov  9 19:23:12 localhost logger: exit standby after 63       ← Wake (this is a little strange)

Nov  9 19:34:20 localhost logger: Enter standby                  ← Sleep

Nov  9 19:41:48 localhost logger: exit standby after 448     ← Not sure why it woke here

Nov  9 19:52:56 localhost logger: Enter standby                   ← Sleep

Nov  9 22:11:44 localhost logger: exit standby after 8328   ← Wake after 2hrs 20 min ?  Not sure why.

Nov  9 22:22:52 localhost logger: Enter standby                   ← Sleep

Nov 10 04:15:45 localhost logger: exit standby after 21173 ← wake after sleep for 6hrs ?  Not sure why.

Nov 10 04:26:54 localhost logger: Enter standby                   ← Sleep

Nov 10 08:21:30 localhost logger: exit standby after 14076  ← Wake after 4 hours when I logged in.

I hope this helps.

~Scott

Can somebody explain the numbers after the “exit standby after xxxxxxx”  are these the process id’s that cause the drive to “wake”?  Or do they signify some type of event id?

it’s time I guess

The additional fixed involved several components. Our communications manager was touching the Datavolume when it should not have been, and there was a bug in the monitorio.sh script where the io counter was not being cleared in some circumstances.

WDTony wrote:

We will have an additional fix to help with this sleep issue in the next firmware release.

Hi Tony - I installed the latest firmware from a couple of weeks ago 02.10.09-124.  I did not see any reference to this issue being addressed in this release.  The problem still occurs - (wake every 30 minutes) while an AFP mount is active.  I am assuming this did not make the release - can you confirm?

Scott

sbeattie2 wrote:

Can somebody explain the numbers after the “exit standby after xxxxxxx”  are these the process id’s that cause the drive to “wake”?  Or do they signify some type of event id?

It’s time in seconds since the last event. In your case since the drive went into standby.

Over the holidays I made some discoveries about the behavior of my Apple Time Capsule with regards to AFP mounted shares.  I don’t know if this will shed any light on the 30 minute wakeup issue with the MBL - but I think that what I observered with the Time Capsule behavior may prove important.

The Time Capsule does not have a user-defined option to control the inactivity period of when the drive spins down.  It appears that after about 3 minutes of inactivity the Time Capsule Drive will spin down - regardless of whether an AFP share is mounted on a Mac.  I believe this short timeout period is by design - as the Time Capsule is primarily intended as a backup device to be used with Time Machine and theoretically the Time Capsule should be sleeping most of the time.  Since time machine only requires the drive about once per hour - this short timeout make sense.  In other use cases - this short timeout could prove to be annoyting.

The Time Caspule is also a network drive where you can mount folders via AFP (the default) or via SMB - just as you can do with the MBL.  But here is the behavioral difference I noticed while carefully monitoring the Time Capsule over a period of time with an active share mounted via AFP.

After mounting a share (via AFP) the Time Capsul spins down after about 3 minutes - if you don’t access the share.  Every once in a while (can’t say whether it is 30 minutes or not) the Time Capsule will spin up for about 15 seconds and then spin down immediately.  I can only assume the Mac is asking the Time Capsule to validate that the share is still alive.  Since the 15 second spin up is so quick - it would most likely go unnoticed by someone who is not watching or listening for it.

This periodic short spin up and down - only seems to happen when there is an AFP share mounted on a Mac.  When the Mac that has the share mounted is sleeping - the drive does not spin up for 15 seconds.

Whenever a sleeping Mac is woken - and it has an AFP share mounted - the Time Capsule will also spin up for 15 seconds - either immediately or shortly after the Mac has woken.

If I mount the share via SMB - the Time Capsule does not spin up at all - as if it doesn’t seem to care whether the SMB share is still alive.

On the MBL the behavior is as follows:  (assuming the minimum 10 minute inactivity period)

The MBL will sleep after 10 minutes if the share is not access,  it will then spin up (for 10 minutes) every 30 minutes.

When the Mac - which has the share mounted via AFP - the MBL will spin up (possibly to validate the share?) and then remain spinning for at least 10 minutes - after which the 30 minute cycle of waking repeats.  But the wake always occurs at x:20 and x:50 hours.

The 30 minute wake also continues to occur - for 6 or more hours - even when the Mac that has the mounted share is sleeping - as well as when the MBL is completely disconnected from the network (if it is on its own switch and the cable connecting the switch to the rest of the network is pulled).

So what I was trying to point out here.  With SMB - the drives never spin up unexpectedly (whther MBL or Time Capsule).  With AFP - the Time Capsule spins up periodically for 15 seconds (on Mac Wake and while Mac is awake).  The MBL - wakes every 30 minutes - even when the connection to the network is removed.

I don’t know if this information will help WD troubleshoot the problem - or whether it is totally irrelevant - it is just the behavior that I observed.

~Scott 

I too have noticed the same behaviour, Macbook Pro 10.6 - while sleeping the Macbook seems to wake up the drive every 30 minutes. I will verify tonight with a packet analyzer that I have on my firewall whether there really is some kind of network traffic originating from the macbook pro.

I use most of the time SMB now since that didn’t cause any problems…

To ravelord - while you are monitoring this - you will notice also that if you happen to have your MBL on a secondary switch - you can unplug the switch from the rest of the network - and the MBL will still continue waking every 30 minutes - at this point - it’s not the Mac that is doing it - because the Mac is no longer talking to it.  If you don’t discconnect the MBL - and you shutdown the Mac - the waking stops.  What doesn’t make sense is how it is possible for the MBL to keep waking every 30 minutes when the switch it is connected to is physically disconnected from the rest of the network as well as from the Mac which has the share mounted.  It’s almost as if having a network link signal is satisfying the MBL that it is connected to the network.  What is making it wake if it is not the Mac sending it a request?

Also this waking is always at hh:20 and hh:50 past the hour.  When I monitor my Time Capsule with an AFP share mounted - although it wakes periodically - it’s not at 20 and 50 past.

There are also some weird things going on with AFP on the Mac side - ever since 10.6.8 - not sure whether these oddities are contributing to the MBL strange behavior.

~Scott

Strangely enough tonight it didn’t wake :slight_smile: I closed my Macbook at 23:30. So technically it woke up one time but that could be another device running in the house…

Jan 11 23:52:13 localhost logger: Enter standby
Jan 11 23:53:16 localhost logger: exit standby after 63
Jan 12 00:13:32 localhost logger: Enter standby
Jan 12 08:56:34 localhost logger: exit standby after 31381

Also, no traffic in my packet capture.

sbeattle2, maybe it is the other way around: some AFP related process on the MBL tries to verify the macbook pro’s mounted volume. That would explain why it is still waking when only connected to a secondary switch. I will check again tonight to see if it sends out any traffic to (not only my IP this time) anywhere on the LAN.