4

Ive got two servers with a shared glusterfs disk, both running dovecot and serving mail from this shared disk. Users read mail only from one of these servers but mail gets delivered to both. Occasionally I get problems when accessing the inbox maildir folder:

IMAP(user): open(/home/user/Maildir/dovecot-uidlist) failed: Permission denied

The user cant open the inbox. Accessing other folders works fine. If I delete the dovecot index files and restart dovecot everything works fine.

What can I do to make this setup more reliable?

My dovecot settings on both servers:

mmap_disable = no
dotlock_use_excl = yes
mail_nfs_storage = yes
mail_nfs_index = no

If all else fails I could create a bash script to clean up dovecot index files if there are errors in the logs...

1

2 Answers 2

3

I have glusterfs deployed for a few projects, not using it though as the backend storage for IMAP/SMTP storage.

But from experience can say a few things:

First of all I would not recommend anyone use distributed file systems for storage backend on high transactional workloads such as IMAP and SMTP. Since they do not work with them well , mostly because of two reasons: high latency and problems with file locking.

Secondly, have spent quite some time on gluster freenode channel seen people reporting about Dovecot complaining about constant index corruption gluster does. So i would strongly recommend you to utilize some other back storage replication solution, dsync replication or something similar.

Hope this helps.

2
  • It helps as it confirms my findings. If there is not a lot of activity everything is ok, but under load things start to break. I will probably have to switch to dsync.
    – Jure1873
    Apr 28, 2013 at 18:42
  • I'm seeing lots of index corruption which is how I found this question. Will be changing back to old setup.
    – Kurt
    Apr 19, 2018 at 18:01
0

I think you should put mail_nfs_index = yes, and ensure use a proxy that redirects the same IP to the same backend server always. This link can help: https://wiki.dovecot.org/MailLocation/SharedDisk

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .