Dovecot cluster using GlusterFS

Alessio Cecchi alessio at skye.it
Sun Dec 6 01:31:46 UTC 2015


Il 05.12.2015 10:42 Filip Pytloun ha scritto:
> Hello,
> 
> I have recently setup mailserver solution using 2-node master-master
> setup (mainly based on MySQL M-M replication and GlusterFS with 2
> replica volume) on Ubuntu 14.04 (Dovecot 2.2.9).
> 
> Unfortunately even with shared-storage-aware setting:
> 
>  mail_nfs_index = yes
>  mail_nfs_storage = yes
>  mail_fsync = always
>  mmap_disable = yes

With only these setting you don't solve the problem of shared storage.

> ..I have hit strange issues pretty soon especially when user was
> manipulating same mailbox from multiple devices at the same time.
> 
> Most issues was about corrupted indexes which was solved easily by just
> putting them on local storage of each node:
> 
>  mail_location = 
> maildir:/srv/mail/%d/%u:INDEX=/var/lib/dovecot/index/%d/%u
> 
> But I still hit issues like this one:
> 
>  dovecot: lmtp(6276, user at example.com): Error: Broken file
> /srv/mail/example.com/user at example.com/dovecot-uidlist line 8529: UIDs
> not ordered (8527 >= 8527)
> 
> Which I am not sure how serious it is or if it's possible to solve or
> workaround?

You need Director for POP/IMAP and also LMTP so you can solve all 
"Broken file" and "corrupted indexes" problems.

> 
> Anyway because of the above and high possibility of GlusterFS
> split-brains, I have decided to setup Dovecot Director according to the
> docs [1] but I have a couple of questions:
> 
> - is custom monitoring still required? Poolmon [2] is 4 year old so I
>   would suppose there's some progress since that?

For me poolmon works fine.

> - it's not possible to have same backends and directors in Dovecot
>   <2.2.17. I can backport newer Dovecot for Ubuntu Trusty, so this is
>   not an issue, but..

Yes is possibile (also with < 2.2.17), create two instances, like 
dovecot and director, two config directory /etc/dovecot/ and 
/etc/director/ and bind on differents IPs.

> - documentation states that it still doesn't work for LMTP [3]?
>   Which is probably important for my setup, because both Postfix 
> servers
>   are using dovecot-lmtp for mail delivery so there can be still some
>   issues (but probably less frequent?) when both servers will deliver
>   new mails for one user at once.
>   So do I really have to split directors from backends?

I'm running Director and backend on the same server for POP/IMAP, and in 
another configuration and Director for LMTP is on the same server (but 
with 2.2.19).

> Anyone has experience with clustered Dovecot setup?
> Why is Dovecot behaving so bad when it pretends to be shared storage
> friendly? Are these issues only specific for older Dovecot?
> Or is there something wrong in my architecture design?

You need Director, Dovecot has not problems with shared storage, big 
installation are always using shared storage (like NFS).
-- 
Alessio Cecchi
Postmaster AT http://www.qboxmail.it
http://www.linkedin.com/in/alessice


More information about the dovecot mailing list