LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Broken NFS Links: Server seems laggy (https://www.linuxquestions.org/questions/linux-networking-3/broken-nfs-links-server-seems-laggy-463786/)

Swakoo 07-13-2006 04:42 PM

Broken NFS Links: Server seems laggy
 
hi there,

am playing with NFS and I have set it such that it links on boot. I realise when the server gets disconnected, and the client try to connect to the NFS link, it kind of "hang". Because i use the 'hard' option to mount, it will resume once server is back up.

But what's the best way to mount it such that it won't hang, and the server can carry on as per normal. All I need to do is have my script to check if a certain file is in that NFS directory. if it is not there (link broken), link user to a "server down" page or something.

Oh, I am doing NFS for a web server-file server.

thanks!

twantrd 07-13-2006 07:14 PM

Pretty much, you can't do this with NFS. Once the NFS servers dies/disconnects, there will be I/O interruption on the client. If you did a 'df', your listing will be stuck/hung at the point where it's trying to get the sizes of that NFS mount point. At this point, what you can do is either wait until the server comes back online, or just umount it. If it doesn't unmount because it spits out "device busy", you can do a lazy unmount.

There are more tricks to this too.

-twantrd

Swakoo 07-13-2006 09:46 PM

Quote:

Originally Posted by twantrd
Pretty much, you can't do this with NFS. Once the NFS servers dies/disconnects, there will be I/O interruption on the client. If you did a 'df', your listing will be stuck/hung at the point where it's trying to get the sizes of that NFS mount point. At this point, what you can do is either wait until the server comes back online, or just umount it. If it doesn't unmount because it spits out "device busy", you can do a lazy unmount.

There are more tricks to this too.

-twantrd


Tricks? what tricks :D

What's lazy unmount?

Because I was thinking i have a few web application on this web server, but only one uses the NFS. so if the NFS link do go down and all services get affected due to the lag, pity!

twantrd 07-14-2006 02:21 AM

A short momentary lag shouldn't affect you that much. However, if yours is unacceptable, I would suggest tuning NFS a bit more. Are you nfs mounting using version 3? Have you tried changing the rsize and wsize? Those are just a head start. Those are tons of information on the web regarding NFS tuning.

Quote:

What's lazy unmount?
'man umount'. That is your friend :).

-twantrd


All times are GMT -5. The time now is 11:15 PM.