I cannot get locking under NFS to work on my Suse 10.0 installation.
In my testing, I am sharing /tmp and mounting it back to /mnt/tmp
on the same server. See details below.

Other info...
If I mount an NFS filesystem from an older Redhat 8 (2.4.24) server
onto my Suse 10 server, the locking works. If I share a filesystem from
the Suse 10 server to the Redhat 8 server, the locking does not work.

Any help is greatly appreciated!

--Eric

My system type is:
# uname -a
Linux lxscreen00 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux

Here is info related to NFS and the filesystem I am testing in:
# rpcinfo -p | egrep 'nfs|lock|status|mount'
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100024 1 udp 32770 status
100021 1 udp 32770 nlockmgr
100021 3 udp 32770 nlockmgr
100021 4 udp 32770 nlockmgr
100024 1 tcp 32792 status
100021 1 tcp 32792 nlockmgr
100021 3 tcp 32792 nlockmgr
100021 4 tcp 32792 nlockmgr
100005 1 udp 908 mountd
100005 1 tcp 912 mountd
100005 2 udp 908 mountd
100005 2 tcp 912 mountd
100005 3 udp 908 mountd
100005 3 tcp 912 mountd
# pwd
/mnt/tmp
# df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
lxscreen00:/tmp 2505984 32864 2473120 2% /mnt/tmp
# grep /mnt/tmp /etc/fstab
lxscreen00:/tmp /mnt/tmp nfs rw 0 0
# grep ^/tmp /etc/exports
/tmp lxscreen00(rw,no_root_squash,sync,insecure,insecur e_locks,no_acl)

Here is my test script:
# cat tst_lockf
import fcntl
fp = open("lock-test4", "a")
fcntl.lockf(fp.fileno(), fcntl.LOCK_EX|fcntl.LOCK_NB)


Output from running the script:
# python tst_lockf
Traceback (most recent call last):
File "tst_lockf", line 3, in ?
fcntl.lockf(fp.fileno(), fcntl.LOCK_EX|fcntl.LOCK_NB)
IOError: [Errno 116] Stale NFS file handle