12.8 Configuring a Monitor Script for the Shared NSS Pool

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.7.2, Configuring Resource Monitoring.

If you modify the monitor script, you must take the pool cluster resource offline, then bring it online for the changes to take effect.

12.8.1 Sample NSS Monitor Script

The following sample values are used in the NSS monitor script below:

Variable

Sample Value

Cluster resource’s virtual server name

NCS1-SHPOOL43-SERVER

Resource IP address

10.10.10.43

Pool name

SHPOOL43

Volume name

SHVOL43

Volume ID

252 (valid values are 0 to 254)

The following is a sample monitor script for an NSS pool cluster resource:

#!/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 ncpcon volume VOL1

exit_on_error status_secondary_ipaddress 10.10.10.41

exit 0

You can add lines to the monitor script that check the status of processes used by clustering. See Section 10.7.3, Monitoring Services that Are Critical to a Resource.

12.8.2 Monitoring Novell AFP as an Advertising Protocol

If Novell AFP is enabled as an advertising protocol for the pool, the Novell AFP status command (afpstat) is automatically added to help keep AFP up and running. It checks to see if the AFP daemon is running.

exit_on_error afpstat

12.8.3 Monitoring Novell CIFS as an Advertising Protocol

If Novell CIFS is enabled as an advertising protocol for the pool, the Novell CIFS monitoring command is automatically added to help keep CIFS up and running.

exit_on_error rcnovell-cifs monitor

The command 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:

Pool cluster resources that were created on OES 2 SP3 and earlier clusters might 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”.