[Dovecot] dsync and active-active fault tolerance mail servers

Timo Sirainen tss at iki.fi
Sat Aug 21 15:54:45 EEST 2010


On 21.8.2010, at 9.05, Luigi Rosa wrote:

> The replica is done via dsync with a procedure like this executed on mail1.acme.com server:
> 
> foreach mailbox {
> 	dsync mirror mailbox
> }
> 
> 1) Use Linux user/group owner of the files and directories are the same on both hosts (they are both foobar), but have different numeric ID, in one host foobat has UID 1234 and on the other host foobar has UID 2345. Is this an issue?

No. Just don't have your userdb specify the UID as a number (or at all, just set a global mail_uid = foobar in config file).

> 2) Mail location path is the same on both hosts, but where does dsync get it? Does dsync get all the information from the userbase defined in dovecot.conf (and other included files)?

dsync reads the config the same way all other standalone programs (including dovecot master) do it: it executes doveconf, which parses the config. Then if you give -u parameter to dsync it also does userdb lookup from auth process.

> 3) Have I to scan the entire userbase and execute dsync for each user, or is there a trick to do for every user with a single command?

Currently you need to execute dsync separately for each user. It's also more reliable since I think there are still some rare random crashes in dsync. If you find these, let me know and I'll try to fix them. :) Also you should probably be running a few dsyncs in parallel to finish the sync in less time.

> 4) How often is good to run the synchronization? 5 minutes? 10? 15?

Dunno. But see http://dovecot.org/list/dovecot/2010-August/051714.html

> 5) What is the correct command line to invoke dsync in this scenario?

Maybe simply: dsync mirror -u user at domain mail2.acme.com


More information about the dovecot mailing list