Notes on Pacemaker Resource Types and Constraints

The keyword for a standard resource is “primitive”.
You can add a primitive by entering the “configure” sub-menu of the CRM shell.

Example:
   crm configure

    crm(live)configure# primitive ClusterIP \
    ocf:heartbeat:IPaddr2 params ip=”192.168.10.122″ cidr_netmask=”24″

Available Resource Agent (RA) Classes:
– heartbeat
– lsb
– ocf
– stonith

How to specify classes at the CRM shell:

crm(live)configure# primitive <some_name> <class>:<provider>:<script> <params>

What operations (op) exist for primitive resources?
– monitor
– stop
– start

Resource types:
* primitive
* master/slave
* colocation
* group

Syntax, by resource type:

   crm configure primitive <class>:<provider>:<script>
   crm configure ms <class>:<provider>:<script>
   crm configure colocation <resource1> <resource2>
   crm configure group <resource1> <resource2> …

Constraints:
* colocation
* group

Colocation is a location constraint that tells Pacemaker which resources to run together. It can specify any number of resources, and either an Inf: or -Inf: to specify whether these should be always run at the same location, or never at the same location.

The Inf:  means “infinity points”, when referring to how many points something has. This is how Pacemaker weighs its decisions to move something. Something with infinity points is always done.

Groups are a simplified constraint to keep multiple resources running together. You can tell a group to start in a particular location, before or after some other service is already running. Grouping resources makes them easier to manage.

Leave a reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>