Hello, I am attempting to get flock/file locking working between my -stable (updated ~19 may) nfs file server and -current desktop; the server is running lockd/statd, and both my mail client (mutt) and a simple perl program complain that files on the nfs server cannot be locked. I am aware that there has been work on the nfs locking code in current, and have a vague recollection of a workaround required for the situation I am in, but cannot remember it (and cannot find it in mailing list archives). Would anyone be so kind as to refresh me on how to fix this, or at least point me in the right direction? thanks
On Sun, Jun 22, 2003 at 09:14:57PM +1000, Rudolph Pereira wrote:> Hello, > I am attempting to get flock/file locking working between my -stable > (updated ~19 may) nfs file server and -current desktop; the server is > running lockd/statd, and both my mail client (mutt) and a simple perl > program complain that files on the nfs server cannot be locked.The client also needs to run lockd/statd. Be aware that rpc.lockd in 4.x and earlier is a null implementation that does not actually perform NFS file locking with the server, it just returns success to the client. A working lockd was implemented in 5.0. Kris -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20030622/ed12d11a/attachment.bin
Rudolph,> I am attempting to get flock/file locking working between my -stable > (updated ~19 may) nfs file server and -current desktop; the server is > running lockd/statd, and both my mail client (mutt) and a simple perl > program complain that files on the nfs server cannot be locked.NFS locking wasn't implemented in 4.4BSD. There is still no implementation in STABLE. If you really need it, you may take a look at Terry's page where an intra-client NFS lock implementation for STABLE could be found: http://people.freebsd.org/~terry/ If you need the above mentioned patches that apply cleanly to RELENG_4, take a look at this: http://www.blackflag.ru/patches/nfs-client-and-server-locking-4.5-STABLE-20020312.diff It works fine in our production environment and was tested under quite a heavy load. However, do not miss that this patch doesn't actually implement lock requests to the server. It only allows for locks being properly held within a single client. That is, locks for the same file on several different STABLE boxes *won't* work. Thus, the word "intra-client" :) Hope this helps.
On Sun, Jun 22, 2003 at 04:43:03AM -0700, Kris Kennaway wrote:> The client also needs to run lockd/statd. Be aware that rpc.lockd in > 4.x and earlier is a null implementation that does not actually > perform NFS file locking with the server, it just returns success to > the client. A working lockd was implemented in 5.0.Thanks, running lockd/statd on the client fixed it.