Corrupt index files

Sami Ketola sami.ketola at dovecot.fi
Tue Aug 1 13:14:10 EEST 2017


> On 1 Aug 2017, at 6.23, Bruce Guenter <bruce at untroubled.org> wrote:
> 
> On Mon, Jul 24, 2017 at 07:56:23PM +0300, Aki Tuomi wrote:
>> Well, dovecot does not really guarantee access concurrency safety if you access indexes using more than one instance of dovecot at the same time.
> 
> Pardon my ignorance, but how does Dovecot handle when an IMAP client
> connects multiple times concurrently? Does it not launch multiple
> instances?

Each imap connection is one imap process. So if (unlimited) thunderbird connects
to dovecot imap and sees 30 folders, it will open 30 imap connections and dovecot
will launch imap process to manage each connection. And on top of that LMTP 
delivery again is another process to access the FS.

If these processes get different view of the filesystem you will face corruption. 
Specially when you are dealing with multiple servers the metadata syncing across
servers is a challenge for the cluster filesystems. I’m a bit surprised that the
corruption does happen even with one server.


> Moving everybody off of LizardFS is not an option, and this has affected
> many separate mailboxes. Now that we have implemented a director front
> end (instead of just a semi-persistent load balancer), the instances
> have been reduced, but it is still happening on accounts that are not
> being accessed across multiple servers. I will see if I can pin these
> down to a single server and move them onto non-shared storage there.

Without testing I still would say that it’s LizardFS to blame. There was similar problems
with another cluster filesystem GlusterFS too. 


Sami



More information about the dovecot mailing list