Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2012 02:25:32 +0100
From:      Leon =?iso-8859-15?Q?Me=DFner?= <l.messner@physik.tu-berlin.de>
To:        freebsd-questions@freebsd.org, l.messner@physik.tu-berlin.de
Subject:   Re: NFSv4 and file locking
Message-ID:  <20120114012532.GA15012@emmi.physik-pool.tu-berlin.de>
In-Reply-To: <20120112163757.GA4174@emmi.physik-pool.tu-berlin.de>
References:  <20120112163757.GA4174@emmi.physik-pool.tu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 12, 2012 at 05:37:57PM +0100, Leon Meßner wrote:
> Hi,
> 
> Does anyone know what you have to do to get locking working under NFSv4?
> I tried the following:
> 
> # mount_nfs -o nfsv4,sec=sys ip.nfsv4:/nfstest /mnt/test
> # mount | grep ip.nfsv4
> ip.nfsv4:/nfstest on /mnt/test (newnfs)
> # kldstat | grep nfs
> 6    2 0xffffffff8103f000 1015f    nfscommon.ko
> 9    1 0xffffffff81054000 3008f    nfscl.ko
> # cd /mnt/test
> # lockf testlockfile ls
> lockf: cannot open testlockfile: Operation not supported

Looks like lockf is the wrong tool for this job. I tried the NFSv4 lock
testing suite from [1] and this worked flawlessly. I don't know if this
test actually does what it claims to do but as i couldn't find any
freebsd specific testing tool this will probably suffice.

Thanks,
Leon

[1] http://nfsv4.bullopensource.org/tools/tests_index.php (see locks
robustness)



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