LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   System hangs when nfs connection is lost (https://www.linuxquestions.org/questions/linux-networking-3/system-hangs-when-nfs-connection-is-lost-814578/)

Hmail 06-16-2010 03:40 PM

System hangs when nfs connection is lost
 
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.

My hardware:

linux-bbdu:~ # lspci
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 02)
00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 02)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:00.0 VGA compatible controller: nVidia Corporation G84 [GeForce 8600 GT] (rev a1)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
04:00.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)

My kernel:
linux-bbdu:~ # uname -r
2.6.31.12-0.2-default

My linux distribution:
linux-bbdu:~ # cat /etc/SuSE-release
openSUSE 11.2 (i586)
VERSION = 11.2

My KDE version:
linux-bbdu:~ # kde4-config --version
Qt: 4.6.3
KDE: 4.3.5 (KDE 4.3.5) "release 0"
kde4-config: 1.0


I hope I gave enough explanation of my problem, and thanks in advance for your answers.

AlucardZero 06-16-2010 03:53 PM

Yeah, that happens.

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.

centosboy 06-16-2010 03:53 PM

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..

Hmail 06-16-2010 04:05 PM

Quote:

Originally Posted by AlucardZero (Post 4005843)
Yeah, that happens.

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 (Post 4005843)
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 (Post 4005844)
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.

AlucardZero 06-16-2010 04:41 PM

Not quite; automount (autofs) is a separate program. "noauto" in fstab just prevents it from being mounted at boot.

rhel6 10-06-2015 05:02 AM

Server hung state
 
I have small doubt in rhel6. recently i facced one problem.anyone knows the issue plz rply to me

If system is in hung state, what steps you will take to resolve the issue?


All times are GMT -5. The time now is 09:59 AM.