Product SiteDocumentation Site

5.3. Resource Properties

Aceste valori îi spun clusterului care script să îl folosească pentru resursă, unde să găsească acel script şi care sunt standardele la care acesta aderă.

Tabel 5.1. Proprietăţile unei Resurse Primitive

Câmp Descriere
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:

Exemplu 5.1. An example system resource

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

Notă

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

Exemplu 5.2. Un exemplu de resursă OCF

<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>