11.5. Triggering Geo-replication Failover and Failback

Warning

You must engage Red Hat Profession Services before triggering geo-replication failover and failback in production environment. Contact your Red Hat representative for more information.
Red Hat Storage 2.0 supports Geo-Replication failover and failback. If the master goes down, you can trigger a failover procedure so that the slave can be replaced as the master. During this time, all I/O operations including writes and reads are done on the slave (now acting as master). When the original master (OM) is back online, you can trigger a failback procedure on the original slave (OS) so that it syncs the delta back to the master. The data is synced based on the time difference of xtimes (master-xtime not equal to slave-xtime).
If conflict arises while syncing data back to the master, the original master's data is replaced with the slave (now acting as master) data set. Any write operation that takes place on the master during failback is ignored.
In the commands, OM is Original Master and OS is Original Slave.
Perform the following to trigger failover and failback:
  1. Start rsyncd between OS and OM to sync the missing namespaces and data by running the following:
    # rsync -PvSza --numeric-ids --ignore-existing /mnt/OS-VOLNAME PRI_HOST:/mnt/OM-VOLNAME
  2. Enable blind-sync mode in OS by running the following command:
    # gluster volume geo-replication OS OM config special-sync-mode blind
  3. Start gsyncd between OS and OM by running the following command:
    # gluster volume geo-replication OS OM start
  4. Set a checkpoint by running the following command:
    # gluster volume geo-replication OS OM config checkpoint now
    Checkpoint provides status on syncing state.
  5. Monitor the checkpoint till reaches status displays OK "completed at <time of completion>".
    # gluster volume geo-replication OS OM status
  6. Enable wrapup-sync mode by running the following command:
    # gluster volume geo-replication OS OM config special-sync-mode wrapup

    Important

    You must shutdown the user application before proceeding to Step 8 so that no writes happen on OS.
  7. Repeat steps 4, 5, and 6 to know when the sync is complete. Set checkpoint again and wait for its completion.