rpc.lockd

Dan Nelson dnelson at allantgroup.com
Tue Apr 29 12:54:33 PDT 2003


In the last episode (Apr 29), omestre at freeshell.org said:
>  I'm having problems with rpc.lockd (nfs locks)...
>  Now, i guess that i know "where is" the problem. I have one Linux box
> as my NFS server to Linux and FreBSD 4.x machines, working fine.
>  I have some FreeBSD 5.0 machines that do not work the locks. Looking at
> the log in the Linux server, i have saw these messages:
> kernel: lockd: bad cookie size 16 (only cookies under 8 bytes are supported.)
>  Without 5.0 clients, these messages go out! So, how can i make the rpc.lockd
> work like 4.x series? 
>  The 5.0 lock protocol, i guess, is incompatible with linux ( kernel 2.4.20).
>  Thanks.  

FreeBSD 4.* didn't do locking at all; rpc.lockd simply accepted all
requests but never tried to lock the remote sfile.

FreeBSD 5's rpc.lockd does send lock requests, but the Linux kernel
apparently cannot handle the 16-byte request.

If you were happy with FreeBSD 4's behaviour, try just not running
rpc.lockd on your FreeBSD 5 systems.

If you really need locking, you can probably cut FreeBSD's cookie size
down to 8 bytes by removing the pid_start element from struct
lockd_msg_ident in /sys/nfsclient/nfs_lock.h (and removing the code
that sets it in nfs_lock.c), and rebuilding world and the kernel.  A
better solution would be to submit a bugreport to your Linux vendor and
have them fix it on their end.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list