[Xapian-discuss] Flint Database 'Can't acquire write lock'?

Olly Betts olly at survex.com
Sat Apr 21 17:46:32 BST 2007


On Sat, Apr 21, 2007 at 02:03:49PM +0900, Josef Novak wrote:
> I see an /usr/sbin/rpc.nfsd command and a 'lockfile' which is in my
> path.  I cannot seem to locate a 'lockd' command.  So perhaps that is
> the problem.

On a debian etch box, 'man rpc.lockd' says:

    The rpc.lockd program starts the NFS lock manager (NLM) on kernels that
    don't start it automatically.  However, since most kernels do start it
    automatically, rpc.lockd is usually not required. Even so,
    running it anyway is harmless.

So it's possible you don't have a separate lockd to run, but that you
need to configure locking for NFS shares somehow...

A simple way to test if locking works at all is to run this command twice.
It tries to lock a file exclusively (without blocking), then loops
forever:

perl -e 'open LOCK,">lockfile" or die $!; print flock(LOCK, 6)."\n";while (1){}'&

It should print `1' the first time and `0' the second.

Once you've tested, `fg' and hit Ctrl+C to kill each process.

Cheers,
    Olly



More information about the Xapian-discuss mailing list