6.3 Modifying the Pool Resource Scripts for Samba

After the shared storage is properly configured, you must modify the pool cluster resource in Novell Cluster Services. This includes adding lines for Samba in the load, unload, and monitor scripts.

The examples in this section use following setup. Make sure to replace the sample values with the information for your system.

Variable

Sample Value

NSS pool name

POOL44

NSS volume name

VOL44

Pool resource IP address

10.10.10.44

NCP virtual server name

CLUS1-POOL44-SERVER

Volume ID

252

Valid values are 0 to 254. By convention, volume IDs for clustered volumes are assigned as 254 and downwards.

6.3.1 Modifying the Pool Resource Load Script

  1. In Novell iManager, log in as an administrator user.

  2. In Roles and Tasks, select Clusters > Cluster Manager, then browse to select the Cluster object for the cluster.

  3. Click the name link of the pool cluster resource to go to its Properties page, then click the Scripts tab.

  4. View the load script.

    The default pool resource load script for the sample setup is shown below. Replace the variable values in bold with the actual values for your setup.

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    exit_on_error add_secondary_ipaddress 10.10.10.44
    exit_on_error nss /poolact=POOL44
    exit_on_error ncpcon mount VOL44=252
    
    exit_on_error ncpcon bind --ncpservername=CLUS1-POOL44-SERVER 
       --ipaddress=10.10.10.44
    
    exit 0
  5. Add the following definitions and Samba start lines to the load script.

    You must specify the Linux path for the NSS volume as the MOUNT_POINT value. The configuration file name is the name you give the Samba configuration file on the shared location. The two Start Samba lines should follow the line that mounts the NSS volume.

    The lines are commented out at this time. You uncomment them later when the Samba configuration file is ready.

    # define the Linux mount point for the NSS volume
    #MOUNT_POINT=/media/nss/VOL44
    
    # define the name of the samba config file
    #CONFIG_FILE=SambaResource-smb.conf
    
    # start Samba
    #exit_on_error /usr/sbin/nmbd --log-basename=$MOUNT_POINT/log --configfile=$MOUNT_POINT/$CONFIG_FILE
    
    #exit_on_error /usr/sbin/smbd --log-basename=$MOUNT_POINT/log --configfile=$MOUNT_POINT/$CONFIG_FILE
  6. Click Apply.

  7. Continue with Section 6.3.2, Modifying the Pool Resource Unload Script.

6.3.2 Modifying the Pool Resource Unload Script

  1. Continue from Section 6.3.1, Modifying the Pool Resource Load Script.

  2. On the Scripts tab for the pool cluster resource, click the Unload link to view the unload script.

  3. View the unload script.

    The default pool resource unload script for the sample setup is shown below. Replace the variable values in bold with the actual values for your setup.

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    ignore_error ncpcon unbind --ncpservername=CLUS1-POOL44-SERVER --ipaddress=10.10.10.44
    
    ignore_error nss /pooldeact=POOL44
    ignore_error del_secondary_ipaddress 10.10.10.44
    
    exit 0
  4. Add the following definitions and Samba stop lines to the unload script.

    You must specify the Linux path for the NSS volume as the MOUNT_POINT value. The configuration file name is the name you give the Samba configuration file on the shared location. The two Stop Samba lines should precede the line that unmounts the NSS volume.

    The lines are commented out at this time. You uncomment them later when the Samba configuration file is ready.

    # define the Linux mount point for the NSS volume
    #MOUNT_POINT=/media/nss/VOL44
    
    # define the name of the samba config file
    #CONFIG_FILE=SambaResource-smb.conf
    
    # request Samba stop
    #ignore_error killproc -p $MOUNT_POINT/nmbd-$CONFIG_FILE.pid /usr/sbin/nmbd
    #ignore_error killproc -p $MOUNT_POINT/smbd-$CONFIG_FILE.pid /usr/sbin/smbd
  5. Click Apply.

  6. Continue with Section 6.3.3, Modifying the Pool Resource Monitor Script.

6.3.3 Modifying the Pool Resource Monitor Script

  1. Continue from Section 6.3.2, Modifying the Pool Resource Unload Script.

  2. On the Scripts tab for the pool cluster resource, click the Monitor link to view the monitor script.

  3. View the monitor script.

    The default pool resource monitor script for the sample setup is shown below. Replace the variable values in bold with the actual values for your setup.

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    
    exit_on_error status_fs /dev/pool/POOL44 /opt/novell/nss/mnt/.pools/POOL44 nsspool
    
    exit_on_error status_secondary_ipaddress 10.10.10.44
    exit_on_error ncpcon volume VOL44
    
    exit 0
  4. Add the following definitions and Samba check status lines to the monitor script.

    You must specify the Linux path for the NSS volume as the MOUNT_POINT value. The configuration file name is the name you give the Samba configuration file on the shared location. The two check status Samba lines can follow the check of the NSS volume.

    The lines are commented out at this time. You uncomment them later when the Samba configuration file is ready.

    # define the Linux mount point for the NSS volume
    #MOUNT_POINT=/media/nss/VOL44
    
    # define the name of the samba config file
    #CONFIG_FILE=SambaResource-smb.conf
    
    # check Samba
    #exit_on_error checkproc -p $MOUNT_POINT/share/locks/smbd-$CONFIG_FILE.pid /usr/sbin/smbd
    #exit_on_error checkproc -p $MOUNT_POINT/share/locks/nmbd-$CONFIG_FILE.pid /usr/sbin/nmbd
  5. Click Apply.

  6. At the bottom of the page, click OK to save all changes for the pool cluster resource.

    IMPORTANT:The changes are not effective until the resource is taken offline and brought online again.

  7. Continue with Section 6.4, Samba Configuration.