flock and NFS

Tom Buskey tom at buskey.name
Fri Apr 10 14:56:46 EDT 2009


On Fri, Apr 10, 2009 at 2:09 PM, Ben Scott <dragonhawk at gmail.com> wrote:

> On Fri, Apr 10, 2009 at 1:39 PM, Jeff Macdonald <macfisherman at gmail.com>
> wrote:
> > I've always been wary of using flock on NFS. Am I being superstitious?
>
>   It's been awhile, but as I recall, locking was generally working
> okay within a given NFS implementation.  It was interoperability where
> things really got hairy.  So, e.g., a Sun NFS server with a Linux NFS
> client was problematic.  Linux everywhere was okay.
>
>  You need to be running a lock daemon on ... uh, either the client,
> the server, or maybe both.  Whenever I use NFS on Linux, I always just
> start every service I can find that has anything to do with NFS or
> RPC.  That way I know I started the ones I need.  :)


That gets things running, but doesn't figure out the real issue :-)
Sometimes it's not worth digging deeper.


>
> > How can I determine if the proper NFS components are in
> > place in order for the programs to function correctly?
>
>   I would find, or if needed write, a trivial test program for the
> flock() functions, and run a few instances on different nodes.  That
> way you'll have verified assurance that it's working.
>

The procmail install/build scripts test locking a number of ways to
determine what works.  It will enable using the correct ones and disable the
broken ones in the installed version.  I'd start looking at how procmail
does it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20090410/51378b2b/attachment.html 


More information about the gnhlug-discuss mailing list