9.7 Sample Unload Scripts for iFolder Clusters

You can obtain the sample unload scripts using iManager. To do this, follow the steps given below:

  1. In iManager Roles and Tasks, click Clusters > Cluster Options.

  2. Click iFolder_template and then click the Scripts tab to display the sample load and unload scripts.

9.7.1 Linux POSIX File System

If your shared volume uses a Linux POSIX file system, use the following unload script as a guide:

##### Linux Traditional File System Sample Unload Script #####

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

#define the IP address
RESOURCE_IP=10.10.189.136

#define the file system type
MOUNT_FS=ext3

#define the volume group name
VOLGROUP_NAME=ifoldervg

#define the device
MOUNT_DEV=/dev/$VOLGROUP_NAME/ifoldervol

#define the mount point
MOUNT_POINT=/mnt/ifolder

#stop iFolder
ignore_error /opt/novell/ifolder3/bin/ifolder_shutdown

#del the IP address
ignore_error del_secondary_ipaddress $RESOURCE_IP

#umount the volume
sleep 10 # if not using SMS for backup, please comment out this line

exit_on_error umount_fs $MOUNT_DEV $MOUNT_POINT $MOUNT_FS

#deactivate the volume group
exit_on_error vgchange -a n $VOLGROUP_NAME

#return status
exit 0

###################################################

9.7.2 NSS File System

If your shared volume uses the NSS file system, use the following unload script as a guide:

##### NSS File System Sample Unload Script ####################

#stop iFolder

ignore_error /opt/novell/ifolder3/bin/ifolder_shutdown

#del the IP address

##xx.xx.xx.xx is your 'highly available' IP address

#ignore_error del_secondary_ipaddress xx.xx.xx.xx

#umount the file system

##MYPOOL is the name of your NSS pool

##MYVOL is the name of your NSS volume

#umount /media/nss/MYVOL

#nss /pooldeactivate=MYVOL

#return status

exit 0

###################################################

NOTE:When OES 2 SP1 cluster setup is upgraded to OES 2 SP3, the load and unload scripts are not updated automatically. Post upgrade, the load and unload scripts must be updated with content from latest template file. For more information on script update, refer to OES 2015: Novell Cluster Services for Linux Administration Guide.

9.7.3 Troubleshooting

Linux does not allow you to umount a volume if any file is currently open. If your system is going comatose when you try to unload the cluster, it is probably because you have open user connections and files on the volume. You need to allow enough time for the connections to be closed before the umount is executed.

Add the following lines between the request to stop service and deleting the IP address:

#stop service otherwise
sleep 10
ignore_error fuser -k /$MOUNT-POINT
sleep 5

Replace /$MOUNT-POINT with the actual path of the mount point of your iFolder data store. For example, if the mount point is /var/opt/novell/ifolder3/data, add:

#stop service otherwise
sleep 10
ignore_error fuser -k /var/opt/novell/ifolder3/data
sleep 5

Tune the script until the cluster no longer goes comatose under an operational load when the unload script is called. If the system goes comatose under a full load, increase the sleep time until the cluster is able to successfully execute the unload instead of going comatose.