Manually switching a resource’s role from secondary to primary (promotion) or vice versa (demotion) is done using the following commands:
# drbdadm primary <resource> # drbdadm secondary <resource>
In single-primary mode (DRBD’s default), any
resource can be in the primary role on only one node at any given time
while the connection state is
Connected
. Thus, issuing drbdadm primary <resource>
on one node
while <resource> is still in the primary role on the peer will
result in an error.
A resource configured to allow dual-primary mode can be switched to the primary role on both nodes.