Adding DRBD to cluster management
DRBD is actually one of the most difficult resources to manage with Pacemaker. Unlike a regular service that is started or stopped depending on where it is active, DRBD is always active. The only thing that changes between two nodes running DRBD is the Primary
or Secondary
state ascribed to each.
Due to this complication, DRBD is not one resource, but two:
- A DRBD resource to manage starting and stopping DRBD
- A master/slave resource to control which node acts as the
Primary
In this recipe, we'll allocate both of these resources so that Pacemaker can manage DRBD properly.
Getting ready
As we're continuing to configure Pacemaker, make sure you've followed all previous recipes.
How to do it...
In the previous chapter, we created a DRBD resource named pg
. With this in mind, follow these steps as the root
user to add DRBD to Pacemaker:
- Create a basic Pacemaker
primitive
for DRBD with this command:crm configure primitive drbd_pg ocf:linbit:drbd \ params...