Resources are any type of service that a computer provides. Resources are
known to High Availability when they may be controlled by RAs (Resource Agents), which
are LSB scripts, OCF scripts, or legacy Heartbeat 1 resources. All
resources can be configured with the crm command or as
XML in the CIB (Cluster Information Base) in the
resources section. For an overview of available
resources, look at Chapter 15, HA OCF Agents.
To add an IP address 10.10.0.1
as a resource to the current configuration, use the crm
command:
Procedure 6.3. Creating an IP Address Cluster Resource
Run the crm command as system administrator. The
prompt changes to crm(live).
Switch to the configure subcommand:
crm(live)# configureCreate an IP address resource:
crm(live)configure# resource primitive myIP ocf:heartbeat:IPaddr params ip=10.10.0.1
![]() | |
When configuring a resource with High Availability, the same resource should not be initialized by init. High availability is be responsible for all service start or stop actions. | |
If the configuration was successful, a new resource appears in crm_mon that is started on a random node of your cluster.
To migrate a resource to another node, do the following: