DRBD has a defined interface for the mechanism that fences the peer
node in case of the replication link being interrupted. The
drbd-peer-outdater
helper, bundled with Heartbeat, is the reference
implementation for this interface. However, you may easily implement
your own peer fencing helper program.
The fencing helper is invoked only in case
fence-peer
handler has been defined in the resource’s (or common)
handlers
section, and
fencing
option for the resource is set to either
resource-only
or resource-and-stonith
, and
The program or script specified as the fence-peer
handler, when it is
invoked, has the DRBD_RESOURCE
and DRBD_PEER
environment variables
available. They contain the name of the affected DRBD resource and the
peer’s hostname, respectively.
Any peer fencing helper program (or script) must return one of the following exit codes:
Table 17.1. fence-peer
handler exit codes
Exit code | Implication |
---|---|
3 | Peer’s disk state was already |
4 | Peer’s disk state was successfully set to |
5 | Connection to the peer node failed, peer could not be reached. |
6 | Peer refused to be outdated because the affected resource was in the primary role. |
7 | Peer node was successfully fenced off the cluster. This should never occur unless |