You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

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.

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?