[Pacemaker] How to properly define DRBD resources

Nikita Staroverov nsforth at gmail.com
Tue Dec 17 02:57:41 EST 2013

> So what I am doing wrong? Now our cluster is offline (corosync is 
> stopped) because it was promoting, demoting, starting, stopping DRBD 
> services and finnaly such node got declared as Unclean and then 
> shooting started.
> Funny thing is that if I start drbd manually (by /etc/init.d/drbd 
> start) it starts almost instantly and all resources are up and 
> Primary/Primary. Of cours I don't use that init.d when I use corosync.
> Any help will be greatly apperciated.
> Thank you!
Try this way:
1. pacemaker multistate drbd resource. Target-role must be "Started"
2. colocation for msdrbd  resource with other dependent resources. drbd 
resource in colocation must be in Master state.
3. order rule for resources. First action drbd promote folowing actions 
on another resources can be start, for example.

VitualDomain example (in crmsh notation and cutted from working 

primitive drbd_YOURVM ocf:linbit:drbd \
         params drbd_resource="YOURVM" \
         op monitor interval="29s" role="Master" \
         op monitor interval="31s" role="Slave"

primitive kvm_YOURVM ocf:heartbeat:VirtualDomain \
         params config="/etc/libvirt/qemu/YOURVM.xml" 
migration_transport="ssh" \
         meta allow-migrate="false" target-role="Started" 
is-managed="true" \
         op start interval="0" timeout="120s" \
         op stop interval="0" timeout="120s" \
         op monitor interval="60s" timeout="120s"

ms ms_drbd_YOURVM drbd_YOURVM \
         meta master-max="1" master-node-max="1" clone-max="2" 
clone-node-max="1" notify="true" target-role="Started" is-managed="true"


order kvm_YOURVM_after_drbd_YOURVM inf: ms_drbd_YOURVM:promote 

In my configuration VM's works with primary/secondary drbd.

More information about the Pacemaker mailing list