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
Available Resource Agent (RA) Classes:
– heartbeat
– lsb
– ocf
– stonith
How to specify classes at the CRM shell:
What operations (op) exist for primitive resources?
– monitor
– stop
– start
Resource types:
* primitive
* master/slave
* colocation
* group
Syntax, by resource type:
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.