13.5 Configuring the DST Pool Cluster Resource with Two Cluster-Enabled Pools

One way to set up the DST pool cluster resource is to cluster-enable both pools to create separate cluster resources. You copy the commands from the secondary pool resource scripts to the primary pool resource scripts in the proper load and unload order. The primary pool cluster resource manages the two pools and volumes.

The advantages of creating two cluster pool resources are:

The disadvantages of this approach are:

IMPORTANT:After you modify the primary pool cluster resource, you use this resource to manage the secondary pool and volume. Do not bring the secondary resource online.

Use the information in the following sections to set up the DST pool cluster resource.

13.5.1 Overview of the Two Pool Cluster Resources

For this method, you need two NSS volumes, each in its own clustered-enabled pool. For instructions for creating the clustered pools and the NSS volumes, see Configuring Cluster Resources for Shared NSS Pools and Volumes in the OES 2 SP3: Novell Cluster Services 1.8.8 Administration Guide for Linux.

The cluster load scripts elsewhere in this section assume the following setup for NSS volumes in the clustered DST volume pair. Ensure that you use the actual information from your setup.

Parameter

Primary Cluster Resource

Secondary Cluster Resource

Server hostname for node 1

server38

server38

Cluster server name for node 1

NCS1

NCS1

Pool name

POOL1

ARCPOOL1

NSS volume name

VOL1

ARCVOL1

Cluster resource virtual server name

NCS1-POOL1-SERVER

NCS1-ARCPOOL1-SERVER

(not used after you set up the primary resource for DST)

Cluster resource IP address

10.10.10.38

You use the IP address for the primary pool’s cluster resource for the shadow volume.

10.10.10.48

(not used after you set up the primary resource for DST)

Volume ID

254

253

(not used after you set up the primary resource for DST)

When the primary volume has a state of Shadowed, its NCP volume ID represents the DST shadow volume pair of volumes. A second NCP volume ID is not assigned to the secondary volume while it is in the shadow volume relationship. You use only the ID on the primary volume in the ncpcon mount command in the cluster resource load script.

IMPORTANT:In the cluster load and unload scripts, the add_secondary_ipaddress and del_secondary_ipaddress commands refer to the cluster resource’s IP address that is “secondary” to the node’s IP address. It is not related to the DST volume’s terminology.

13.5.2 Viewing the Scripts for the Two Pool Cluster Resources

After you create two clustered pools, view the scripts. Each of the two NSS pool cluster resources has its own set of load, unload, and monitor scripts. Save the script information for the secondary pool to a text file.

  1. In iManager, select Clusters, then select My Clusters.

  2. Select the name link of the cluster you want to manage.

    If the cluster is not in your customized list, you can add it now. Click Add, browse to select the cluster, then click OK.

  3. On the Cluster Manager page, click the Name link of the primary cluster resource to go to the Cluster Pool Properties page, then click the Scripts tab view the load, unload, and monitor scripts.

    You can view the scripts for only one server at a time in the browser. View the properties of each resource in separate browsers to compare the scripts side-by-side.

    The following table provides sample load, unload, and monitor scripts for the POOL1-SERVER resource for the primary clustered pool named POOL1. Novell CIFS can be configured as an advertising protocol when you set up the primary cluster pool.

    Primary Pool Cluster Resource Scripts

    Load Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    exit_on_error nss /poolact=POOL1
    
    exit_on_error ncpcon mount VOL1=254
    
    exit_on_error add_secondary_ipaddress 10.10.10.38
    exit_on_error ncpcon bind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38
    
    #This line is added if Novell CIFS is used as an advertising protocol
    #novcifs --add ’--vserver=".cn=NCS1-POOL1-SERVER.ou=ncs.o=novell.t=AVALON_TREE."’ 
             --ip-addr=10.10.10.38
    
    exit 0
    

    Unload Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    #This line is added if Novell CIFS is used as an advertising protocol
    #novcifs --remove --vserver=virtualserverFDN --ip-addr=virtualserverip 
    
    ignore_error ncpcon unbind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38
    ignore_error del_secondary_ipaddress 10.10.10.38
    
    ignore_error nss /pooldeact=POOL1
    
    exit 0
    

    Monitor Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    exit_on_error status_fs /dev/pool/POOL1 /opt/novell/nss/mnt/.pools/POOL1 nsspool
    
    exit_on_error status_secondary_ipaddress 10.10.10.38
    
    exit_on_error ncpcon volume VOL1
    
    exit_on_error rcnovell-cifs monitor
    
    exit 0
    

    The following are sample load and unload scripts for the ARCPOOL1-SERVER resource for the secondary clustered pool named ARCPOOL1.

    Secondary Pool Cluster Resource Scripts

    Load Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    exit_on_error nss /poolact=ARCPOOL1
    
    exit_on_error ncpcon mount ARCVOL1=253
    
    exit_on_error add_secondary_ipaddress 10.10.10.48
    
    exit_on_error ncpcon bind --ncpservername=NCS1-ARCPOOL1-SERVER --ipaddress=10.10.10.48
    
    exit 0
    

    Unload Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    ignore_error ncpcon unbind --ncpservername=NCS1-ARCPOOL1-SERVER --ipaddress=10.10.10.48
    ignore_error del_secondary_ipaddress 10.10.10.48
    
    ignore_error nss /pooldeact=ARCPOOL1
    
    exit 0
    

    Sample Primary Monitor Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    exit_on_error status_fs /dev/pool/ARCPOOL1 /opt/novell/nss/mnt/.pools/ARCPOOL1 nsspool
    
    exit_on_error status_secondary_ipaddress 10.10.10.48
    
    exit_on_error ncpcon volume ARCVOL1
    
    exit 0
    
  4. Copy information from the secondary resource’s scripts into a text file, and save the file.

    You will work from this copy to add lines to the primary pool cluster resource.

  5. At the bottom of the Scripts page, click Cancel to return to the Cluster Manager page.

  6. Continue with Section 13.5.3, Adding Commands for the Secondary Clustered Pool and Volume to the Primary Pool Cluster Resource.

13.5.3 Adding Commands for the Secondary Clustered Pool and Volume to the Primary Pool Cluster Resource

The clustered DST shadow volume is defined and managed in the primary pool cluster resource. You must add lines from the secondary pool cluster resource scripts and modify the mount command to define the DST shadow volume.

  1. In iManager, select Clusters, then select My Clusters.

  2. Select the name link of the cluster you want to manage.

  3. Offline the primary cluster resource. The secondary cluster resource should still be offline.

    1. On the Cluster Manager page, select the check box next to the resource.

    2. Click Offline.

  4. Click the name link of the primary pool cluster resource to view its Cluster Pool Properties page, then click the Scripts tab.

  5. On the Scripts > Load Script page, modify the load script for the primary cluster resource.

    Use the following sample load script as a guide for where to add the lines for each of the items.

    Sample DST Pool Resource Load Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    # activate the secondary pool
    exit_on_error nss /poolact=ARCPOOL1
    
    # activate the primary pool
    exit_on_error nss /poolact=POOL1
    
    # Optional delay to allow time for pools to activate before mounting the volume
    sleep 10
    
    #comment out the original volume mount command
    #exit_on_error ncpcon mount VOL1=254
    
    # Use the ncpcon mount command to create the shadow volume on mount
    exit_on_error ncpcon mount VOL1=254,shadowvolume=ARCVOL1
    
    exit_on_error add_secondary_ipaddress 10.10.10.38
    
    exit_on_error ncpcon bind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38
    
    #This line is added if Novell CIFS is used as an advertising protocol
    #novcifs --add ’--vserver=".cn=NCS1-POOL1-SERVER.ou=ncs.o=novell.t=AVALON_TREE."’ 
             --ip-addr=10.10.10.38
    
    # If shadowfs is used, wait for shadowfs to start 
    #for (( c=1; c<=10; c++ )) do 
    # if [ ! -d /media/shadowfs/VOLUME/._NETWARE ]; then sleep 5; fi 
    #done 
    
    exit 0
    
    1. Add a line to activate the secondary pool before the primary pool activation.

      exit_on_error nss /poolact=ARCPOOL1
      
    2. (Optional) Add a sleep command after the pool activation commands to allow both pools time to be activated before you mount the shadow volume pair.

      For example:

      sleep 10
      

      Vary the time (in seconds) according to what is needed for your system.

      IMPORTANT:If wait times are added to the load script or unload script, ensure that you increase the script timeout settings accordingly. Otherwise, the script might time out while you are waiting for the action.

    3. Comment out (or remove) the individual mount command for the primary NSS volume by placing a pound sign (#) at the beginning of the line.

      For example:

      #exit_on_error ncpcon mount VOL1=254
      
    4. Add the shadow volume mount command to the primary load script. This line provides the primary volume, and assigns the secondary volume to shadow the primary.

      exit_on_error ncpcon mount VOL1=254,shadowvolume=ARCVOL1
      
    5. If you are using shadowfs to provide the merged file tree view for SMB/CIFS users or for Linux services like rsync, you must allow time in the load script after mounting the shadow volume to allow shadowfs to become active before continuing.

      Use one of the following approaches to add a wait time:

      • Add a sleep 10 command after mount command, and vary it manually until it allows sufficient wait time for shadowfs to start.

        # If shadowfs is used, wait for shadowfs to start
        sleep 10
        
      • Add a script that varies the wait time by checking to ensure that shadowfs is started.

        For example:

        # If shadowfs is used, wait for shadowfs to start
        for (( c=1; c<=10; c++ )) do
         if [ ! -d /media/shadowfs/VOLUME/._NETWARE ]; then sleep 5; fi
        done 
        

      IMPORTANT:If wait times are added to the load script or unload script, ensure that you increase the script timeout settings accordingly. Otherwise, the script might time out while you are waiting for the action.

    6. Click Apply to save your changes.

      The changes do not take effect until the shadow volume cluster resource is brought online.

  6. On the Scripts > Unload Script page, modify the unload script for the primary cluster resource.

    Use the following sample unload script as a guide for where to add the lines for each of the items.

    Sample DST Pool Resource Unload Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    # This line is added if Novell CIFS is used as an advertising protocol
    #novcifs --remove ’--vserver=".cn=NCS1-POOL1-SERVER.ou=ncs.o=novell.t=AVALON_TREE."’ --ip-addr=10.10.10.38 
    
    # If shadowfs is used, unload the volume in FUSE 
    #ignore_error fusermount -u /media/shadowfs/VOL1
    
    ignore_error ncpcon unbind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38
    
    ignore_error del_secondary_ipaddress 10.10.10.38
    
    # Deactivate the primary pool
    ignore_error nss /pooldeact=POOL1
    
    # Deactivate the secondary pool
    ignore_error nss /pooldeact=ARCPOOL1
    
    exit 0
    
    1. If you use shadowfs to provide a merged file tree view to Samba users or for Linux file protocols, you must unmount the FUSE-mounted file systems that are displayed in the /media/shadowfs/VOLUME directory. Add the following line just before the unbind command in the unload script:

      #unload the volume in FUSE
      # Include the following line only if shadowfs is used
      ignore_error fusermount -u /media/shadowfs/VOLUME
      
    2. Copy the pool deactivation command from the secondary pool’s unload script into the primary pool’s unload script after the line to deactive the primary pool.

      ignore_error nss /pooldeact=ARCPOOL1
      

      IMPORTANT:Ensure that you deactivate the primary pool before deactivating the secondary pool.

    3. Click Apply to save your changes.

      The changes do not take effect until the shadow volume cluster resource is brought online.

  7. On the Scripts > Monitor Script page, modify the monitor script for the primary cluster resource.

    Use the following sample monitor script as a guide for where to add the lines for each of the items.

    Sample DST Pool Resource Monitor Script

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    # Check the status of the secondary pool
    exit_on_error status_fs /dev/pool/ARCPOOL1 /opt/novell/nss/mnt/.pools/ARCPOOL1 nsspool
    
    # Check the status of the primary pool
    exit_on_error status_fs /dev/pool/POOL1 /opt/novell/nss/mnt/.pools/POOL1 nsspool
    
    exit_on_error status_secondary_ipaddress 10.10.10.38
    
    # Check the status of the primary volume. Do not check secondary volume.
    exit_on_error ncpcon volume VOL1
    
    # This line is added if Novell CIFS is used as an advertising protocol
    #exit_on_error rcnovell-cifs monitor
    
    exit 0
    
    1. Copy the pool status check command from the secondary pool’s monitor script into the primary pool’s monitor script before the line to check the status of the primary pool.

    2. Do not add a check for the secondary volume.

    3. Click Apply to save your changes.

      The changes do not take effect until the shadow volume cluster resource is brought online.

  8. Click OK to save all your changes and return to the Cluster Manager page.

  9. Online the primary pool cluster resource. On the Cluster Manager page, select the check box next to the primary cluster resource, then click Online.

    Leave the secondary resource offline.

  10. Verify that the primary cluster resource is running by going to the Cluster Manager page.

    The primary cluster resource is Running. The secondary cluster resource is reported as Offline because you are managing that cluster resource through the primary load script.

  11. Verify that the shadow volume (VOL1) is mounted in NCP and is shadowed:

    1. On the first node in the cluster, log in to Novell Remote Manager for Linux as the root user.

    2. Select View File Systems, then verify that the secondary pool ARCPOOL1 and the NSS volume ARCVOL1 are listed under File Systems, but the secondary NSS volume is not listed under NCP Volumes.

    3. Select View File Systems > Dynamic Storage Technology Options, then verify that the primary volume is listed under Volume Information, and that its status is Shadowed.

    4. Select Manage NCP Services > Manage Shares, click NCP/NSS Bindings, then verify that the NCP Accessible parameter is turned off for the secondary volume, and turned on for the primary volume.

      You can also look for the EXCLUDE_VOLUME entry in the /etc/opt/novell/ncp2nss.conf file.

    5. Continue with Section 13.8, Configuring Shadow Volume Policies for the Clustered DST Volume Pair.