A cluster resource monitor script is automatically generated for the pool when you cluster-enable it. It is disabled by default. To enable or disable monitoring, see Section 10.6, Enabling Monitoring and Configuring the Monitor Script.
The following is a sample monitoring script for an NSS pool cluster resource:
#!/bin/bash . /opt/novell/ncs/lib/ncsfuncs exit_on_error status_fs /dev/evms/POOL1 /opt/novell/nss/mnt/.pools/POOL1 nsspool exit_on_error status_secondary_ipaddress 10.10.10.41 exit_on_error ncpcon volume VOL1 exit 0
You can add other monitoring commands to the script. For example, the CIFS monitor command helps to keep CIFS up and running. It checks to see if the cifsd daemon is running and takes action if it is not running. If CIFS is running, it returns its status. If CIFS is dead or not running, it starts the cifsd daemon and returns its status. If the restart fails, the resource’s failover settings are invoked, such as failing over the resource to its preferred node, or going comatose. Add the following line above the exit command:
exit_on_error rcnovell-cifs monitor
The monitor command is the default line added by CIFS for newly created pool cluster resources on OES 2 SP3 servers with the September 2011 or later patches applied. Existing pool cluster resources are not automatically updated to use it. Instead, they use the CIFS status command in the monitor script. It checks the status and immediately invokes the resource’s failover settings if the cifsd daemon is not running. To take advantage of the restart capability that is offered by the monitor command, you can modify the line to use “monitor” instead of “status”.
You can also add lines to the monitor script that check the status of processes used by clustering. For information, see Section 10.6.4, Monitoring Services That Are Critical to Clustering.