10.3 Using Cluster Resource Templates

Templates simplify the process of creating similar or identical cluster resources. For example, templates are helpful when you want to create multiple instances of the same resource on different servers. Several templates are provided for you. You can also create templates for any server application or resource you want to add to your cluster.

10.3.1 Default Resource Templates

Novell Cluster Services provides several cluster resource templates that you can use on physical servers, virtualization host servers, and virtual machine (VM) guest servers (DomU). You can also create your own templates or personalize the default templates by using the Clusters plug-in for iManager. See Section 10.3.3, Creating a Resource Template. Third-party templates might also available for third-party applications; see the vendor documentation.

Table 10-1 identifies the cluster resource templates that can be used for OES services and storage on physical servers and virtual machine guest servers:

Table 10-1 Cluster Resource Templates for Physical Servers and VM Guest Servers

Cluster Resource Template

OES 11 and Later Product

AV

Novell Archive and Version Services

DHCP

Novell Dynamic Host Configuration Protocol using an NSS pool

Novell Dynamic Host Configuration Protocol using a Linux POSIX File System

DNS

Novell Domain Name System

Generic File System (Generic_FS)

LVM volume groups

Generic IP Service

This template can be modified to create cluster resources for certain server applications that run on your cluster.

iFolder

Novell iFolder 3.9

The template scripts contain examples for NSS pools and LVM volume groups.

iPrint

Novell iPrint

MySQL

MySQL 5.0x for Linux

Samba

Novell Samba

Third-party templates

See your vendor documentation.

Novell Cluster Services provides the following templates for use by the Xen VM host server (Dom0). They are the only two templates supported for use in the virtualization host server environment. They are not supported for use by a VM guest server. The templates are generic and can be modified to start or stop different virtualization host server software.

Table 10-2 Cluster Resource Templates for Virtualization Host Environments

Cluster Resource Template

Use

Xen

Use to configure the cluster resource for a virtual machine.

This template is available only on a virtualization host server. See Section 15.2.1, Creating a Xen Virtual Machine Cluster Resource.

XenLive

Use to configure the cluster resource for a virtual machine. It provides an additional function to allow a virtual machine resource migration (manual) without the need to boot or bring up the virtual machine on the cluster node where the virtual machine has been migrated.

This template is available only on a virtualization host server. See Section 15.2.3, Setting Up Live Migration.

10.3.2 Viewing or Modifying a Resource Template in iManager

You can view or manage the Novell Cluster Services resource templates from the Cluster Options page in the Clusters plug-in for iManager. Ensure that you use the Clusters plug-in to modify the properties of the resource template. The modified settings apply for all subsequent cluster resources that you create from the template.

  1. In iManager, select Clusters > My Clusters.

  2. Select the cluster that you want to manage.

    If the cluster does not appear in your list, add the cluster to your list as described in Section 8.2, Setting Up a Personalized List of Clusters to Manage.

  3. Select the Cluster Options tab to access the templates.

  4. Click the template name to view or modify the properties for the template.

    For example, the following image shows the Properties page for the Generic File System template:

  5. Click the tabs to view or modify the default property settings for the resource template.

    The process for modifying a resource template is similar to modifying the settings for a cluster resource. If you modify a setting on the page, click Apply before you click the next tab in order to save the changes.

  6. Click OK

10.3.3 Creating a Resource Template

Templates help ensure that all of the necessary definition information, dependent services to be loaded, unloaded, or monitored, and the shared service or storage are entered correctly. You can use the default templates as a guide for what types of information to include in your personalized template, as well as the sequence of commands for loading, unloading, or monitoring a resource.

  1. In iManager, select Clusters > My Clusters.

  2. Select the cluster that you want to manage.

    If the cluster does not appear in your list, add the cluster to your list as described in Section 8.2, Setting Up a Personalized List of Clusters to Manage.

  3. Select the Cluster Options tab to access the templates.

  4. Click the New link.

  5. Specify Template as the resource type you want to create by clicking the Template radio button, then click Next.

  6. In Cluster Resource Name, specify the name of the template you want to create.

  7. If desired, in Inherit from Template, browse to the Cluster object and select the existing resource template in the Cluster container that you want to personalize for the new template.

  8. Ensure that the Define Additional Properties check box is selected, then click Next to continue to the Load Script page.

  9. On the Load Script page, configure the load script for the cluster resource template.

    1. Edit or add variables with example values for your template configuration, such as the mount point, IP address, volume group name, file system type, and mount device.

    2. Edit or add any lines to the load script that are required to load dependent services such as web servers or file access protocols.

    3. Edit or add the necessary commands to the script to load the resource on the server.

      For example, this might include bind command for the NCP service and the mount commands for the shared disks and file systems.

    4. Specify the default Load Script Timeout value, then click Next to continue to the Unload Script page.

      The timeout value determines how much time the script is given to complete. If the script does not complete within the specified time, the resource becomes comatose. Cluster Services marks the process as failed right after the defined timeout expires, but it must wait for the process to conclude before it can start other resource operations.

  10. On the Unload Script page, configure the unload script for the cluster resource template.

    1. Edit or add variables with example values for your template configuration, such as the mount point, IP address, volume group name, file system type, and mount device.

    2. Edit or add the necessary commands to the script to unload the resource from the server.

      For example, this might include unbind command for the NCP service and the dismount commands for the shared disks and file systems.

    3. Edit or add any lines to the unload script that are required to unload the dependent services that are loaded by this cluster resource.

    4. Specify the default Unload Script Timeout value, then click Next to continue to the Monitor Script page.

      The timeout value determines how much time the script is given to complete. If the script does not complete within the specified time, the resource becomes comatose when migrating to another node. Cluster Services marks the process as failed right after the defined timeout expires, but it must wait for the process to conclude before it can start other resource operations.

  11. On the Monitor Script page, configure the monitor script for the cluster resource template.

    1. Edit or add the variables with example values for your template configuration, such as the mount point, IP address, volume group name, file system type, and mount device.

    2. Edit or add the necessary commands to the script to monitor the resource on the server.

      You can use the same commands that are used at the Linux terminal console.

      The resource templates included with Novell Cluster Services for Linux include resource monitor scripts that you can customize.

    3. Specify the default Monitor Script Timeout value, then click Next.

      The timeout value determines how much time the script is given to complete. If the script does not complete within the specified time, the failure action the administrator chooses for monitoring (comatose, migrate, or reboot) initiates. Cluster Services marks the process as failed right after the defined timeout expires, but it must wait for the process to conclude before it can start other resource operations.

  12. On the Resource Policies page, specify the default Start, Failover, and Failback modes, then click Next.

  13. On the Resource Preferred Nodes page, specify the node assignments for the resource template, then click Finish.

    The template you created is saved to the Cluster container of the cluster you selected. If you personalized an existing template, both the old template and the new template are in the container.

10.3.4 Synchronizing Locally Modified Resource Templates with Templates in eDirectory

You can also view the resource templates outside of iManager. They are cached as /var/opt/novell/ncs/*_Template.* files on the master node of the cluster. Typically, you modify the templates by using the Clusters plug-in to iManager as described in Section 10.3.2, Viewing or Modifying a Resource Template in iManager. However, if you add new template files or modify the files locally on the master cluster node, you must synchronize those changes with the resource templates and scripts that are held in the Cluster container in eDirectory.

To synchronize the locally modified resource templates with those held in the Cluster container in eDirectory,

  1. Log in to the master node of the cluster as the root user, then open a terminal console.

  2. At the command prompt, enter the following commands:

    /opt/novell/ncs/bin/ncstempl.py
    
    /opt/novell/ncs/bin/ncs-configd.py -init