You are not logged in.

#1 2011-06-22 07:29:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

how can I make an nfs export more robust if server is down

I'm using nfsv4 to share between nodes on my LAN.  Usually everything works great, but in the scenario of the nfs server getting shutoff, the nodes come unresponsive if a program attempts to access the now defunct NFS share.  Is there anything I can do to change this behavior?

For example, if I attempt to umount the share on the node, even a "force lazy" the process just hangs; if I try to reboot the node, it hangs on trying to umount file systems.  I found that I can comment out the corresponding entries in /etc/mtab and then reboot, but this is a manual process.  I'd like it to be more robust.

Last edited by graysky (2011-06-22 07:43:21)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2011-06-22 08:22:41

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: how can I make an nfs export more robust if server is down

I understand what you mean but I'm not sure what causes it.
Have you tried mounting as both hard and soft to see if either makes a difference? Also I'm wondering if there is a timeout period where it just gives up.


neutral

Offline

#3 2011-06-22 08:22:59

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: how can I make an nfs export more robust if server is down

Are you using the 'soft' mount option?

EDIT: Too slow tongue

Last edited by fukawi2 (2011-06-22 08:23:29)

Offline

#4 2011-06-22 10:46:25

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: how can I make an nfs export more robust if server is down

graysky wrote:

I'm using nfsv4 to share between nodes on my LAN.  Usually everything works great, but in the scenario of the nfs server getting shutoff, the nodes come unresponsive if a program attempts to access the now defunct NFS share.  Is there anything I can do to change this behavior?

For example, if I attempt to umount the share on the node, even a "force lazy" the process just hangs; if I try to reboot the node, it hangs on trying to umount file systems.  I found that I can comment out the corresponding entries in /etc/mtab and then reboot, but this is a manual process.  I'd like it to be more robust.

Use automount/autofs


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

#5 2011-06-22 21:12:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: how can I make an nfs export more robust if server is down

Hi guys - just found out about the soft mount option for nfs thanks to your post.  Since I specified no option, they were hard mounts.  I have since modified them to be soft but the problem persists.

1) I stop the nfs server on the server
2) I issue a shutdown to the node but the process hangs

$ mount|grep work
mars:/work on /media/work type nfs (rw,soft,vers=4,addr=192.168.1.12,clientaddr=192.168.1.13)

Last edited by graysky (2011-06-22 21:13:19)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2011-06-22 23:10:17

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: how can I make an nfs export more robust if server is down

graysky wrote:

I have since modified them to be soft but the problem persists.

FWIW, I see the same issue during shutdown with my mounts if they fail, but they _do_ timeout after a couple of minutes... I only reboot once every month or 2 so I haven't bothered to try making it timeout faster.

Offline

Board footer

Powered by FluxBB