[Pacemaker] Help with colocation and order of primitives
Andrew Martin
amartin at xes-inc.com
Fri Feb 10 15:33:44 UTC 2012
Hello,
I am working on configuring a 2-node cluster with 3 DRBD devices, their corresponding filesystem mounts, and a VirtualDomain resource agent. I want to add the appropriate constraints to pacemaker so that these resources only start together on the same node, and that they start in the proper order. I have added the DRBD devices to a Master/Slave object, as outlined in http://www.linbit.com/fileadmin/tech-guides/ha-nfs.pdf . I would like them to start in the following order (and stop in the reverse order):
ms_drbd_r0
ms_drbd_r1
ms_drbd_r2
p_filesystem_r0
p_filesystem_r1
p_filesystem_r2
p_virtualdomain_vm0
I added the 3 filesystem primitives to a group, g_filesystems, which simplifies this somewhat. Are primitives in a group started in the order they are listed in a group, and stopped in the opposite order?
I read through the Pacemaker Explained documentation on colocation and order, http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-sets-ordering.html however it seems to mostly address the XML and not how to add constraints via the crm console (crm configure). It seems that I cannot add the Master/Slave objects to a group, so I will need to specify each of them individual in the constraints. Is it possible to include more than 2 resources to a constraint, e.g.
colocation c_all_on_one inf: ms_drbd_r0:Master ms_drbd_r1:Master ms_drbd_r2:Master g_filesystems p_virtualdomain_vm0
Or, can a single colocation or order constraint only contain 2 resources? If so would I need to chain several constraints together, like this:
colocation c_r0-r1 inf: ms_drbd_r0:Master ms_drbd_r1:Master
colocation c_r1-r2 inf: ms_drbd_r1:Master ms_drbd:r2:Master
colocation c_r2-fs inf: ms_drbd_r2:Master g_filesystems
colocation c_fs_vm0 inf: g_filesystems p_virtualdomain_vm0
Which syntax is supported and how can I achieve these colocation and order constraints?
Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20120210/70679440/attachment-0003.html>
More information about the Pacemaker
mailing list