DRBD’s
strategy for handling lower-level I/O errors is determined by the on-io-error option, included in the
resource disk configuration in /etc/drbd.conf:
resource <resource> {
disk {
on-io-error <strategy>;
...
}
...
}You may, of course, set this in the common section too, if you want
to define a global I/O error handling policy for all resources.
<strategy> may be one of the following options:
detach
This is the default and recommended option. On the occurrence of a
lower-level I/O error, the node drops its backing device, and
continues in diskless mode.
pass_on
This causes DRBD to report the I/O error to the upper layers. On the
primary node, it is reported to the mounted file system. On the
secondary node, it is ignored (because the secondary has no upper
layer to report to).
call-local-io-error
Invokes the command defined as the local I/O error handler. This
requires that a corresponding +local-io-error command invocation is
defined in the resource’s handlers section. It is entirely left to
the administrator’s discretion to implement I/O error handling using
the command (or script) invoked by local-io-error.
![]() | Note |
|---|---|
Early DRBD versions (prior to 8.0) included another option,
|
You may reconfigure a running resource’s I/O error handling strategy by following this process:
/etc/drbd.d/<resource>.res.
drbdadm adjust <resource> on both nodes.