Verifying a DRBD filesystem
A semi-common maintenance concern regarding synchronized devices is verification. The question we should always ask ourselves in a high-availability scenario is how confident we are that 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.
Getting ready
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.
How to do it...
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
- Disconnect and reconnect the DRBD resource:
drbdadm...