Once your cluster is installed and set up as described in Chapter 2, Installation and Setup, you can start adding resources to your configuration. Configure resources either with the Heartbeat GUI or manually by using the command line tools.
In the following, find an example of how to configure an IP address as a resource either manually or with the Heartbeat GUI.
Creating a sample cluster resource and migrating it to another server can help you test to ensure your Heartbeat cluster is functioning properly. A simple resource to configure and migrate is an IP address.
Procedure 3.1. Creating an IP Address Cluster Resource
Start the HA Management Client and log in to the cluster as described in Section 4.1, “Graphical HA Management Client”.
Click , then click , or click the + button.
Choose as the resource item type, then click .
Enter a (name) for the IP
address resource. For example, ipaddress1.
In the section of the page, scroll
down the list and select IPaddr (OCF Resource
Agent) as the resource type.
In the section of the page, find the line that was added for the IP address resource, click the line once, then click the line again under the heading to open a text field.
Add the IP address for the IP address cluster resource.
Click the button and from the
drop-down list, specify nic as
and eth0 as
,
then click .
The name and value are dependent on your hardware configuration and what you chose for the media configuration during the Heartbeat installation.
Click the button at the bottom of the page to add the resource to the cluster.
Select the resource in the left pane of the main window, then click + to start the new resource on the cluster.
Procedure 3.2. Migrating Resources to Another Node
To migrate the newly created resource to another node in the cluster, you can use either the HA Management Client or the command line.
It the command line, use the following command:
crm_resource -M -rresource_name-Hhostname
For example, to migrate a resource named ipaddress1 to a
cluster node named node2, you would need to
enter:
crm_resource -M -r ipaddress1 -H node2
To use the HA Management Client for migration, select the resource you want to migrate in the left pane of the main window and select +.
In the new window, select ipaddress1 as
to migrate and select
node1 from the
drop-down list.