[Pacemaker] colocate three resources

Matthias Teege matthias-gmane at mteege.de
Sun Nov 9 10:28:06 UTC 2014


Hallo,

On a cluster I have to place three resources on the same node.

ms ms_disk_R p_disk_R
ms ms_disk_S p_disk_S 
primitive vm_srv ocf:heartbeat:VirtualDomain

The colocation constraints looks like this:

colocation vm_with_disk_R inf: vm_srv ms_disk_R:Master
colocation vm_with_disk_S inf: vm_srv ms_disk_S:Master

Do I have to add another colocation constraint to define a
colocation between disk_R and disk_S.  I'm not sure because the
documentation says:

"with-rsc: The colocation target.  The cluster will decide where to
put this resource first and then decide where to put the resource in
the rsc field."

In my case the colocation targets are "ms_disk_R" and "ms_disk_S".
If pacemaker decides to put disk_R on node A and disk_S on node B
vm_srv would not start.

I use order constraints to start disks before the vm resource.

order disk_R_before_vm inf: ms_disk_R:promote vm_srv:start
order disk_S_before_vm inf: ms_disk_S:promote vm_srv:start

Thanks
Matthias





More information about the Pacemaker mailing list