A fairly-common maintenance concern regarding synchronized devices is verification. The question we should always ask ourselves in a high-availability scenario is: How confident are we that the data on both nodes match?
The drbdadm
utility provides a parameter specifically for addressing this need. However, there are some caveats to consider when using it, which we will explain in this recipe.
Follow the recipes defined in all previous sections before starting here. At the very least, we need a fully operational DRBD node pair to follow this recipe.
Follow these steps as the root
user on pg1
:
- Add this block of text inside the
resource
section defined in/etc/drbd.d/pg.res
:
net { verify-alg md5; }
- Run this command to make DRBD reread its configuration files:
drbdadm adjust pg
- Begin verification with this command:
drbdadm verify pg
- Monitor
/proc/drbd
until verification is complete:
watch cat /proc/drbd...