WDTV always connected to NAS?

Hi,

I’m using a shared folder on a QNAP nas as media library . 

I noticed that the NAS doesn’t go on stand by when the WDTV is plugged-in, even if it is in stand by. Is it possible that the WDTV keeps the network share “busy” even in stand by? 

Is there anything to do to modify this behaviour? 

In your QNAP, enable Samba logging and see what it’s doing.

pjfry wrote:

Hi,

I’m using a shared folder on a QNAP nas as media library . 

I noticed that the NAS doesn’t go on stand by when the WDTV is plugged-in, even if it is in stand by. Is it possible that the WDTV keeps the network share “busy” even in stand by? 

Is there anything to do to modify this behaviour? 

The way the SMP works is by mounting the SMB/share (just like a local filesystem), so yes, it stays connected when in standby since that turns off little (so it works instantly).  I don’t recall the SMP sending any packets unless it needs something, but Samba does consider it connected.  E.g., looking at my Samba server right now shows an IPC process for our upstairs SMP running since May 6.  While that SMP has been on the entire time, I don’t think standby changes anything really.

Try turning the unit off (really off) instead.  But then you will have to wait for unit to restart, connections to be re-established, etc.

I thought one of the points of having an NAS was to avoid the electricity cost of running a PC.  You don’t even want that, though?  You just cannot have servers turning off and also have instant access.  Choose one.

Hi ncarver, 

I think that the stand by is an important feature of a NAS: it helps lowering the electricity cost and increasing the lifetime of the disks.

Of course I could accept a ‘not instant’ access when I turn on the wdtv from the stand-by.

I will try to check the smb logs anyway.

try a long press - 5 seconds on power button when you turn off WD

that should put it into a deep sleep, turning off the WD’s nic

also if that fails there’s a setting for 3 hr sleep, which does the same thing, make sure that is enabled in settings

Yesterday I tried to enable the smb logs on the NAS. I need to do further testings because at first view I don’t see any ‘persistent’ connection from the WDTV user. 

Try running the smbstatus command to see samba clients.  Googling showed that you should be able to run that command on a qnap device.  With smbstatus I see processes for both of our SMP devices, with the oldest having been running since May 6 for one SMP, another for that SMP from May 8, and a couple for the other SMP from May 12 (when I rebooted that box and played videos).   Since it is now May 14, I would call those connections quite persistent (since there are running processes dedicated to them).  Running netstat, I also see established TCP connections for both SMPs to the processes listed by smbstatus.  Yup, the SMPs have persistent connections to samba.

OK I’ll try try and post the results. Thanks for your help.

uhm… I don’t understand. 

I turned on the NAS and it went in stand-by after 10 minutes, as expected.

Then I plugged in the WDTV: as expected, it started checking the media library and woke up the NAS.

Then I tried to shut down the WDTV by long-pressing the power button (on the remote, right?? I don’t see any buttons on the device :confounded: )

After a couple hours I came to check the NAS, which is not in stand by:

[~] # /usr/local/samba/bin/smbstatus

Samba version 3.6.23
PID Username Group Machine

Service pid username adderess machine Connected at
QNAP need start--------------------------------------
QNAP need end--------------------------------------

No locked files

Also I don’t see any connections to the WDTV IP using netstat. 

 ---------------

update: my wife’s pc attempted to connect to the nas during the ‘couple hours’, so it could have woken up the disks… I gotta test again, tomorrow :dizzy_face:

Samba connections are not persistent in that way.  They close when transfers are completed, so smbstatus is only going to list files that are currently open and/or locked.

You need to look in the samba logs in the QNAP interface, which will show you logins & file activity over time.

a better test today.

WDTV off (long press) → qnap stand by, OK

WDTV in stand by → qnap active

the last activity from WDTV is at 21:41, now is 23:33

[~] # /usr/local/samba/bin/smbstatus

Samba version 3.6.23
PID Username Group Machine

Service pid username adderess machine Connected at
QNAP need start--------------------------------------
QNAP need end--------------------------------------

No locked files

[~] # netstat -an | grep 136
tcp 0 0 192.168.1.132:37281 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:37287 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:37278 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:37279 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:37285 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:37283 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:37284 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:37277 192.168.1.136:10184 TIME_WAIT
netstat: tcp 0 0 192.168.1.132:445 192.168.1.136:54124 ESTABLISHED
no support for `AF INET6 (tcp)’ on this system.
netstat: tcp 0 0 192.168.1.132:37282 192.168.1.136:10184 TIME_WAIT
tcp 0 0 192.168.1.132:445 192.168.1.136:54123 TIME_WAIT
tcp 0 0 192.168.1.132:37288 192.168.1.136:10184 TIME_WAIT

I don’t like this but that’s it :slight_smile: