Chapter 4. Configuring FailSafe

Configuring FailSafe involves the following steps:

There are three additional resource types present in CHASE plug-in CDs: NFS, Samba, and Apache.

NFS

The NFS resource type is part of the CHASE-FILESERVER CD.

Adding NFS Resource Information to the Configuration Database (CDB)

This section describes procedures that show you how to create an NFS resource type, resource, resource group, and how to test the NFS resource. These procedures assume that a CDB that does not include NFS has already been created, installed, and tested as described in the Linux FailSafe Administrator's Guide.

Creating an NFS Resource Type

To create an NFS resource type, this subsection assumes that you are already familiar with the concepts of resource types. The NFS resource type defines the following resource attributes.

  • resource-name, which defines the name of the resource and is also the export disk name used as input to the exportfs(1M) command

  • export-info, which lists the export options for the file system used in the exportfs(1M) command

  • filesystem, which is the name of the file system that is used as input to the mount(1M) command

The NFS resource type is created at cluster creation time. If this automatic resource creation fails, the administrator must create the resource type before an NFS resource is created. The NFS resource type must be installed if you want to add an NFS resource to a cluster that was created before the NFS software was installed.

Creating the NFS Resource Type

You can use one of the following methods to create the NFS resource type:

  • Run cluster manager (cmgr) and manually create the resource type. For more information, see the Linux FailSafe Administrator's Guide.

  • Run cluster manager (cmgr) and install the resource type, as follws:

    cmgr> show resource_types installed
    
    template
    Netscape_web
    statd
    Oracle_DB
    MAC_address
    IP_address
    INFORMIX_DB
    filesystem
    volume
    
    cmgr> install resource_type NFS in cluster eagan
    
    cmgr>

  • Use the template scripts supplied with Linux FailSafe located in /usr/lib/failsafe/cmgr-create-resource_type.

  • Execute /usr/lib/failsafe/resource_types/NFS/create_resource_type and include the path of the CDB argument and the cluster name.

    OR

    Use the Load Resource Type GUI task to load the resource type.

Creating an NFS Resource

After you have defined the resource type, the administrator must define the NFS resources based on the resource type. Each resource requires a unique resource name (for example, the NFS resource type is the NFS instance name). Then, the administrator must supply the resource parameters. To create the resource, either use the cluster manager (cmgr), the cmgr-create-resource-NFS scripts, or the GUI.

Example 4-1. Creating an NFS Resource using cmgr

cm2> /usr/lib/failsafe/bin/cluster_mgr
Welcome to SGI Cluster Manager Command-Line Interface

cmgr> define resource /disk5 of resource_type NFS in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

Type specific attributes to create with set command:

Type Specific Attributes - 1: export-info
Type Specific Attributes - 2: filesystem

Resource type dependencies to add:

Resource Dependency Type - 1: filesystem

resource /disk5 ? set export-info to "rw,wsync"
resource /disk5 ? set filesystem to /disk5
resource /disk5 ? done
Successfully created resource /disk5

cmgr> modify resource /disk5 of resource_type NFS in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

Type specific attributes to modify with set command:

Type Specific Attribute - 1: export-info
Type Specific Attribute - 2: filesystem

No resource type dependencies to add

resource disk5 ? add dependency /disk5 of type filesystem
resource disk5 ? done
Successfully modified resource /disk5

cmgr> show resource /disk5 of resource_type NFS

export-info: rw,wsync,anon=root
filesystem: /disk5

Resource dependencies
filesystem /disk5

cmgr> 


Creating an NFS Resource Group

To create a resource group, you must first become familiar with the terms and concepts of FailSafe. A resource group can be created either by the GUI or the cluster manager (cmgr).

To define an effective resource group, you must include all of the resources that the NFS resource is dependent on, such as file systems, and IP addresses. The following example shows the creation of a typical resource group:

cmgr> define resource_group nfsRG in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

resource_group nfs ? set failover_policy to ordered-in-order
resource_group nfs ? add resource /disk5 of resource_type NFS
resource_group nfs ? add resource 128.162.101.20 of resource_type IP_address
resource_group nfs ? add resource /disk5 of resource type filesystem
resource_group nfs ? done
Successfully created resource group nfsRG

cmgr> show resource_group nfsRG in cluster eagan

Resource Group: nfsRG
        Cluster: eagan
        Failover Policy: ordered-in-order

Resources:
       /disk5 (type: NFS)
       128.162.101.20 (type: IP_Addresses)
       /disk5 (type: filesystem)

Samba

The Samba resource type is part of the CHASE-FILESERVER CD.

Adding Samba Resource Information to the Configuration Database (CDB)

This section describes procedures that show you how to create a Samba resource type, resource, resource group, and how to test the Samba resource. These procedures assume that a CDB that does not include Samba has already been created, installed, and tested as described in the Linux FailSafe Administrator's Guide.

Creating a Samba Resource Type

To create a Samba resource type, this subsection assumes that you are already familiar with the concepts of resource types. The Samba resource type defines the following resource attributes.

  • resource-name, which defines the name of the resource and is also the NETBIOS name of the server

  • monitor-level, user can specify 1 (checks process existence) or 2 (smbclient queries to the server)

The Samba resource type is created at cluster creation time. If this automatic resource creation fails, the administrator must create the resource type before a Samba resource is created. The Samba resource type must be installed if you want to add a Samba resource to a cluster that was created before the Samba software was installed.

Creating the Samba Resource Type

You can use one of the following methods to create the Samba resource type:

  • Run cluster manager (cmgr) and manually create the resource type. For more information, see the Linux FailSafe Administrator's Guide.

  • Run cluster manager (cmgr) and install the resource type, as follws:

    cmgr> show resource_types installed
    
    template
    Netscape_web
    statd
    Oracle_DB
    MAC_address
    IP_address
    INFORMIX_DB
    filesystem
    volume
    
    cmgr> install resource_type Samba in cluster eagan
    
    cmgr>

  • Use the template scripts supplied with Linux FailSafe located in /usr/lib/failsafe/cmgr-create-resource_type.

  • Execute /usr/lib/failsafe/resource_types/Samba/create_resource_type and include the path of the CDB argument and the cluster name.

    OR

    Use the Load Resource Type GUI task to load the resource type.

Creating a Samba Resource

After you have defined the resource type, the administrator must define the Samba resources based on the resource type. Each resource requires a unique resource name (for example, the Samba resource type is the Samba instance name). Then, the administrator must supply the resource parameters. To create the resource, either use the cluster manager (cmgr), the cmgr-create-resource-Samba scripts, or the GUI.

Example 4-2. Creating a Samba Resource using cmgr

cm2> /usr/lib/failsafe/bin/cluster_mgr
Welcome to SGI Cluster Manager Command-Line Interface

cmgr> define resource SAMBA/ of resource_type Samba in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

Type specific attributes to create with set command:

Type Specific Attributes - 1: monitor-level

Resource type dependencies to add:

Resource Dependency Type - 1: IP_address

resource SAMBA/ ? set monitor-level to 2
resource SAMBA/ ? done
Successfully created resource /disk5

cmgr> modify resource SAMBA/ of resource_type Samba in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

Type specific attributes to modify with set command:

Type Specific Attribute - 1: monitor-level

No resource type dependencies to add

resource SAMBA/ ? add dependency 128.162.101.22 of type IP_address
resource SAMBA/ ? done
Successfully modified resource SAMBA/

cmgr> show resource SAMBA/ of resource_type Samba

monitor-level:2

Resource dependencies
IP_address 128.162.101.22

cmgr> 


Creating a Samba Resource Group

To create a resource group, you must first become familiar with the terms and concepts of FailSafe. A resource group can be created either by the GUI or the cluster manager (cmgr).

To define an effective resource group, you must include all of the resources that the Samba resource is dependent on, such as file systems, and IP addresses. The following example shows the creation of a typical resource group:

cmgr> create resource_group sambaRG in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

resource_group samba ? set failover_policy to ordered-in-order
resource_group samba ? add resource samba/ of resource_type Samba
resource_group samba ? add resource 128.162.101.22 of resource_type IP_address
resource_group samba ? done
Successfully created resource group sambaRG

cmgr> show resource_group sambaRG in cluster eagan

Resource Group: sambaRG
        Cluster: eagan
        Failover Policy: ordered-in-order

Resources:
       samba/ (type: Samba)
       128.162.101.22 (type: IP_Addresses)

Apache

The Apache resource type is part of the CHASE-WEBSERVER CD.

Adding Apache Resource Information to the Configuration Database (CDB)

This section describes procedures that show you how to create an Apache resource type, resource, resource group, and how to test the Apache resource. These procedures assume that a CDB that does not include Apache has already been created, installed, and tested as described in the Linux FailSafe Administrator's Guide.

Creating an Apache Resource Type

To create an Apache resource type, this subsection assumes that you are already familiar with the concepts of resource types. The Apache resource type defines the following resource attributes.

  • resource-name, which defines the name of the resource

  • admin-scripts, which is the location of Web servers start and stop scripts. This field is mandatory.

  • port-number, which is port number to which the Web server listens to for client requests

  • monitor-level, which is the desired level of Web server monitoring. User can specify either 1 (checks for existence of the Web server process) or 2 (checks by issuing an HTML request to the Web server)

  • web-ipaddr, which is the Web server IP address. This is the IP address to which Web server listens to. This IP address should also be an IP_address resource.

The Apache resource type is created at cluster creation time. If this automatic resource creation fails, the administrator must create the resource type before an Apache resource is created. The Apache resource type must be installed if you want to add an Apache resource to a cluster that was created before the Apache software was installed.

Creating the Apache Resource Type

You can use one of the following methods to create the Apache resource type:

  • Run cluster manager (cmgr) and manually create the resource type. For more information, see the Linux FailSafe Administrator's Guide.

  • Run cluster manager (cmgr) and install the resource type, as follws:

    cmgr> show resource_types installed
    
    template
    Netscape_web
    statd
    Oracle_DB
    MAC_address
    IP_address
    INFORMIX_DB
    filesystem
    volume
    
    cmgr> install resource_type Apache in cluster eagan
    
    cmgr>

  • Use the template scripts supplied with Linux FailSafe located in /usr/lib/failsafe/cmgr-create-resource_type.

  • Execute /usr/lib/failsafe/resource_types/Apache/create_resource_type and include the path of the CDB argument and the cluster name.

    OR

    Use the Load Resource Type GUI task to load the resource type.

Creating an Apache Resource

After you have defined the resource type, the administrator must define the Apache resources based on the resource type. Each resource requires a unique resource name (for example, the Apache resource type is the Apache instance name). Then, the administrator must supply the resource parameters. To create the resource, either use the cluster manager (cmgr), the cmgr-create-resource-Apache scripts, or the GUI.

Example 4-3. Creating an Apache Resource using cmgr

cm2> /usr/lib/failsafe/bin/cluster_mgr
Welcome to SGI Cluster Manager Command-Line Interface

cmgr> define resource ha80 of resource_type Apache in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

Type specific attributes to create with set command:

Type Specific Attributes - 1: admin-scripts
Type Specific Attributes - 2: part-number
Type Specific Attributes - 3: monitor-level
Type Specific Attributes - 4: web-ipaddr

Resource type dependencies to add:

Resource Dependency Type - 1: IP_address

resource ha80 ? set admin-scripts to /usr/apache/ha80
resource ha80 ? set part-number to 80
resource ha80 ? set monitor-level to 2
resource ha80 ? set web-ipaddr to 128.162.101.2
resource ha80 ? done
Successfully created resource ha80

cmgr> modify resource ha80 of resource_type Apache in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

Type specific attributes to modify with set command:

Type Specific Attributes - 1: admin-scripts
Type Specific Attributes - 2: part-number
Type Specific Attributes - 3: monitor-level
Type Specific Attributes - 4: web-ipaddr

No resource type dependencies to add

resource ha80 ? add dependency 128.162.101.22 type IP-address
resource ha80 ? 
resource ha80 ? done
Successfully modified resource ha80

cmgr> show resource ha80 of resource_type Apache

admin-scripts: /usr/apache/ha80
part-number: 80
monitor-level: 2
web-ipaddr: 128.162.101.22

Resource dependencies
IP_address 128.162.101.22

cmgr> 


Creating an Apache Resource Group

To create a resource group, you must first become familiar with the terms and concepts of FailSafe. A resource group can be created either by the GUI or the cluster manager (cmgr).

To define an effective resource group, you must include all of the resources that the Apache resource is dependent on, such as file systems, and IP addresses. The following example shows the creation of a typical resource group:

cmgr> create resource_group apacheRG in cluster eagan
Enter commands, when finished enter either "done" or "cancel"

resource_group apache ? set failover_policy to ordered-in-order
resource_group apache ? add resource ha80 of resource_type Apache
resource_group apache ? add resource 128.162.101.22 of resource_type IP_address
resource_group apache ? done
Successfully created resource group apacheRG

cmgr> show resource_group apacheRG in cluster eagan

Resource Group: apacheRG
        Cluster: eagan
        Failover Policy: ordered-in-order

Resources:
       ha80 (type: Apache)
       128.162.101.22 (type: IP_Addresses)