D.4 Cluster Setup with a Scripted Login to the Remote Server

An alternative to the method used in Section D.3, Cluster Setup with Manual Login to the Remote Server is to add the nwlogin command to the primary pool cluster resource load script and to add the nwlogout command to its unload script.

IMPORTANT:It is a security concern to add the user password to the load script because it is stored in clear text.

You configure the shadow volume in the cluster load script so that it defines the NCP volume as the resource loads. The clustered shadow volume is not permanently defined in the /etc/opt/novell/ncpserv.conf files of each node. It is added to the server’s /etc/opt/novell/ncpserv.conf file when the pool cluster resource fails over to that node. You use the ncpcon mount volumename=volID,SHADOWPATH=shadowpath command in the load script to mount the volume. For information, see Section A.3.4, Scenario 4: Primary NSS and Shadow Non-NSS (Supported for the Remote Secondary NSS Volume in the Technology Preview).

If the remote server is rebooted, you must manually log in again from the active DST node to the remote server.

To set up this DST cluster solution:

  1. In iManager, create a dstuser identity and assign the user name as an NSS file system trustee with the Supervisor right for the remote NSS volume.

  2. If the primary NSS pool cluster resource and volume do not already exist, create a pool cluster resource on the cluster, create an NSS volume on it to use as the primary volume, then configure the cluster resource Preferred Nodes list and the load, unload, and monitoring scripts. Ensure that you specify only DST nodes in the Preferred Nodes list.

    For information, 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.

  3. Modify the load script for the primary pool cluster resource:

    1. In iManager, select Clusters > Cluster Options, then browse to select the cluster.

    2. In the list of Cluster objects, click the Name link for the primary pool cluster resource to open its Properties page, then click the Scripts tab.

    3. On the Load Script page, add the nwlogin command and the ncpcon mount volumename=volID,SHADOWPATH=shadowpath command to the load script.

      #Log in to the remote server
      exit_on_error /opt/novell/ncl/bin/nwlogin --server 10.10.10.41 --tree MYCOMPANY_TREE --user dstuser --context users.context --password novell 
      
      ncpcon mount volumename=volID,SHADOWPATH=shadowpath 
      

      Comment out the default mount command:

      #exit_on_error ncpcon mount VOL1=254
      

      The script is not activated until the pool cluster resource is taken offline and then brought online.

      The following is a sample load script:

      #!/bin/bash
      . /opt/novell/ncs/lib/ncsfuncs
      
      #Log in to the remote server
      exit_on_error /opt/novell/ncl/bin/nwlogin --server 10.10.10.41 --tree MYCOMPANY_TREE --user dstuser --context users.context --password novell 
      
      sleep 10
      exit_on_error nss /poolact=POOL1
      #exit_on_error ncpcon mount VOL1=254
      
      exit on error ncpcon mount VOL1=254,SHADOWPATH=/var/opt/novell/nclmnt/.Servers/SERVER41/SHVOL1
      
      exit_on_error add_secondary_ipaddress 10.10.10.44
      exit_on_error ncpcon bind --ncpservername=CLUS1_POOL1_SERVER 
      --ipaddress=10.10.10.44
      
      #Uncomment this command if Novell CIFS is used
      #exit_on_error novcifs --add --vserver=.cn=CLUS1_POOL1_SERVER.ou=servers.o=novell.t=MYCOMPANY_TREE. 
      --ip-addr=10.10.10.44
      
      exit 0
      
    4. Click Apply to save your changes.

  4. Modify the unload script for the primary pool cluster resource:

    1. On the Properties > Script page, click Unload Script.

    2. Add the nwlogout command to the unload script.

      ignore error nwlogout --server remote_servername_or_IP_address
      

      The script is not activated until the pool cluster resource is taken offline and then brought online.

      The following is a sample unload script:

      #!/bin/bash
      . /opt/novell/ncs/lib/ncsfuncs
      
      ignore_error ncpcon unbind --ncpservername=CLUS1_POOL1_SERVER --
      ipaddress=10.10.10.44
      
      ignore_error del_secondary_ipaddress 10.10.10.44
      ignore_error nss /pooldeact=POOL1
      
      ignore error nwlogout --tree MYCOMPANY_TREE
      
      exit 0
      
    3. Click Apply to save your changes.

  5. Modify the monitoring script for the primary pool cluster resource:

    1. On the Properties > Script page, click Monitoring Script.

    2. Verify that there is no entry for ncpcon to monitor the remote NSS volume.

      The remote secondary volume is mounted as a Linux POSIX volume, and it is not accessible to NCP.

    3. Click OK to save your changes.

  6. Activate the script changes by offlining then onlining the primary pool cluster resource:

    1. Click Clusters > Cluster Manager.

    2. Select the check box next to the primary pool cluster resource, then click Offline.

    3. Select the check box primary pool cluster resource, then click Online.