[Xapian-discuss] NFSv4 and locking
Peter A. Friend
octavian at corp.earthlink.net
Wed Dec 3 17:51:43 GMT 2008
Olly Betts wrote:
>
> On Tue, Dec 02, 2008 at 04:20:52PM +0200, Henry wrote:
> > We use NFSv4 on our cluster and perform distributed indexing (well, we
> > used to on our previous system which used a simple touch() locking
> > mechanism).
> >
> > I'm having a spot of bother getting Xapian to obtain a lock (hangs on
> > fcntl64()).
>
> Hmm, that shouldn't happen - we use F_SETLK which shouldn't block.
>
> If locking isn't supported, I'd expect ENOLCK. If it is supported, I'd
> expect the lock to be obtained, or to fail with EACCES/EAGAIN.
>
> Sounds to me like you need to debug your NFS setup.
>
I've only had problems with lockd, I don't use it. Using a lock file is
more reliable. If it's mounted v3 EXCL|CREATE should work just fine, if
it's v2 you will probably need to use something fancier like a symlink
to a uniquely named temporary file.
Peter
More information about the Xapian-discuss
mailing list