3.7 Setting Up Novell Cluster Services

If you created a new cluster, you now need to create and configure cluster resources. You might also need to create shared disk partitions and NSS pools if they do not already exist and, if necessary, configure the shared disk NSS pools to work with Novell Cluster Services. Configuring shared disk NSS pools to work with Novell Cluster Services can include cluster enabling the pools.

You must use iManager or NSSMU to cluster enable shared NSS disk pools. iManager must be used to create cluster resources.

3.7.1 Creating NSS Shared Disk Partitions and Pools

Before creating disk partitions and pools on shared storage (storage area network or SAN), Novell Cluster Services must be installed. You should carefully plan how you want to configure your shared storage prior to installing Novell Cluster Services. For information on configuring access to a NetWare server functioning as an iSCSI target, see Accessing iSCSI Targets on NetWare Servers from Linux Initiators.

To create NSS pools on shared storage, use either the server-based NSS Management Utility (NSSMU) or iManager. These tools can also be used to create NSS volumes on shared storage.

NSS pools can be cluster enabled at the same time they are created or they can be cluster enabled at a later time after they are created. To learn more about NSS pools, see Pools in the Novell Storage Services Administration Guide.

Creating Shared NSS Pools Using NSSMU

  1. Start NSSMU by entering nssmu at the server console of a cluster server.

  2. Select Devices from the NSSMU main menu and mark all shared devices as sharable for clustering.

    On Linux, shared disks are not by default marked sharable for clustering. If a device is marked as sharable for clustering, all partitions on that device will automatically be sharable.

    You can press F6 to individually mark devices as sharable.

  3. From the NSSMU main menu, select Pools, press Insert, and then type a name for the new pool you want to create.

  4. Select the device on your shared storage where you want the pool created.

    Device names might be labelled something like /dev/sdc.

  5. Choose whether you want the pool to be activated and cluster enabled when it is created.

    The Activate on Creation feature is enabled by default. This causes the pool to be activated as soon as it is created. If you choose not to activate the pool, you will have to manually activate it later before it can be used.

    The Cluster Enable on Creation feature is also enabled by default. If you want to cluster enable the pool at the same time it is created, accept the default entry (Yes) and continue with Step 6. If you want to cluster enable the pool at a later date, change the default entry from Yes to No, select Create, and then go to Creating NSS Volumes.

  6. Specify the virtual server name, IP address, and advertising protocols.

    NOTE:The CIFS and AFP check boxes can be checked, but CIFS and AFP functionality does not apply to Linux. Checking the checkboxes has no effect.

    When you cluster enable a pool, a virtual Server object is automatically created and given the name of the Cluster object plus the cluster-enabled pool. For example, if the cluster name is cluster1 and the cluster-enabled pool name is pool1, then the default virtual server name will be cluster1_pool1_server. You can edit the field to change the default virtual server name.

    Each cluster-enabled NSS pool requires its own IP address. The IP address is used to provide access and failover capability to the cluster-enabled pool (virtual server). The IP address you assign to the pool remains assigned to the pool regardless of which server in the cluster is accessing the pool.

    You can select or deselect NCP. NCP™ is selected by default, and is the protocol used by Novell clients. Selecting NCP will cause commands to be added to the pool resource load and unload scripts to activate the NCP protocol on the cluster. This lets you ensure that the cluster-enabled pool you just created is highly available to Novell clients.

  7. Select Create to create and cluster enable the pool.

    Repeat the above steps for each additional pool you want to create on shared storage.

    Continue with Creating NSS Volumes.

Creating Shared NSS Pools Using iManager

  1. Start your Internet browser and enter the URL for iManager.

    The URL is http:// server_ip_address/nps/imanager.html. Replace server_ip_address with the IP address or DNS name of a Linux server in the cluster that has iManager installed or with the IP address for Apache-based services.

  2. Enter your username and password.

  3. In the left column, locate Storage, then click the Pools link.

  4. Enter a cluster server name or browse and select one, then click the New link.

  5. Specify the new pool name, then click Next.

  6. Check the box next to the device where you want to create the pool, then specify the size of the pool.

  7. Choose whether you want the pool to be activated and cluster-enabled when it is created, then click Next.

    The Activate On Creation check box is used to determine if the pool you are creating is to be activated as soon as it is created. The Activate On Creation check box is checked by default. If you uncheck the check box, you must manually activate the pool later before it can be used.

    If you want to cluster enable the pool at the same time it is created, leave the Cluster Enable on Creation check box checked and continue with Step 8.

    If you want to cluster enable the pool at a later date, uncheck the check box, click Create, and continue with Cluster Enabling NSS Pools and Volumes.

  8. Specify the virtual server name, pool IP address, and advertising protocols, then click Finish.

    NOTE:The CIFS and AFP check boxes can be checked, but CIFS and AFP functionality does not apply to Linux. Checking the check boxes has no effect.

    When you cluster-enable a pool, a virtual Server object is automatically created and given the name of the Cluster object plus the cluster-enabled pool. For example, if the cluster name is cluster1 and the cluster-enabled pool name is pool1, then the default virtual server name will be cluster1_pool1_server. You can edit the field to change the default virtual server name.

    Each cluster-enabled NSS pool requires its own IP address. The IP address is used to provide access and failover capability to the cluster-enabled pool (virtual server). The IP address you assign to the pool remains assigned to the pool regardless of which server in the cluster is accessing the pool.

    You can select or deselect NCP. NCP is selected by default, and is the protocol used by Novell clients. Selecting NCP causes commands to be added to the pool resource load and unload scripts to activate the NCP protocol on the cluster. This lets you ensure that the cluster-enabled pool you just created is highly available to Novell clients.

3.7.2 Creating NSS Volumes

If you plan on using a shared disk system in your cluster and need to create new NSS pools or volumes after installing Novell Cluster Services, the server used to create the volumes should already have NSS installed and running.

Using NSSMU

  1. From the NSSMU main menu, select Volumes, then press Insert and type a name for the new volume you want to create.

    Each shared volume in the cluster must have a unique name.

  2. Select the pool where you want the volume to reside.

  3. Review and change volume attributes as necessary.

    You might want to enable the Flush Files Immediately feature. This will help ensure the integrity of volume data. Enabling the Flush Files Immediately feature improves file system reliability but hampers performance. You should consider this option only if necessary.

  4. Either specify a quota for the volume or accept the default of 0 to allow the volume to grow to the pool size, then select Create.

    The quota is the maximum possible size of the volume. If you have more than one volume per pool, you should specify a quota for each volume rather than allowing multiple volumes to grow to the pool size.

  5. Repeat the above steps for each cluster volume you want to create.

Depending on your configuration, the new volumes will either mount automatically when resources that require them start or will have to be mounted manually on individual servers after they are up.

Using iManager

  1. Start your Internet browser and enter the URL for iManager.

    The URL is http:// server_ip_address/nps/imanager.html. Replace server_ip_address with the IP address or DNS name of a Linux server in the cluster that has iManager installed or with the IP address for Apache-based services.

  2. Enter your username and password.

  3. In the left column, locate Storage, then click the Volumes link.

  4. Enter a cluster server name or browse and select one, then click the New link.

  5. Specify the new volume name, then click Next.

  6. Check the box next to the cluster pool where you want to create the volume and either specify the size of the volume (Volume Quota) or check the box to allow the volume to grow to the size of the pool, then click Next.

    The volume quota is the maximum possible size of the volume. If you have more than one volume per pool, you should specify a quota for each volume rather than allowing multiple volumes to grow to the pool size.

  7. Review and change volume attributes as necessary.

    The Flush Files Immediately feature helps ensure the integrity of volume data. Enabling the Flush Files Immediately feature improves file system reliability but hampers performance. You should consider this option only if necessary.

  8. Choose whether you want the volume activated and mounted when it is created, then click Finish.

3.7.3 Cluster Enabling NSS Pools and Volumes

If you have a shared disk system that is part of your cluster and you want the pools and volumes on the shared disk system to be highly available to NCP clients, you will need to cluster enable those pools and volumes. Cluster enabling a pool or volume allows it to be moved or mounted on different servers in the cluster in a manner that supports transparent client reconnect.

Cluster-enabled volumes do not appear as cluster resources. NSS pools are resources, and load and unload scripts apply to pools and are automatically generated for them. Each cluster-enabled NSS pool requires its own IP address. This means that each cluster-enabled volume does not have an associated load and unload script or an assigned IP address.

NSS pools can be cluster enabled at the same time they are created. If you did not cluster enable a pool at creation time, the first volume you cluster enable in the pool automatically cluster enables the pool where the volume resides. After a pool has been cluster enabled, you need to cluster enable the other volumes in the pool if you want them to be mounted on another server during a failover.

When a server fails, any cluster-enabled pools being accessed by that server will fail over to other servers in the cluster. Because the cluster-enabled pool fails over, all volumes in the pool will also fail over, but only the volumes that have been cluster enabled will be mounted. Any volumes in the pool that have not been cluster enabled will have to be mounted manually. For this reason, volumes that aren't cluster enabled should be in separate pools that are not cluster enabled.

If you want each cluster-enabled volume to be its own cluster resource, each volume must have its own pool.

Some server applications don't require NCP client access to NSS volumes, so cluster enabling pools and volumes might not be necessary. Pools should be deactivated and volumes should be dismounted before being cluster enabled.

  1. Start your Internet browser and enter the URL for iManager.

    The URL is http:// server_ip_address/nps/imanager.html. Replace server_ip_address with the IP address or DNS name of a Linux server in the cluster that has iManager installed or with the IP address for Apache-based services.

  2. Enter your username and password.

  3. In the left column, locate Clusters, then click the Cluster Options link.

    iManager displays four links under Clusters that you can use to configure and manage your cluster.

  4. Enter the cluster name or browse and select it, then click the New link.

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

  6. Enter the name of the pool you want to cluster-enable, or browse and select one.

  7. (Optional) Change the default name of the virtual Server object.

    When you cluster enable a pool, a Virtual Server object is automatically created and given the name of the Cluster object plus the cluster-enabled pool. For example, if the cluster name is cluster1 and the cluster-enabled pool name is pool1, then the default virtual server name will be cluster1_pool1_server.

    If you are cluster-enabling a volume in a pool that has already been cluster-enabled, the virtual Server object has already been created, and you can't change the virtual Server object name.

  8. Enter an IP address for the pool.

    Each cluster-enabled NSS pool requires its own IP address. The IP address is used to provide access and failover capability to the cluster-enabled pool (virtual server). The IP address assigned to the pool remains assigned to the pool regardless of which server in the cluster is accessing the pool.

  9. Select an advertising protocol.

    NOTE:The CIFS and AFP check boxes can be checked, but CIFS and AFP functionality does not apply to Linux. Checking the check boxes has no effect.

    You can select or deselect NCP. NCP™ is selected by default, and is the protocol used by Novell clients. Selecting NCP will cause commands to be added to the pool resource load and unload scripts to activate the NCP protocol on the cluster. This lets you ensure that the cluster-enabled pool you just created is highly available to Novell clients.

  10. (Optional) Check the Online Resource after Create check box.

    This causes the NSS volume to automatically mount when the resource is created.

  11. Ensure that the Define Additional Properties check box is checked, then click Next and continue with Setting Start, Failover, and Failback Modes.

NOTE:Cluster resource load and unload scripts are automatically generated for pools when they are cluster-enabled.

When the volume resource is brought online, the pool will automatically be activated. You don't need to activate the pool at the server console.

If you delete a cluster-enabled volume, Novell Cluster Services automatically removes the volume mount command from the resource load script. If you delete a cluster-enabled pool, Novell Cluster Services automatically removes the Pool Resource object and the virtual server object from eDirectory. If you rename a cluster-enabled pool, Novell Cluster Services automatically updates the pool resource load and unload scripts to reflect the name change. Also, NSS automatically changes the Pool Resource object name in eDirectory.

3.7.4 Creating Traditional Linux Volumes on Shared Disks

Although you can use the same Linux tools and procedures used to create partitions on local drives to create Linux file system partitions on shared storage, EVMS is the recommended tool. Using EVMS to create partitions, volumes, and file systems will help prevent data corruption caused by multiple nodes accessing the same data. You can create partitions and volumes using any of the journaled Linux file systems (EXT3, Reiser, etc.). To cluster enable Linux volumes, see Section 3.7.6, Cluster Enabling Traditional Linux Volumes on Shared Disks.

HINT:EVMS virtual volumes are recommended for Novell Cluster Services because they can more easily be expanded and failed over to different cluster servers than physical devices. You can enter man evms at the Linux server console to reference the evms man page, which provides additional instructions and examples for evms.

You can also enter man mount at the Linux server console to reference the mount man page, which provides additional instructions and examples for the mount command.

The following sections provide the necessary information for using EVMS to create a tradtional Linux volume and file system on a shared disk:

WARNING:EVMS administration utilities (evms, evmsgui, and evmsn) should not be running when they are not being used. EVMS utilities lock the EVMS engine, which prevents other evms-related actions from being performed. This affects both NSS and traditional Linux volume actions.

NSS and traditional Linux volume cluster resources should not be migrated while any of the EVMS administration utilities are running.

Ensuring That the Shared Disk Is not a Compatibility Volume

New EVMS volumes are by default configured as compatibility volumes. If any of the volumes on your shared disk (that you plan to use in your cluster) are compatibility volumes, you must delete them.

  1. At the Linux server console, enter evmsgui.

  2. Click the Volumes tab, then right-click the volume on the shared disk and select Display details.

  3. Click the Page 2 tab and determine from the Status field if the volume is a compatibility volume.

    If the volume is a compatibility volume or has another segment manager on it, continue with Step 3.a below.

    1. Click the Volumes tab, right-click the volume, then select Delete.

    2. Select the volume, then click Recursive Delete.

    3. (Conditional) If a Response Required pop-up appears, click the Write zeros button.

    4. (Conditional) If another pop-up appears, click Continue to write 1024 bytes to the end of the volume.

Removing Other Segment Managers

If any of the shared disks you plan to use with your cluster have other segment managers, you must delete them as well.

  1. In evmsgui, click the Disks tab, then right-click the disk you plan to use for a cluster resource.

  2. Select remove segment manager from Object.

    This option only appears if there is another segment manager for the selected disk.

  3. Select the listed segment manager and click Remove.

Creating a Cluster Segment Manager Container

To use a traditional Linux volume with EVMS as a cluster resource, you must use the Cluster Segment Manager (CSM) plug-in for EVMS to create a CSM container.

NOTE:CSM containers require Novell Cluster Services (NCS) to be running on all nodes that access the CSM container. Do not make to modifications to EVMS objects unless NCS is running.

CSM containers can provide exclusive access to shared storage.

  1. In evmsgui, click Actions, select Create, then select Container.

  2. Select Cluster Segment Manager, then click Next.

  3. Select the disks (storage objects) you want to place in the container, then click Next.

  4. On the Configuration Options page, select the node where you are creating the container, specify Private as the type, then choose a name for the container.

    The name must be one word, must consist of standard alphanumeric characters, and must not be any of the following reserved words:

    • Container

    • Disk

    • EVMS

    • Plugin

    • Region

    • Segment

    • Volume

  5. Click Save to save your changes.

Adding an Additional Segment Manager

After creating a CSM container, you can optionally add an additional non-CSM segment manager container on top of the CSM container you just created. The benefit of this is that other non-CSM segment manager containers allow you to create multiple smaller EVMS volumes on your EVMS disk. You can then add additional EVMS volumes or expand or shrink existing EVMS volumes to utilize or create additional free space on your EVMS disk. In addition, this means that you can also have different file system types on your EVMS disk.

A CSM container uses the entire EVMS disk, which means that creating additional volumes or expanding or shrinking volumes is not possible. And, because only one EVMS volume is possible in the container, only one file system type is allowed in that container.

  1. In evmsgui, click Actions, select Add, then select Segment Manager to Storage Object.

  2. Choose the desired segment manager, then click Next.

    Most of the segment manager will work. The DOS segment manager is added by default for some EVMS operations.

  3. Choose the storage object (container) you want to add the segment manager to, then click Next.

  4. Select the disk type (Linux is the default), click Add, then click OK.

  5. Click Save to save your changes.

Creating an EVMS Volume

  1. In evmsgui, click Actions, select Create, and then EVMS Volume.

  2. Select the container you just created (either the CSM container or the additional segment manager container) and specify a volume name.

  3. Click Create, then click Save.

Creating a File System on the EVMS Volume

  1. In evmsgui, click the Volumes tab and right-click the volume you just created.

  2. Select Make File System, choose a traditional Linux file system from the list, then click Next.

  3. Specify a volume label, then click Make.

  4. Save your changes by clicking Save.

3.7.5 Expanding EVMS Volumes on Shared Disks

As your storage needs increase, it might become necessary to add more disk space or drives to your shared storage system. EVMS provides features that allow you to expand or move existing volumes.

The two supported methods for creating additional space for an existing volume are:

  • Expanding the volume to a separate disk

  • Moving the volume to a larger disk

Expanding a Volume to a Separate Disk

  1. Unmount the file system for the volume you want to expand.

  2. In evmsgui, click the Volumes tab, right-click the volume you want to expand then select Add Feature.

  3. Select Drive Linking Feature, then click Next.

  4. Provide a name for the drive link, click Add, then save your changes.

  5. Click Actions, select Create, and then click Container.

  6. Select the Cluster Segment Manager, click Next, then select the disk you want to expand the volume to.

    The entire disk is used for the expansion, so you must select a disk that does not have other volumes on it.

  7. Provide the same settings information (name, type, etc.) as the existing container for the volume and save your changes.

  8. Click the Volumes tab, right-click the volume, then click Expand.

  9. Select the volume that you are expanding, then click Next.

  10. Verify the current volume size and the size of the volume after it is expanded, then click Next.

    The expanded volume size should include the size of the disk the volume is being expanded to.

  11. Select the storage device the volume is being expanded to, select Expand, and save your changes.

  12. Click Save and exit evmsgui.

Moving a Volume to a Larger Disk

  1. Unmount the file system for the volume you want to move.

  2. Add a larger disk to the CSM container.

    1. In evmsgui, click Actions, select Create, then click Container.

    2. Select the Cluster Segment Manager, then click Next.

    3. Select the larger disk you want to move the volume to.

      The entire disk is used for the expansion, so you must select a disk that does not have other volumes on it.

    4. Provide the same settings information (name, type, etc.) as the existing container for the volume, then save your changes.

    5. Click Save and exit evmsgui.

  3. Restart evmsgui, click the Containers tab, then expand the container so that the objects under the container appear.

    The new disk should appear as part of the container.

  4. Right-click the object for the disk where the volume resides and select Replace.

  5. Select the object for the disk where the volume will be moved, then click Next.

  6. Save your changes.

    Saving your changes could take a while, depending on volume size and other factors.

  7. Click Save, exit evmsgui, then restart evmsgui.

  8. Click the Volumes tab, right-click the volume, then select Check/Repair filesystem.

    This will run the repair process and ensure no problems exist on the moved volume.

  9. Click the Disks tab, right-click the disk the volume was moved from, then select Remove from container.

  10. Click Save and exit evmsgui.

3.7.6 Cluster Enabling Traditional Linux Volumes on Shared Disks

Cluster enabling a traditional Linux volume allows it to be moved or mounted on different servers in the cluster. This provides a way for clients to reconnect to the volume regardless of which server is hosting it.

EVMS containers are the unit of failover for traditional Linux volumes. Because the EVMS container is the unit of failover, all volumes in a container will also fail over, but only the volumes that are mounted through the cluster resource load script will be mounted. Any volumes in the container that are not mounted through the resource load script will have to be mounted manually.

The following sections contain information on cluster enabling a traditional Linux volume on a shared disk partition:

Creating a Traditional Linux Volume Cluster Resource

Creating a cluster resource for a traditional Linux volume allows it to be moved or mounted on different servers in the cluster.

  1. Start your Internet browser and enter the URL for iManager.

    The URL is http:// server_ip_address/nps/imanager.html. Replace server_ip_address with the IP address or DNS name of an OES server in the cluster that has iManager installed or with the IP address for Apache-based services.

  2. Enter your username and password.

  3. In the left column, locate Clusters, then click the Cluster Options link.

    iManager displays four links under Clusters that you can use to configure and manage your cluster.

  4. Specify the cluster name or browse and select it, then click the New link.

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

  6. Specify the name of the resource you want to create.

    This is the name you will assign the resource for the cluster-enabled volume.

  7. In the Inherit From Template field, specify the Generic_FS_Template.

  8. Select the Define Additional Properties check box, then continue with Configuring Traditonal Linux Volume Load Scripts below.

Configuring Traditonal Linux Volume Load Scripts

The resource load script specifies the commands to start the resource (including mounting the file system) on a server in the cluster, and is required for each Linux volume you cluster enable.

If you are creating a new cluster resource, the load script page should already be displayed. You can start with Step 4.

  1. In the left column of the main iManager page, locate Clusters, then click the Cluster Options link.

  2. Type the cluster name or browse and select it, select the box next to the resource whose load script you want to edit, then click the Properties link.

  3. Click the Scripts tab, then click the Load Script link.

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

    The generic file system template you specified in Step 7 above contains a load script that you must edit to supply information specific to your file system resource.

    The load script from the generic file system template should appear similar to the following example:

    #! /bin/bash
    
    . /opt/novell/ncs/lib/ncsfuncs
    
    # define the IP address
    
    RESOURCE_IP=a.b.c.d
    
    # define the file system type
    
    MOUNT_FS=reiserfs
    
    #define the container name
    
    container_name=name
    
    # define the device
    
    MOUNT_DEV=/dev/evms/$container_name/volume_name
    
    # define the mount point
    
    MOUNT_POINT=/mnt/mount_point
    
    
    
    #activate the container
    
    exit_on_error activate_evms_container $container_name $MOUNT_DEV
    
    # mount the file system
    
    ignore_error mkdir -p $MOUNT_POINT
    
    exit_on_error mount -t $MOUNT_FS $MOUNT_DEV $MOUNT_POINT
    
    # add the IP address
    
    exit_on_error add_secondary_ipaddress $RESOURCE_IP
    
    exit 0
    

    The first section of the above load script example contains mount point, IP address, container name, and file system type/device variables that you must change to customize the script for your specific configuration.

  5. Specify the Load Script Timeout value, then click Apply to save the script or, if you are creating a new cluster resource, 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 resource becomes comatose.

In the above example, if you specified

your load script would appear like the script below.

#! /bin/bash
. /opt/novell/ncs/lib/ncsfuncs
# define the IP address
RESOURCE_IP=123.123.12.12
# define the file system type
MOUNT_FS=reiserfs
#define the container name
container_name=cont1
# define the device
MOUNT_DEV=/dev/evms/$container_name/vol_one
# define the mount point
MOUNT_POINT=/mnt/vol_onemount

#activate the container
exit_on_error activate_evms_container $container_name $MOUNT_DEV
# mount the file system
ignore_error mkdir -p $MOUNT_POINT
exit_on_error mount -t $MOUNT_FS $MOUNT_DEV $MOUNT_POINT
# add the IP address
exit_on_error add_secondary_ipaddress $RESOURCE_IP
exit 0

Configuring Traditional Linux Volume Unload Scripts

The resource unload script specifies the commands to stop the resource (including unmounting the file system) on a server in the cluster, and is also required for each Linux volume you cluster enable. If you are creating a new cluster resource, the unload script page should already be displayed. You can start with Step 4.

  1. In the left column of the main iManager page, locate Clusters, then click the Cluster Options link.

  2. Type the cluster name or browse and select it, select the box next to the resource whose unload script you want to edit, then click the Properties link.

  3. Click the Scripts tab, then click the Unload Script link.

  4. Edit or add the necessary commands to the script to unload or stop the resource on the server.

    The generic file system template you specified in Step 7 above contains an unload script that you must edit to supply information specific to your file system resource.

    The unload script from the generic file system template should appear similar to the following example:

    #!/bin/bash
    
    . /opt/novell/ncs/lib/ncsfuncs
    
    # define the IP address
    
    RESOURCE_IP=a.b.c.d
    
    #define the container name
    
    container_name=name
    
    # define the mount point
    
    MOUNT_POINT=/mnt/mount_point
    
    
    
    #dismount the volume
    
    exit_on_error ncs_dismount $MOUNT_POINT
    
    # del the IP address
    
    ignore_error del_secondary_ipaddress $RESOURCE_IP
    
    # deport the container
    
    exit_on_error deport_evms_container $container_name
    
    # return status
    
    exit 0
    

    The first section of the above unload script example contains mount point, container name, and IP address variables that you must change to customize the unload script for your specific configuration.

  5. Specify the Unload Script Timeout value, then click Apply to save the script or, if you are creating a new cluster resource, click Next and continue with Section 3.7.11, Setting Start, Failover, and Failback Modes.

    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.

In the above example, if you specified

Your unload script would appear like the script below.

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs
# define the IP address
RESOURCE_IP=123.123.12.12
#define the container name
container_name=cont1
# define the mount point
MOUNT_POINT=/mnt/vol_onemount

#dismount the volume
exit_on_error ncs_dismount $MOUNT_POINT
# del the IP address
ignore_error del_secondary_ipaddress $RESOURCE_IP
# deport the container
exit_on_error deport_evms_container $container_name
# return status
exit 0

3.7.7 Creating 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. You can create templates for any server application or resource you want to add to your cluster.

Novell Cluster Services provides the following cluster resource templates:

  • DHCP

  • DNS

  • iFolder 2

  • iPrint

  • MYSQL

  • Samba

  • Generic IP SERVICE

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

  1. Start your Internet browser and enter the URL for iManager.

    The URL is http:// server_ip_address/nps/imanager.html. Replace server_ip_address with the IP address or DNS name of an OES server in the cluster that has iManager installed, or the IP address for Apache-based services.

  2. Enter your username and password.

  3. In the left column, locate Clusters, then click the Cluster Options link.

    iManager displays four links under Clusters that you can use to configure and manage your cluster.

  4. Enter the cluster name or browse and select it, then 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. Enter the name of the template you want to create.

  7. Ensure the Define Additional Properties check box is checked, then continue with Configuring Load Scripts.

    To finish creating a cluster resource template, you need to configure load and unload scripts, set failover and failback modes and, if necessary, change the node assignments for the resource template.

3.7.8 Creating Cluster Resources

Cluster resources must be created for every resource or application you run on servers in your cluster. Cluster resources can include Web sites, e-mail servers, databases, and any other server-based applications or services you want to make available to users at all times.

  1. Start your Internet browser and enter the URL for iManager.

    The URL is http:// server_ip_address/nps/imanager.html. Replace server_ip_address with the IP address or DNS name of a server in the cluster or with the IP address for Apache-based services.

  2. Enter your username and password.

  3. In the left column, locate Clusters, then click the Cluster Options link.

    iManager displays four links under Clusters that you can use to configure and manage your cluster.

  4. Enter the cluster name, or browse and select it, then click the New link.

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

  6. Enter the name of the resource you want to create.

    NOTE:Do not use periods in cluster resource names. Novell clients interpret periods as delimiters. If you use a space in a cluster resource name, that space will be converted to an underscore.

  7. Check the Define Additional Properties check box.

  8. Continue with Configuring Load Scripts.

3.7.9 Configuring Load Scripts

A load script is required for each resource, service, or disk pool in your cluster. The load script specifies the commands to start the resource or service on a server.

If you are creating a new cluster resource, the load script page should already be displayed. You can start with Step 4.

  1. In the left column of the main iManager page, locate Clusters, then click the Cluster Options link.

  2. Enter the cluster name or browse and select it, then check the box next to the resource whose load script you want to edit and click the Properties link.

  3. Click the Scripts tab, then click the Load Script link.

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

    You can then add any lines to the load script that are required to load needed services like Web servers, etc.

  5. Specify the Load Script Timeout value, then click Apply to save the script or, if you are creating a new cluster resource, 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 resource becomes comatose.

3.7.10 Configuring Unload Scripts

Depending on your cluster application or resource, you can add an unload script to specify how the application or resource should terminate. An unload script is not required by all resources, but is required for cluster-enabled Linux partitions. Consult your application vendor or documentation to determine if you should add commands to unload the resource.

If you are creating a new cluster resource, the unload script page should already be displayed. You can start with Step 4.

  1. In the left column of the main iManager page, locate Clusters, then click the Cluster Options link.

  2. Enter the cluster name or browse and select it, check the box next to the resource whose unload script you want to edit, then click the Properties link.

  3. Click the Scripts tab, then click the Unload Script link.

  4. Edit or add the necessary commands to the script to unload the resource on the server.

    You can add any lines to the unload script that are required to unload services that are loaded by this cluster resource.

  5. Specify the Unload Script Timeout value, then click Apply to save the script or, if you are creating a new cluster resource, 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 resource becomes comatose.

3.7.11 Setting Start, Failover, and Failback Modes

You can configure the start, failover, and failback of cluster resources to happen manually or automatically. With the resource Start Mode set to AUTO, the resource automatically starts on a server when the cluster is first brought up. If the resource Start Mode is set to MANUAL, you can manually start the resource on a server when you want, instead of having it automatically start when servers in the cluster are brought up.

With the resource Failover Mode set to AUTO, the resource automatically starts on the next server in the Assigned Nodes list in the event of a hardware or software failure. If the resource Failover Mode is set to MANUAL, you can intervene after a failure occurs and before the resource is moved to another node.

With the resource Failback Mode set to DISABLE, the resource does not fail back to its most preferred node when the most preferred node rejoins the cluster. If the resource Failback Mode is set to AUTO, the resource automatically fails back to its most preferred node when the most preferred node rejoins the cluster. Set the resource Failback Mode to MANUAL to prevent the resource from moving back to its preferred node when that node is brought back online, until you are ready to allow it to happen.

The preferred node is the first server in the list of the assigned nodes for the resource.

If you are creating a new cluster resource, the Resource Policies page should already be displayed. You can start with Step 4.

  1. In the left column of the main iManager page, locate Clusters and then click the Cluster Options link.

  2. Enter the cluster name or browse and select it, check the box next to the resource whose start, failover, or failback modes you want to view or edit, then click the Properties link.

  3. Click the General tab.

  4. (Conditional) Check the Resource Follows Master check box if you want to ensure that the resource runs only on the master node in the cluster.

    If the master node in the cluster fails, the resource will fail over to whichever node becomes the master.

  5. (Conditional) Check the Ignore Quorum check box if you don't want the cluster-wide timeout period and node number limit enforced.

    The quorum default values were set when you installed Novell Cluster Services. You can change the quorum default values by accessing the properties page for the Cluster object.

    Checking this box will ensure that the resource is launched immediately on any server in the Assigned Nodes list as soon as any server in the list is brought online.

  6. Choose the Start, Failover, and Failback modes for this resource.

    The default for both Start and Failover modes is AUTO, and the default for Failback mode is DISABLE.

  7. Continue with Assigning Nodes to a Resource, or if you are creating a new cluster resource, click Next, then continue with Assigning Nodes to a Resource.

3.7.12 Assigning Nodes to a Resource

If you are creating a new cluster resource, the Preferred Nodes page should already be displayed. If you are assigning nodes for an existing resource, the Preferred Nodes page will be displayed as part of the Resource Policies page. You can start with Step 4.

  1. In the left column of the main iManager page, locate Clusters, then click the Cluster Options link.

  2. Enter the cluster name or browse and select it, check the box next to the resource whose start, failover, or failback modes you want to view or edit, then click the Properties link.

  3. Click the General tab.

  4. From the list of unassigned nodes, select the server you want the resource assigned to, then click the right-arrow button to move the selected server to the Assigned Nodes list.

    Repeat this step for all servers you want assigned to the resource. You can also use the left-arrow button to unassign servers from the resource.

  5. Click the up-arrow and down-arrow buttons to change the failover order of the servers assigned to the resource or volume.

  6. Click Apply or Finish to save node assignment changes.