[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SOLVED - Locking over NFS



Hi *,

On Mon, Jan 06, 2003 at 11:22:28PM +0100, T. Ribbrock wrote:

[U5 OpenBSD 3.2 NFS server <-> Linux 2.1.18 NFS client]
[...]
> All programs that use locking (e.g. mutt) throw errors ("Can't get lock",
> "lock failed" and similar) and I am getting error messages on the
> Linux box as well each time a program tries to set a lock:
> 
> Jan  6 21:53:12 esme kernel: call_verify: server accept status: 2
> Jan  6 21:53:12 esme last message repeated 2 times
> Jan  6 21:53:12 esme kernel: RPC: garbage, exit EIO
> 
> On the OpenBSD box I don't get any error messages, at least nowhere in
> /var/log/*, not even if I run rpc.lockd with -d 3 or something like
> that.
[...]

Further archive and google research together with some testing on my
part has resulted in the following:

Apparently, OpenBSD 3.2's 'rpc.lockd' only support NLM 1 and 3 (this
can be seen using rpcinfo - 'man rpc.lockd' actually mentions the
versions 1, 2 and 3), which - according to RFC1813 [0] - corresponds
to NFS V2. NLM 4 (corresponding to NFS V3) does not seem to be
supported. OpenBSD's NFS server, however, does support NFS v3.

An ethereal session of the traffic between the Linux client and the
OpenBSD server does indeed show the exchange of NFS V3 traffic.
Whenever locking is tried on the Linux client, one can see the OpenBSD
box complain about the NLM4 protocol - which is doesn't know.

I then went ahead and mounted the exported directory using
"-o nfsvers=2" on the Linux client. Et voila: Locking suddenly works!
Ethereal confirms that NFS traffic is now V2 and the NLM traffic V1.

Hence, the solution seems to be: If one wants locking via NFS with a
Linux client and an OpenBSD server, one has to use NFS V2.

Cheerio,

Thomas

P.S.: If I have misinterpreted the information and results, please let me
      know.

[0] See: http://www.freesoft.org/CIE/RFC/1813/70.htm
-- 
-----------------------------------------------------------------------------
      Thomas Ribbrock    http://www.ribbrock.org    ICQ#: 15839919
   "You have to live on the edge of reality - to make your dreams come true!"