Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2006 11:14:53 +0100
From:      "Patrick M. Hausen" <hausen@punkt.de>
To:        stable@freebsd.org
Subject:   NFS locking question
Message-ID:  <20060228101453.GB47953@hugo10.ka.punkt.de>

next in thread | raw e-mail | index | archive | help
Hi, all!

In our local office network we have a rather old FreeBSD 5.2.1
server acting as an NFS server for several other systems, mostly
running 6.0.

>From time to time we experience processes on the NFS clients
hanging in statd "D" with wchan "lockd" when accessing files
over NFS.

So, just to nail down the cause of the problem we wanted to
disable remote locking for some time and see, what happens.
I know, it would probably be better to update the server,
but if everything works OK without locking, at least we know
that NFS locking is the problem here.

Now, I'm a little bit puzzled by the documentation, even the
one on the newer 6.0 systems ;-)

I have this line in /etc/fstab now:

hugo10:/home /home nfs rw,-b,-i,-L 0 0

according to the manpage for mount_nfs. Yet, when I type "mount"
to check if the options specified really are active, I get:

# mount
...
hugo10:/home on /home (nfs)
...

Eh ... yes? How can I check with which NFS options a given
directory is actually mounted?


Next question - while checking the manpages:

# man rc.conf
...
     rpc_lockd_enable
                 (bool) If set to ``YES'' and also an NFS server, run
                 rpc.lockd(8) at boot time.

     rpc_statd_enable
                 (bool) If set to ``YES'' and also an NFS server, run
                 rpc.statd(8) at boot time.
...

# man mount_nfs
...
     -L      Do not forward fcntl(2) locks over the wire.  All locks will be
             local and not seen by the server and likewise not seen by other
             NFS clients.  This removes the need to run the rpcbind(8) service
             and the rpc.statd(8) and rpc.lockd(8) servers on the client.
             Note that this option will only be honored when performing the
             initial mount, it will be silently ignored if used while updating
             the mount options.
...

So: what about this "this removes the need to run ... on the client"?
rc.conf(5) implies that nfs.statd and nfs.lockd are only run on
NFS servers.

Could someone please give me a quick picture on how the various
parts are supposed to work together? A link to TFM will be
appreciated just as well ;-)


And a last, minor one: when and why was the behaviour from older
releases changed (at least in 4.x things used to be that way, I
remember) that when I set "nfs_server_enable" in rc.conf,
mountd and portmapper were implicitly started because
being an NFS server depends on these services running?

Seems like now I have to explicitly enable "mountd_enable"
and "rpcbind_enable", too - what's the point in running
nfsd wihtout mountd and rpcbind? Wasn't one of the reasons for
rcng the need to handle dependencies?

Thanks in advance,
Patrick
-- 
punkt.de GmbH         Internet - Dienstleistungen - Beratung
Vorholzstr. 25        Tel. 0721 9109 -0 Fax: -100
76137 Karlsruhe       http://punkt.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060228101453.GB47953>