LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Mounting windows shares generally unstable in debian (https://www.linuxquestions.org/questions/linux-networking-3/mounting-windows-shares-generally-unstable-in-debian-4175444474/)

yzfr1 01-07-2013 04:44 AM

Mounting windows shares generally unstable in debian
 
Hi guys,

For a long time I've had significant problems mounting and using the shares from my windows server on my debian machines. I can mount them just fine, but get problems not using them for a while (a few hours?), or when coming back from suspending/hibernating. What happens is that the directory where I've mounted the share becomes completely unresponsive and unusable, running for example "ls /mnt/server" just hangs, and not even CTRL-C works to cancel the command. What I then do is to run "umount -l /mnt/server" which does manage to unmount it after a while. After this I either have to wait a significant number of time (may be anything from 30 minutes to an hour or two) or just reboot to be able to mount it again. If I try remounting straight away the mount command just hangs.

It's also a bit curious, when suspending/hibernating the problem only occurs if I let it sit for at least a minute or two, if I resume straight away then it still works. This seems related to the network connection as well, if I make a change in the connection (by disconnecting, connecting to a VPN, change from wlan to ethernet) then this also happens, but also if the change is for more than a few seconds (ie, disconnecting from wlan and then reconnecting immediately doesn't have an effect, but disconnecting, waiting a minute or two and then reconnecting does cause the problem).

The last part of the problem, which isn't as important or annoying as the previously mentioned, is that when rebooting/shutting down the computer will hang for 10-15 minutes attempting to unmount the shares (in the script /etc/init.d/umountnfs.sh after the debug line "Unmounting remote and non-toplevel virtual filesystems"). This problem I believe is caused by the fact that the cifs daemon is killed before the umount procedure, causing it to wait for some kind of timeout before continuing. This I can solve by simply writing a script to umount the shares before shutting down, but the other problem is the one I'm not sure how to fix.

This is my fstab entry for one of my shares:

Code:

//SRV001/D        /mnt/srv001/d        cifs        auto,rw,_netdev,users,nobrl,uid=user,gid=user,iocharset=utf8,file_mode=0644,dir_mode=0755,credentials=/home/user/.srvcreds        0 0
I'm running Debian Wheezy and have this problem on all my debian machines. It does however work perfectly in Ubuntu, when mounting the exact same way (the line above), with cifs-utils and smbclient installed.

Now my question is, Is there a better way to mount windows shares in debian? I can't imagine these problems being acceptable in corporate environments for instance, so is there a more 'stable' way to mount windows shares? Anyone with ideas as to how I might solve this?

Cheers

pan64 01-07-2013 06:57 AM

I'm nor really sure, but it looks like some auto* feature, which conflicts with the normal mount (probably gnome?)

yzfr1 01-07-2013 07:10 AM

Quote:

Originally Posted by pan64 (Post 4864521)
I'm nor really sure, but it looks like some auto* feature, which conflicts with the normal mount (probably gnome?)

Thanks for your reply mate. I'm not sure what you mean by "auto* feature", but regarding gnome, I experience the same problem even without having X installed, which effectively rules that out.


All times are GMT -5. The time now is 06:15 AM.