Product SiteDocumentation Site

5.4. Opzioni delle risorse

Options are used by the cluster to decide how your resource should behave and can be easily set using the --meta option of the crm_resource command.

Tabella 5.2. Opzioni per una Primitive Resource

Campo Default Descrizione
priority
0
If not all resources can be active, the cluster will stop lower priority resources in order to keep higher priority ones active.
target-role
Started
In quale stato il cluster deve cercare di tenere questa risorsa? Valori permessi:
* Stopped - Force the resource to be stopped
* Started - Allow the resource to be started (In the case of multi-state resources, they will not promoted to master)
* Master - Allow the resource to be started and, if appropriate, promoted
is-managed
TRUE
Is the cluster allowed to start and stop the resource? Allowed values: true, false
resource-stickiness
Calculated
How much does the resource prefer to stay where it is? Defaults to the value of resource-stickiness in the rsc_defaults section
requires
Calculated
Under what conditions can the resource be started. (Since 1.1.8)
Defaults to fencing unless stonith-enabled is false or class is stonith - under those conditions the default is quorum. Possible values:
* nothing - can always be started
* quorum - The cluster can only start this resource if a majority of the configured nodes are active
* fencing - The cluster can only start this resource if a majority of the configured nodes are active and any failed or unknown nodes have been powered off.
* unfencing - The cluster can only start this resource if a majority of the configured nodes are active and any failed or unknown nodes have been powered off and only on nodes that have been unfenced indexterm: Option[requires,Resource]
migration-threshold
INFINITY (disabled)
How many failures may occur for this resource on a node, before this node is marked ineligible to host this resource.
failure-timeout
0 (disabled)
How many seconds to wait before acting as if the failure had not occurred, and potentially allowing the resource back to the node on which it failed.
multiple-active
stop_start
Cosa dovrebbe fare il cluster se mai trovasse la risorsa attiva su più di un nodo. Valori permessi:
* block - mark the resource as unmanaged
* stop_only - stop all active instances and leave them that way
* stop_start - stop all active instances and start the resource in one location only

Se sono stati eseguiti i seguenti comandi nella precedente risorsa LSB Email
# crm_resource --meta --resource Email --set-parameter priority --property-value 100
# crm_resource --meta --resource Email --set-parameter multiple-active --property-value block
la definizione della risorsa risultate sarebbe

Esempio 5.3. Una risorsa LSB con le opzioni cluster

<primitive id="Email" class="lsb" type="exim">
   <meta_attributes id="meta-email">
      <nvpair id="email-priority" name="priority" value="100"/>
      <nvpair id="email-active" name="multiple-active" value="block"/>
   </meta_attributes>
</primitive>