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.
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.
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.
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
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.