Re: Reverting failover
Hi, On 18.04.2013 12:18, Janne Peltonen wrote: > Hi! > > On Thu, Apr 18, 2013 at 11:59:31AM +0200, Sven Schwedas wrote: >>> 1) force syncronisation >>> 3) manually run any remaining synclogs >> >> How do I do that / what's the difference between forced sync and a >> manual sync log run? > > I mean that in the first case, you give a list of all your users (and shared > mailboxes) to the sync_client command, using -u and -m operating modes, > respectively. See man sync_client, note also the -f option. You can skip this > step if you trust that your replica is completely up-to-date. There might have > been some glitches in the replication at a point or another, so I prefer to > synchronize all users and shared folders just before the role change, just in > case. YMMV. > > The manual sync log run means that you just check if there are any outstanding > entries left in /sync/log (where is typically > /var/lib/imap) and if there are, you run the sync_client for that log file > using mode -r. Like sync_client -r -f /var/lib/imap/sync/log. You see, when > you > shut down Cyrus at step 2, there might've been some new sync events generated > by imapd/lmtpd/pop3d that the background-running sync_client didn't have time > to handle before it was shut down. Okay, thanks. I'll simulate a failover and try those steps. > > > --Janne > -- Mit freundlichen Grüßen, / Best Regards, Sven SCHWEDAS Systemadministrator TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz Mail/XMPP: sven.schwe...@tao.at | +43 (0)680 301 7167 http://software.tao.at signature.asc Description: OpenPGP digital signature Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Reverting failover
Hi! On Thu, Apr 18, 2013 at 11:59:31AM +0200, Sven Schwedas wrote: > > 1) force syncronisation > > 3) manually run any remaining synclogs > > How do I do that / what's the difference between forced sync and a > manual sync log run? I mean that in the first case, you give a list of all your users (and shared mailboxes) to the sync_client command, using -u and -m operating modes, respectively. See man sync_client, note also the -f option. You can skip this step if you trust that your replica is completely up-to-date. There might have been some glitches in the replication at a point or another, so I prefer to synchronize all users and shared folders just before the role change, just in case. YMMV. The manual sync log run means that you just check if there are any outstanding entries left in /sync/log (where is typically /var/lib/imap) and if there are, you run the sync_client for that log file using mode -r. Like sync_client -r -f /var/lib/imap/sync/log. You see, when you shut down Cyrus at step 2, there might've been some new sync events generated by imapd/lmtpd/pop3d that the background-running sync_client didn't have time to handle before it was shut down. --Janne -- Janne Peltonen PGP Key ID: 0x9CFAC88B Please consider membership of the Hospitality Club (http://www.hospitalityclub.org) Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Reverting failover
Hi, On 18.04.2013 11:24, Janne Peltonen wrote: > Hi! > > On Thu, Apr 18, 2013 at 10:45:03AM +0200, Sven Schwedas wrote: >> If I understand correctly, failover is simply done by pointing clients >> to the replica (e.g. moving public IP)? > > More or less. You'll also have to make sure sync_server is no longer running > on > the replica but all the other relevant services are, so that users can > connect. > >> We can assume that only one server is ever accessed by clients (both >> IMAP and SMTP/LMTP), they only have access to the public IP, which is >> switched over manually. > > Ok. But as an added security measure, you should still make sure that the > sync_server isn't running on the replica-as-master. (And sync_client shouldn't > be running on the original master.) Ah, okay. >> How do I then migrate the data over to the master once it's running again? >> • Is master-master replication possible in this case? > > I gather it is only supported in the forthcoming 2.5 release. Too bad. :( > >> • If not, how do I move the data back to the master? Shut down the >> replica and rsync the spool back to the master? > > You could do that, I guess, but that would result in quite a downtime. We > simply run the master as the replica for a while (sync_server > running on the original master and sync_client on the original replica), force > a sync to all users and shared folders and then switch the IPs back. > > (To be more exact, each 'role change' (switching of master/replica roles and > reverting to original) consists of > 1) force syncronisation > 3) manually run any remaining synclogs How do I do that / what's the difference between forced sync and a manual sync log run? > 4) shut down current replica 5) > change ip 6) start master services in what used to be replica 7) make sure > everything appears to be ok 8) start sync_server in what used to be master) > > > HTH > -- Mit freundlichen Grüßen, / Best Regards, Sven SCHWEDAS Systemadministrator TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz Mail/XMPP: sven.schwe...@tao.at | +43 (0)680 301 7167 http://software.tao.at signature.asc Description: OpenPGP digital signature Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Reverting failover
Hi! On Thu, Apr 18, 2013 at 10:45:03AM +0200, Sven Schwedas wrote: > If I understand correctly, failover is simply done by pointing clients > to the replica (e.g. moving public IP)? More or less. You'll also have to make sure sync_server is no longer running on the replica but all the other relevant services are, so that users can connect. > We can assume that only one server is ever accessed by clients (both > IMAP and SMTP/LMTP), they only have access to the public IP, which is > switched over manually. Ok. But as an added security measure, you should still make sure that the sync_server isn't running on the replica-as-master. (And sync_client shouldn't be running on the original master.) > How do I then migrate the data over to the master once it's running again? > • Is master-master replication possible in this case? I gather it is only supported in the forthcoming 2.5 release. > • If not, how do I move the data back to the master? Shut down the > replica and rsync the spool back to the master? You could do that, I guess, but that would result in quite a downtime. We simply run the master as the replica for a while (sync_server running on the original master and sync_client on the original replica), force a sync to all users and shared folders and then switch the IPs back. (To be more exact, each 'role change' (switching of master/replica roles and reverting to original) consists of 1) force syncronisation 2) shut down current master 3) manually run any remaining synclogs 4) shut down current replica 5) change ip 6) start master services in what used to be replica 7) make sure everything appears to be ok 8) start sync_server in what used to be master) HTH -- Janne Peltonen PGP Key ID: 0x9CFAC88B Please consider membership of the Hospitality Club (http://www.hospitalityclub.org) Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Reverting failover
Hello, If I understand correctly, failover is simply done by pointing clients to the replica (e.g. moving public IP)? We can assume that only one server is ever accessed by clients (both IMAP and SMTP/LMTP), they only have access to the public IP, which is switched over manually. How do I then migrate the data over to the master once it's running again? • Is master-master replication possible in this case? • If not, how do I move the data back to the master? Shut down the replica and rsync the spool back to the master? -- Mit freundlichen Grüßen, / Best Regards, Sven SCHWEDAS Systemadministrator TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz Mail/XMPP: sven.schwe...@tao.at | +43 (0)680 301 7167 http://software.tao.at signature.asc Description: OpenPGP digital signature Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus