This feature is available in DRBD 8.0 and later.
To enable dual-primary mode, add
the allow-two-primaries option to the
net section of your resource
configuration:
resource resource
net {
allow-two-primaries;
}
...
}
When a resource is configured to support dual-primary mode, it
may also be desirable to automatically switch the resource into
the primary role upon system (or DRBD) startup. To do this, add
the become-primary-on option, available in DRBD
8.2.0 and above, to the startup section of your
resource configuration:
resource resource
startup {
become-primary-on both;
}
...
}After you have made these changes to
/etc/drbd.conf, do not forget to
synchronize the configuration between nodes. Then, you can use
drbdadm adjust
resource (on both nodes),
and afterwards, drbdadm primary
resource (again, on both
nodes).