Subject: Re: [vserver] NFS remote file locking
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Fri, 16 Oct 2009 19:18:16 +0200

On Fri, Oct 16, 2009 at 12:44:24PM +0000, Harald Weidner wrote:
> Hello,

> Some of my Linux-VServer containers which as NFS clients, mounting
> shares from different NFS servers (NetApp, EMC).

do they support locking?

> Although I have tried all the three methods of mounting NFS resources
> mentioned in
> http://linux-vserver.org/Frequently_Asked_Questions#How_do_I_handle_NFS_mounts_within_in_a_guest.3F
> I did not get NFS remote file locks working properly. (*)

> I have tried several combinations, e.g. running portmap and rcp.statd
> on the host and/or in the container, but nothing helped.

> Only when I use the NFS mount option "nolock", then file locking works
> correctly, but then it is local locking, not remote.

> Is there a way to use NFS remote locking from within a VServer container?

honestly, I do not see why it should not work inside
a guest, when it works on the host ... 

you did test that it works on the host, didn't you?

btw, what kernel/patch/util-vserver version?

best,
Herbert

> (*) NFS locking was tested with my locktest.pl tool, see
> http://www.weidner.ch/download/locktest.pl
> Usage: ./locktest.pl -p 3 -f /path/to/nfs/share/lockfile.lock
> 
> Regards,
> Harald