Dovecot Replication - Architecture Endianness?
Teemu Huovila
teemu.huovila at dovecot.fi
Mon May 4 13:06:25 UTC 2015
On 05/03/2015 01:48 PM, Reuben Farrelly wrote:
> Hi all,
>
> I've had an interesting use case come up which - to cut the story short - one way to solve the problem I am looking at may be to
> replicate a small number of mailboxes to a third remote server.
>
> I've currently had replication running between my main dovecot machine and another remote VM for some time and working well (so
> I'm not new to replication and I've got a good working config), but I've a need to add a third to the mix for a select number of
> mailboxes. The arch on both of those is Gentoo x86_64 and with latest 2.1.16 -hg.
>
> I have attempted this so far by rsync'ing the initial Maildirs and then once the bulk of the data has been transferred rely on
> dovecot's replication to keep things in sync. I figure that this should in theory mean that the subsequent updates in both
> directions are incremental and the bulk of the data gets moved while the device is here on my desk using rsync.
>
> I've attempted to do this using a Raspberry Pi as a remote device, but when I set it up the dovecot replication process seems to
> need to start the replication over from scratch even after the rsync is done. I know this is happening as the disk utilisation
> on the Pi skyrockets once the replication starts and I end up with thousands of double ups of all the mails ... which defeats
> the entire point of the process.
>
> If I do an identical configuration but on a third Gentoo x86_64 VM locally it all works as expected. No double ups of mails and
> the "catchup" between the two devices is practically instant. Same filesystem even. The only difference appears to be the
> system architecture.
>
> So main my question is this. Is there a known architecture/endian limitation on replication? I guess cross-arch replication
> is not something many people try but is it supposed to work anyway?
I think you are bumping against Dovecot index endianess restrictions. I dont think cross-arch dsync can currently work very
efficiently.
http://wiki2.dovecot.org/Design/Indexes/MainIndex?highlight=%28endian%29
> Also is there a way to restrict replication users aside from a crude hack around system first and last UIDs?
You can set the userdb to return an empty mail_replica variable for users you want to exclude from replication.
http://hg.dovecot.org/dovecot-2.2/rev/c1c67bdc8752
br,
Teemu Huovila
More information about the dovecot
mailing list