Setting Up a Simple Testing Resource

Contents

6.1. Configuring a Resource with the GUI
6.2. Manual Configuration of a Resource

Abstract

After your cluster is installed and set up as described in Chapter 3, Installation and Basic Setup with YaST and you have learned how to configure resources either with the GUI or from command line, this chapter provides a basic example for the configuration of a simple resource: an IP address. It demonstrates both approaches to do so, using either the Linux HA Management Client or the crm command line tool.

For the following example, we assume that your cluster consists of at least two nodes.

Configuring a Resource with the GUI

Creating a sample cluster resource and migrating it to another server can help you test to ensure your cluster is functioning properly. A simple resource to configure and migrate is an IP address.

Procedure 6.1. Creating an IP Address Cluster Resource

  1. Start the Linux HA Management Client and log in to the cluster as described in Section 4.1, “Linux HA Management Client”.

  2. In the left pane, switch to the Resources view and in the right pane, select the group to modify and click Edit. The next window shows the basic group parameters and the meta attributes and primitives already defined for that resource.

  3. Click the Primitives tab and click Add.

  4. In the next dialog, set the following parameters to add an IP address as sub-resource of the group:

    1. Enter a unique ID, for example, myIP.

    2. From the Class list, select ocf as resource agent class.

    3. As Provider of your OCF resource agent, select heartbeat.

    4. From the Type list, select IPaddr as resource agent.

    5. Click Forward.

    6. In the Instance Attribute tab, select the IP entry and click Edit (or double-click the IP entry).

    7. As Value, enter the desired IP address, for example, 10.10.0.1 and click OK.

    8. Add a new instance attribute and specify nic as Name and eth0 as Value, then click OK.

      The name and value are dependent on your hardware configuration and what you chose for the media configuration during the installation of the High Availability Extension software.

  5. If all parameters are set according to your wishes, click OK to finish the configuration of that resource. The configuration dialog is closed and the main window shows the modified resource.

To start the resource with the Linux HA Management Client, select Management in the left pane. In the right pane, right-click the resource and select Start (or start it from the toolbar).

To migrate the IP address resource to another node (saturn) proceed as follows:

Procedure 6.2. Migrating Resources to Another Node

  1. Switch to the Management view in the left pane, then right-click the IP address resource in the right pane and select Migrate Resource.

  2. In the new window, select saturn from the To Node drop-down list to move the selected resource to the node saturn.

  3. If you want to migrate the resource only temporarily, activate Duration and enter the time frame for which the resource should migrate to the new node.

  4. Click OK to confirm the migration.