<p dir="ltr">I think you can use a single colocation with a set of resources. crmsh allows you to create such a colocation with:</p>
<p dir="ltr">crm colocation vm_with_disks inf: vm_srv ( ms_disk_R:Master ms_disk_S:Master )</p>
<p dir="ltr">This forces the cluster to place the master resources on the same host, starting them without specific ordering, and then start the VM along with them.<br>
</p>
<div class="gmail_quote">Le 9 nov. 2014 11:31, "Matthias Teege" <<a href="mailto:matthias-gmane@mteege.de">matthias-gmane@mteege.de</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hallo,<br>
<br>
On a cluster I have to place three resources on the same node.<br>
<br>
ms ms_disk_R p_disk_R<br>
ms ms_disk_S p_disk_S<br>
primitive vm_srv ocf:heartbeat:VirtualDomain<br>
<br>
The colocation constraints looks like this:<br>
<br>
colocation vm_with_disk_R inf: vm_srv ms_disk_R:Master<br>
colocation vm_with_disk_S inf: vm_srv ms_disk_S:Master<br>
<br>
Do I have to add another colocation constraint to define a<br>
colocation between disk_R and disk_S.  I'm not sure because the<br>
documentation says:<br>
<br>
"with-rsc: The colocation target.  The cluster will decide where to<br>
put this resource first and then decide where to put the resource in<br>
the rsc field."<br>
<br>
In my case the colocation targets are "ms_disk_R" and "ms_disk_S".<br>
If pacemaker decides to put disk_R on node A and disk_S on node B<br>
vm_srv would not start.<br>
<br>
I use order constraints to start disks before the vm resource.<br>
<br>
order disk_R_before_vm inf: ms_disk_R:promote vm_srv:start<br>
order disk_S_before_vm inf: ms_disk_S:promote vm_srv:start<br>
<br>
Thanks<br>
Matthias<br>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div>