Product SiteDocumentation Site

5.3. 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: heartbeat, lsb, ocf, 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 LSB resource
  <primitive id="Email" class="lsb" type="exim"/>

Note

One of the main drawbacks to LSB resources is that they do not allow any parameters
or, for an OCF resource:
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>


or, finally for the equivalent legacy Heartbeat resource:
Example 5.3. An example Heartbeat resource

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


Note

Heartbeat resources take only ordered and unnamed parameters. The supplied name therefor indicates the order in which they are passed to the script. Only single digit values are allowed.