[DRBD-user] 2 x 2-node configuration?
jwinius at umrk.nl
Thu Feb 6 11:42:52 CET 2020
Quoting Jaap Winius <jwinius at umrk.nl>:
> My RHEL7 project is considering using DRBD to create sets of 2 x
> 2-nodes that replicate synchronously across two data centers. The
> first half of each set would consist of a primary and a secondary
> with the latter taking over in case of failure (Heartbeat-based
> Pacemaker cluster). However, the same block device(s) should also
> replicate to the second half of the set in the second data center.
> Crucially, it should be possible to turn these roles around without
> too much effort when the choice is made to make the second data
> center active and the first one passive.
> Is this possible with DRBD and if so, what kind of replication
> configuration should be used?
Yes. First, install DRBD9 on all four nodes to create a single
replicating DRBD cluster. Next, install the pcs and pacemaker packages
(which include Corosync as dependency instead of Heartbeat) on the
same four nodes, but don't use them to create a single
Corosync/Pacemaker cluster. Rather, create two clusters -- one in each
data center -- of two nodes each, ensuring that DRBD continues to
replicate across all four nodes and that only one of the two
Corosync/Pacemaker clusters is active at a time. This way, failovers
and failbacks will only involve two nodes in the data center where the
Corosync/Pacemaker cluster is active. Use your preferred configuration
management software to stop the Corosync/Pacemaker cluster in one data
center and start it in the other, automatically moving the DRBD
primary along with it.
More information about the drbd-user