[sclug] NFS exports and transient network

David Given dg at cowlark.com
Tue Nov 1 13:17:20 UTC 2005


On Tuesday 01 November 2005 12:11, Darren Davison wrote:
> Hi,
>
> I constantly seem to have a really frustrating problem with NFS mounts.
> Whenever a network link is severed (frequent with an iffy VPN I use for
> work) then it becomes impossible to umount any mounted directories that
> were using that connection.
>
> Even attempting to ls the directory hangs the process.  kill -9 (even as
> root) totally fails to kill the ls or the umount process that is hanging. 
> Worse than that, any attempt to reboot fails because the hung process
> cannot be killed!  I have to forcibly power off to get a cold boot.

Yes, it's behaving exactly as it's supposed to. It's waiting for the server to 
come back up again. NFS is a strictly stateless protocol and does not require 
any explicit connection or disconnection, purely so it can support this 
behaviour.

The reason why is that it's intended to be used on *reliable* LANs on devices 
that expect to run binaries off the NFS volume. Given that most Unices use 
demand-paging, this means that whenever the program jumps to an address it 
hasn't seen before it might concievably try to load a chunk of data; and 
there's no way that this can be allowed to fail. Blocking indefinitely is the 
right thing to do. (The alternative is to allow your program to seg fault 
whenever the network goes down.)

[...]
> I can't believe a protocol as old as NFS and an OS as net-savvy as Linux
> can combine to produce this appalling level of behaviour - it *must* be
> something I'm missing in the config.. no?

Yes, it's simply not designed for transient networks. As Bob says, using intr 
*may* help, but it may also cause you horrible grief... you may want to use a 
protocol such as SMB instead. (It'll still fail horribly if the network goes 
down, but in a different way.)

-- 
+- David Given --McQ-+ "Turning, pages turning in the widening bath,
|  dg at cowlark.com    | The spine cannot bear the humidity.
| (dg at tao-group.com) | Books fall apart; the binding cannot hold.
+- www.cowlark.com --+ Page 129 is loosed upon the world." --- Zarf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20051101/032edbf6/attachment.bin


More information about the Sclug mailing list