[sclug] NFS exports and transient network

Dickon Hood sclug at splurge.fluff.org
Tue Nov 1 13:38:29 UTC 2005


On Tue, Nov 01, 2005 at 12:22:18 +0000, Bob Franklin wrote:
: On Tue, 1 Nov 2005, Darren Davison wrote:

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

It's a feature.

: Have you mounted them as 'soft' or 'hard', have you looked at 'intr' too?

: The manpage has some words on the subject - although not as many as I 
: would like.  'hard' means things hang as you suggest (and is probably the 
: default) but causes less grief for the upper layers because things behave 
: normally (albeit hanging); 'soft' allows things to timeout, but 
: applications tend to get upset about that.

The main problem is actually crap code produced by programmers who don't
bother to check the return codes of syscalls (did you know that close(2)
can fail?  Do you know what that means?).  As such, someone made the
decision a long time ago to force all NFS mounts to lock until the server
comes back.  Given its designed use as a LAN-based file serving protocol,
this makes some sense.

And yes, I'm as guilty as everyone else.

: 'intr' allows the calls to be interrupted, which might be what you want.

Yup.  Be aware of bad code, though.  If your NFS server disappears whilst
you're saving to it, make sure you take a second copy locally before
closing the document...

-- 
Dickon Hood

Due to digital rights management, my .sig is temporarily unavailable.
Normal service will be resumed as soon as possible.  We apologise for the
inconvenience in the meantime.

No virus was found in this outgoing message as I didn't bother looking.


More information about the Sclug mailing list