A Windowsserver provides a network directory called data via CIFS/SMB protocol. The data folder is mounted on a Linux client with password and user authentification.
Sometimes the drive gets disconnected, but is available again after a second. I do not know exactly why, but it seems to be because of the Windows server or a broken network component.
How can I make Linux reconnect automatic as soon as possible?
Best Answer
I'd recommend mounting it via
autofs
. This is a service that will mount a directory on demand (for example if youcd
into it orls
it) and unmount it automatically after a user defined timeout.Install the
autofs
package for your distribution (by the way, remember to include your distro in your questions since an answer's details may depend on it).Add the following to /etc/auto.master
Where
/media/[my_server]
is the mount point of the share.Create a file /etc/autofs/auto.[my_server] with this line:
For more information see here and here.