Product SiteDocumentation Site

5.3. Resource Properties

These values tell the cluster which script to use for the resource, where to find that script and what standards it conforms to.

Table 5.1. Properties of a Primitive Resource

Field Description
id
Your name for the resource
class
The standard the script conforms to. Allowed values: ocf, service, upstart, systemd, lsb, stonith
type
The name of the Resource Agent you wish to use. Eg. IPaddr or Filesystem
provider
The OCF spec allows multiple vendors to supply the same ResourceAgent. To use the OCF resource agents supplied with Heartbeat, you should specify heartbeat here.

Resource definitions can be queried with the crm_resource tool. For example
# crm_resource --resource Email --query-xml
might produce:

Example 5.1. An example system resource

<primitive id="Email" class="service" type="exim"/>

Note

One of the main drawbacks to system services (such as LSB, Systemd and Upstart) resources is that they do not allow any parameters!

Example 5.2. An example OCF resource

<primitive id="Public-IP" class="ocf" type="IPaddr" provider="heartbeat">
   <instance_attributes id="params-public-ip">
      <nvpair id="public-ip-addr" name="ip" value="1.2.3.4"/>
   </instance_attributes>
</primitive>