[Xapian-discuss] Flint Database 'Can't acquire write lock'?
Josef Novak
josef.robert.novak at gmail.com
Sun Apr 22 14:12:24 BST 2007
Hi,
The perl one liner you included in the previous e-mail worked as you
predicted, so it seems that locking does work. I will try to figure
out how to configure the mechanism (assuming this is what I need to
do!).
thanks again
joe
On 4/22/07, Olly Betts <olly at survex.com> wrote:
> 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