DRBD has a defined interface for the mechanism that outdates
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
outdater helper program.
The outdate helper is invoked only in case
an outdate-peer handler has been
defined in the resource's (or common)
handlers section,
and
the fencing option for the resource
is set to either resource-only or
resource-and-stonith, and
the replication link is interrupted long enough for DRBD to detect a network failure.
The program or script specified as the
outdate-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 outdater helper program (or script) must return one of the following exit codes:
Table 12.1. Peer outdater exit codes
| Exit code | Implication |
|---|---|
| 3 | Peer's disk state was already Inconsistent. |
| 4 | Peer's disk state was successfully set to
Outdated (or was Outdated to
begin with). |
| 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
fencing is set to
resource-and-stonith for the affected
resource.
|