Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is the situation:
I have a server which is located in the basement. The server exports a few directories which I mount on my desktop using NFS. From time to time, the connection gets lost. The server is also not always on. I can't change that part, so I worked out a script which notifies me when it's going down, and when it's back up again. It also mounts everything back.
However.. As soon as I loose the connection, my desktop seems to be gone. KDE doesn't work, but I can use a few applications like Konsole, google-chrome, firefox, stuff like that. But the plasma-desktop around it hangs.
As soon as the connection gets back again, everything works. I have this issue only when my desktop is running while I loose the connection to the server. If it's down when I start my desktop, everything works properly. Unless the server comes alive, the nfs directories are mounted and the connection is lost again.
I'm not really sure if this is a networking case, it could also be KDE related, but I figured this was the most reasonable place to put my topic in.
Try mounting with the "bg,soft,intr" options. See "man nfs" for an explanation.
Also try unmounting the shares when they go away. "umount" won't work, and "umount -f" probably won't either, so try "umount -l". Try to stop any processes that are trying to use the mounts first. See the man page for umount for -f and -l.
In this situation, it might be best to use automount.,
If a connection is dropped, the mount will auto unmount - and hopefully solve the hanging problem..
Try mounting with the "bg,soft,intr" options. See "man nfs" for an explanation.
That seems to work.. I'm not sure it happens every time, but I tried it, and when I unplug the connection from the server, my desktop stays alive. Even when I have applications which use the server running. Thanks!
Quote:
Originally Posted by AlucardZero
Also try unmounting the shares when they go away. "umount" won't work, and "umount -f" probably won't either, so try "umount -l". Try to stop any processes that are trying to use the mounts first. See the man page for umount for -f and -l.
That was my first option, but it didn't work. The script automatically unmounts everything with umount -l, because I couldn't access the directories anymore, and bash would hang if I tried to access them. I'll take a look at ending processes when I have no connection, but then I have to decide in a script which application can live without the connection, even though it tries to open something from the server every now and then, and which application need a connection to stay alive.
But it looks like it's solved now, thanks a lot!
Quote:
Originally Posted by centosboy
In this situation, it might be best to use automount.,
If a connection is dropped, the mount will auto unmount - and hopefully solve the hanging problem..
Isn't that the same as not specifying "noauto" in /etc/fstab? If so, then I already use that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.