bicklp
Posts: 10
Joined: Sat Sep 12, 2015 7:58 am

CIFS Mounted drive becomes unresponsive

Sat Sep 12, 2015 8:09 am

Morning

i have a pi 2 running Rasbian.
i have a windows 10 box with 3tb usb drive which is shared with no credentials needed

i mount this on my pi in fstab on boot using cifs
//192.168.1.15/nas /media/nas cifs guest,uid=1000,iocharset=utf8 0 0
after booting up this work great. i can navigate to /media/nas and get all the files on my windows usb drive.

The problem
after a certain amount of time. Not sure how long, if i ssh back onto my pi i can no longer access the usb drive, in fact if i even try to run an ls -l in the /media directory the pi just sits there, i can't control-x out or anything? i can quit the shell and reconnect and can browse anywhere else, the pi is totally responsive apart from the mount point. apache still running, openvpn still running. The share is still accessible on the network from my mac and my nexus 7

things I've tried.
umount /media/nas this says the drive is busy
umount -l /media/nas this unmount works ok
mount -a this then just sits there like when i try and list the contents, i have to quit the terminal and connect again

a reboot fixes the problem, I can browse the mount again straight away...it just seems to timeout after a certain amount of time...not even sure how long

what i m currently trying.
I've added a cronjob to echo a textfile that is on the mount, every 10 minutes...really don't want to do this, would prefer to know what the problem is...not even sure its going to work either...

Im not an expert by any means....

any help would be appreciated

Thanks

Phil


****SOLVED thanks to JimmyN
USB hard drive was 'selective sleeping' on windows 10 machine

To change individual items (custom plan) go to Control Panel>System and Security>Power Options and see which plan is selected. Click on the "Change plan settings" link for it.

When the "Change Settings" dialog box comes up click on the "Change advanced power settings" link. Scroll down the list to "USB Settings>USB selective suspend setting". It will likely show "Setting: Enabled". Click on that and change it to "Disabled". Click "Apply" then "OK" your way back out of everything and you should be set, it will no longer power down the USB root hubs.
Last edited by bicklp on Mon Sep 14, 2015 11:57 am, edited 1 time in total.

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: CIFS Mounted drive becomes unresponsive

Sat Sep 12, 2015 9:42 am

Use dmesg to list kernel messages and look in /var/log/sys log after the mount has become unresponsive - there may be some clues there.

Can you still ping the remote machine when the mount has stopped responding? This would rule network problems out (or in).

bicklp
Posts: 10
Joined: Sat Sep 12, 2015 7:58 am

Re: CIFS Mounted drive becomes unresponsive

Sat Sep 12, 2015 3:42 pm

Thanks...im still learning how to understand the logs.
The network is fine as far as pinging goes and i can ssh in also..

But I saw another post like mine that said it might be to do with the wifi adapter dropping packets

I was using a wifi dongle so I have moved it over to ethernet and so far no drops...it normally drops at night if its not been used for a long time so I will see what happens tonight

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: CIFS Mounted drive becomes unresponsive

Sat Sep 12, 2015 4:40 pm

bicklp wrote:... so far no drops...
Have you disabled the cron job that you mention in the op? If not then you're not comparing like with like and may end up writing off the wireless connection unnecessarily.

bicklp
Posts: 10
Joined: Sat Sep 12, 2015 7:58 am

Re: CIFS Mounted drive becomes unresponsive

Sat Sep 12, 2015 5:08 pm

Ye that's done.

Nothing scheduled running now. It's just sat. I'll try logging in again first thing and see what happens.

bicklp
Posts: 10
Joined: Sat Sep 12, 2015 7:58 am

Re: CIFS Mounted drive becomes unresponsive

Sat Sep 12, 2015 7:53 pm

so checked at 8.50 pm ... so about 5 hours and the share was down...
rebooted and ok again.

setting the cron job now to run every 10 mins overnight

will check again in morning...see what happened

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: CIFS Mounted drive becomes unresponsive

Sat Sep 12, 2015 9:08 pm

Does the windows machine go to sleep? It sounds as though the session is dropping and failing to reestablish itself, possibly after a network blip. The output from dmesg will probably show a thread repeatedly timing out.

bicklp
Posts: 10
Joined: Sat Sep 12, 2015 7:58 am

Re: CIFS Mounted drive becomes unresponsive

Sun Sep 13, 2015 1:59 pm

The Cron job kept everything working ok.

No the windows machine is not sleeping...and the network power management is off too

these are in dmesg

22.024100] tun: Universal TUN/TAP device driver, 1.6
[ 22.024121] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[ 22.595871] uart-pl011 3f201000.uart: no DMA platform data
[ 24.894918] cfg80211: Calling CRDA to update world regulatory domain
[ 28.054976] cfg80211: Calling CRDA to update world regulatory domain
[ 31.214988] cfg80211: Calling CRDA to update world regulatory domain
[ 34.374995] cfg80211: Calling CRDA to update world regulatory domain
[ 37.534990] cfg80211: Calling CRDA to update world regulatory domain
[ 40.695043] cfg80211: Calling CRDA to update world regulatory domain
[ 43.855047] cfg80211: Calling CRDA to update world regulatory domain
[ 47.015039] cfg80211: Calling CRDA to update world regulatory domain
[ 50.175076] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
[ 383.018705] CIFS VFS: Server 192.168.1.15 has not responded in 120 seconds. Reconnecting...
[ 4353.598608] CIFS VFS: Server 192.168.1.15 has not responded in 120 seconds. Reconnecting...

and then these from the syslog

Sep 13 12:31:03 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.
Sep 13 12:31:14 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.
Sep 13 12:31:14 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.
Sep 13 12:31:15 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.
Sep 13 12:31:15 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.
Sep 13 12:31:15 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.
Sep 13 12:31:16 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.
Sep 13 12:31:16 pi-server avahi-daemon[2448]: Invalid response packet from host 192.168.1.15.

looks like something to do with the windows box maybe, going to attach the usb drive to another machine and see what happens

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: CIFS Mounted drive becomes unresponsive

Sun Sep 13, 2015 6:03 pm

I'm inclined to think it's the USB drive powering down. You can set power management in Windows for drives, but that doesn't help with a USB drive, as the problem is Windows management may power down the USB root hub. So it abides by your power down setting of choice, and doesn't power down the drive itself, but it may still power down the USB hub that it's connected to so the end result is the same.

It depends on the power plan you have set for Windows. Yours is probably "Balanced" or "Power Saver".

To change individual items (custom plan) go to Control Panel>System and Security>Power Options and see which plan is selected. Click on the "Change plan settings" link for it.

When the "Change Settings" dialog box comes up click on the "Change advanced power settings" link. Scroll down the list to "USB Settings>USB selective suspend setting". It will likely show "Setting: Enabled". Click on that and change it to "Disabled". Click "Apply" then "OK" your way back out of everything and you should be set, it will no longer power down the USB root hubs.

Of course if it's a notebook and power usage is a concern you may not want to disable USB power management since you can't control individual root hubs, it's an all or nothing setting.

bicklp
Posts: 10
Joined: Sat Sep 12, 2015 7:58 am

Re: CIFS Mounted drive becomes unresponsive

Sun Sep 13, 2015 6:20 pm

I gotta say i have been using windows in one form or another for what seems like forever and i didn't even know that USB power setting was in there !! mental !!

re the rest of my settings, I'm on 'High Performance', but the USB suspend settings was still set to enabled !!

Ive just set it to disabled now...ive disabled the cron job again and I'm going to leave it and see what happens now

bicklp
Posts: 10
Joined: Sat Sep 12, 2015 7:58 am

Re: CIFS Mounted drive becomes unresponsive

Mon Sep 14, 2015 11:58 am

Solved ! Thanks JimmyN

USB drive was set to selective sleep in windows 10. Disabled that and now everything ok

Return to “Troubleshooting”