Hi, during the last months I worked a lot on improving our mailcluster. We use several Debian 8 based HP-Servers with Dovecot, Postfix and ISPConfig 3.1.2. The /var/vmail - directory is shared accross the cluster via GlusterFS, while i write this we use gluster version 3.9.1. In generel this works fine and we made really good experiences with glusterfs. It's robust, the self-healing works fine - only speed is a little drawback. But under heavy load we discovered more and more problems with the index files of Dovecot which get by default stored within the maildir. We recognized more and more messages like these: "Error: Corrupted transaction log file ...." "Error: Log synchronization error at seq=5,offset=17212 for ...." " Index ..... : Lost log for seq=67 offset=33312" and so on. we had so many errors that the problems became user-visible. For example users could not move Emails within IMAP-Folders, the emails simply "jumped back". Or sometimes users got internal server error messages. To me it seems that the file locking of all these Dovecot index files does not work properly accross GlusterFS although i set the corresponding switches in the Dovecot config file /etc/dovecot/conf.d/10-mail.conf: mail_temp_dir = /var/tmp mail_fsync = always mmap_disable = yes fsync_disable = no mail_nfs_storage = yes mail_nfs_index = yes lock_method = fcntl I spent a lot of time searching along several boards, but found no useable solution. So i started experimenting with moving the index files somewhere else. I decided to use /var/vmail-index. As root i executed: mkdir /var/vmail-index chown vmail:vmail /var/vmail-index (Remark: /var/vmail-index is on a different file system and different harddrives than /var/vmail, in my case this lowered I/O-load and IMAP-access-times) now edit /etc/dovecot/dovecot-sql.conf and comment out this line: # user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '1' and replace it by: user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format),':INDEX=/var/vmail-index/%d/%n') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '1' Restart dovecot: /etc/init.d/dovecot force-reload From now an Dovecot will place index files under a directory structure like this: /var/vmail-index/DOMAIN/USER/.xxxxxxx/ If you start this on a busy server the I/O-Load will increase for a while as Dopvecot has to create a lot of directories. But as he is done with it IMAP-access gets really really fast! From now on we discovered none of the above described index erros. I wondered if there might be any problems if each Dovecot uses it's own index and users get moved to another server my our loadbalancer. But it works fine. The drawback of this procedure is that you have to care about you index-directory by yourself as deletion of mailboxes or domains in ISPConfig will not cover deletion of the correxpondig folders in /var/vmail-index. So i created a little bash-script which gets executed every night on each machine: #!/bin/bash # Verbose? 0 -> off, 1-> little, 2-> a lot verbose=1 # Really delete? echbetrieb=true # Maildir-Path MAILDIR='/var/vmail' # Index-Path INDEXDIR='/var/vmail-index' test ! -d $MAILDIR && echo "MAILDIR $MAILDIR is no directory, exit." && exit 1 test ! -d $INDEXDIR && echo "INDEXDIR $INDEXDIR is no directory, exit." && exit 1 test $verbose -gt 0 && echo "Clearing index dir $INDEXDIR" test $echtbetrieb || echo "Testing - no deletion" cd $INDEXDIR for domain in $(ls) do if [ -d $INDEXDIR/$domain ] then if [ -d $MAILDIR/$domain ] then test $verbose -gt 1 && echo "$MAILDIR/$domain still exists" for user in $(ls $MAILDIR/$domain) do if [ -d $MAILDIR/$domain/$user ] then test $verbose -gt 1 && echo "$MAILDIR/$domain/$user still exists" else test $verbose -gt 0 && echo "$MAILDIR/$domain/$user doesn't exist any more, gets deleted" test $echtbetrieb && rm -rf $INDEXDIR/$domain/$user fi done else test $verbose -gt 0 && echo "$MAILDIR/$domain doesn't exist any more, gets deleted" test $echtbetrieb && rm -rf $INDEXDIR/$domain fi # sleep 1 fi done ------------------------------------------------------------- So - maybe this is a little bit helpful for somebody. I'm not sure whether this is "ISPConfig-update-safe", i'll know after the next update.