[Dovecot] dotlock & NFS

Thomas Wouters thomas at xs4all.net
Fri Dec 9 02:11:45 EET 2005

On Mon, Dec 05, 2005 at 12:25:49PM +0100, Marten Lehmann wrote:

> is dotlock supposed to work with NFS? I noticed that the default-locking 
> method causes problems even with nfslockd started.

Dotlocking is the only sane locking mechanism over NFS. fcntl locks often
work, too, depending on the clients and servers, but there are various
corner cases where lockd (NFS's locking mechanism) fails... For instance,
when a client, holding locks, goes offline. If the client (as identified by
its ipaddress) stays offline, lockd is supposed to hold the locks forever.
Whether your lockd does depends :P Dotlocks use NFS (not lockd) metadata
semantics, and they work on all NFS combinations I've seen.

For small installations, or situations where a few stale lock files isn't
that big a deal, fcntl locks are fine (if the servers and clients all
co-operate.) If you want something that scales well or is less of a hassle
in large installations, or if fcntl doesn't seem to work right, use
dotlocking. Most importantly, though, make sure everything that locks the
same file is using the same locking mechanism. So, if you use mbox
mailboxes, and procmail to deliver to them, or pine to read them while
dovecot may be reading them too, make sure they all lock the same way.

Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

More information about the dovecot mailing list