15.4 Modifying the Scripts for CSM Resources without a Segment Manager

Before you add OES 11x nodes to an OES 2 SP3 cluster, you must take all of the CSM-based resources offline on the OES 2 SP3 nodes in the cluster. Modify their scripts to run on OES 11x nodes by adding csmport commands to activate, deactivate, or check the status of the CSM container. After you modify the scripts, the resources cannot be used on OES 2 SP3 nodes. They can be mounted successfully only on OES 11x nodes in the cluster.

IMPORTANT:If the CSM container for your cluster resource has a segment manager on it, follow the instructions in Section 15.3, Deporting the CSM Containers with Segment Managers, then go to Section 15.5, Modifying the Scripts for CSM Resources with a Segment Manager.

The sample scripts in this section use the following sample parameters. Ensure that you replace the sample values with your values.

Parameter

Sample Value

RESOURCE_IP

10.10.10.44

MOUNT_FS

ext3

CONTAINER_NAME

csm44

MOUNT_DEV

/dev/mapper/csm44

MOUNT_POINT

/mnt/lxvol44

IMPORTANT:Perform the following tasks to prepare the CSM resources for an OES 11x node in a mixed-mode cluster. Do not add the OES 11x nodes at this time.

15.4.1 Offlining the CSM Cluster Resources without Segment Managers

Offline every OES 2 SP3 cluster resource that manages a Linux POSIX file system on CSM containers without segment managers:

  1. In iManager, select Clusters > My Clusters.

  2. Select the cluster you want to manage.

  3. On the Cluster Manager page, select the check box next to each of the CSM-based cluster resources, then click Offline.

  4. Continue with Section 15.4.2, Configuring Scripts for a CSM Cluster Resource without a Segment Manager.

15.4.2 Configuring Scripts for a CSM Cluster Resource without a Segment Manager

  1. In iManager, select Clusters > My Clusters.

  2. Select the cluster you want to manage.

  3. Select Cluster Options.

  4. Select the check box next to the CSM resource, then click the Details link to view its properties.

    You can also click the CSM resource’s name link to view its properties.

  5. Click the Scripts tab to view the Load Script page.

  6. On the Load Script page, modify the script to add a csmport command to activate the CSM container, then click Apply.

    #activate the container
    exit_on_error csmport -i $CONTAINER_NAME
    

    If the path to the mount point does not exist on OES 11x nodes, you can add a line to create the mount point path in the script before the line that mounts the file system:

    # create the mount point path when loading on a new node
    ignore_error mkdir -p $MOUNT_POINT
    

    For an example, see Section 15.4.3, Sample Load Script for a CSM Resource without a Segment Manager.

  7. Click the Unload Script link to go to the Upload Script page, modify the script to add a csmport command to deactivate the CSM container, then click Apply.

    #deactivate the container
    exit_on_error csmport -e $CONTAINER_NAME
    

    For an example, see Section 15.4.4, Sample Unload Script for CSM Resource without a Segment Manager.

  8. Click the Monitor Script link to go to the Monitor Script page, modify the script to add a csmport command to check the status of the CSM container, then click Apply.

    #check the container
    exit_on_error csmport -c $CONTAINER_NAME
    

    For an example, see Section 15.4.5, Sample Monitor Script for a CSM Resource without a Segment Manager.

  9. Repeat Step 3 to Step 8 for each of the resources that you took offline in Section 15.4.1, Offlining the CSM Cluster Resources without Segment Managers.

    Do not bring the CSM cluster resources online again until OES 11x nodes have joined the cluster, and each resource’s Preferred Nodes list has been modified to use only OES 11x nodes.

  10. Continue with Section 15.6, Configuring and Adding OES 11x Nodes to the OES 2 SP3 Cluster.

15.4.3 Sample Load Script for a CSM Resource without a Segment Manager

Use the following sample load script to complete the fields for your CSM cluster resource on OES 11x:

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs

# define the IP address
RESOURCE_IP=10.10.10.44
# define the file system type
MOUNT_FS=ext3
#define the container name
CONTAINER_NAME=csm44
# define the device
MOUNT_DEV=/dev/mapper/$CONTAINER_NAME
# define the mount point
MOUNT_POINT=/mnt/lxvol44

#activate the container
exit_on_error csmport -i $CONTAINER_NAME

# create the mount point path when loading on a new node
ignore_error mkdir -p $MOUNT_POINT

# mount the file system
exit_on_error mount_fs $MOUNT_DEV $MOUNT_POINT $MOUNT_FS

# add the IP address
exit_on_error add_secondary_ipaddress $RESOURCE_IP

exit 0

15.4.4 Sample Unload Script for CSM Resource without a Segment Manager

Use the following sample unload script to complete the fields for your CSM cluster resource on OES 11x:

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs

# define the IP address
RESOURCE_IP=10.10.10.44
# define the file system type
MOUNT_FS=ext3
#define the container name
CONTAINER_NAME=csm44
# define the device
MOUNT_DEV=/dev/mapper/$CONTAINER_NAME
# define the mount point
MOUNT_POINT=/mnt/lxvol44

# del the IP address
ignore_error del_secondary_ipaddress $RESOURCE_IP

#unmount the volume
exit_on_error umount_fs $MOUNT_DEV $MOUNT_POINT $MOUNT_FS

#deactivate the container
exit_on_error csmport -e $CONTAINER_NAME

# return status
exit 0

15.4.5 Sample Monitor Script for a CSM Resource without a Segment Manager

Use the following sample monitor script to complete the fields for your CSM cluster resource on OES 11x. To use the script, you must also enable monitoring for the resource. See Section 11.7, Enabling Monitoring and Configuring the Monitor Script.

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs

# define the IP address
RESOURCE_IP=10.10.10.44
# define the file system type
MOUNT_FS=ext3
#define the container name
CONTAINER_NAME=csm44
# define the device
MOUNT_DEV=/dev/mapper/$CONTAINER_NAME
# define the mount point
MOUNT_POINT=/mnt/lxvol44

#check the IP address
exit_on_error status_secondary_ipaddress $RESOURCE_IP

#check the volume
exit_on_error status_fs $MOUNT_DEV $MOUNT_POINT $MOUNT_FS

#check the container
exit_on_error csmport -c $CONTAINER_NAME

# return status
exit 0