beautypg.com

Apple Mac OS X Server (Administrator’s Guide) User Manual

Page 570

background image

570

Chapter 17

Notification Only

You can use a script named “Test” located in the failover scripts directory to control whether,
in the event of a failover condition, the secondary server acquires the primary’s IP address,
or simply sends an email notification. If no script exists, or if the script returns a zero result,
then the secondary server acquires the primary’s IP address. If the script returns a non-zero
result, then the secondary server skips IP address acquisition and only sends email
notification of the failover condition. The test script is run to determine whether the IP
address should be acquired and to determine if the IP address should be relinquished when
the primary server returns to service.

A simple way to set up this notification-only mode is to copy the script located at
/usr/bin/false to the directory named with your primary server IP address and then change
the name of the script to “Test”. This script always returns a non-zero result.

Using the Test script, you can configure the primary server to monitor the secondary server,
and send email notification if the secondary server becomes unavailable.

Pre And Post Scripts

You can configure the failover process with scripts that can run before acquiring the primary
IP address (preacquisition), after acquiring the IP address (postacquisition),
before relinquishing the primary IP address (prerelinquish) and after relinquishing the
IP address back to the primary server (postrelinquish). These scripts reside in the
/Library/IPFailover/ directory on the secondary server, as previously
discussed. The scripts use these four prefixes:

m PreAcq–run before acquiring IP address from primary server

m PostAcq–run after acquiring IP address from primary server

m PreRel–run before relinquishing IP address back to primary server

m PostRel–run after relinquishing IP address back to primary server

You may have more than one script at each stage. The scripts in each prefix group are run in
the order their file names would appear in a directory listing using the

ls

command.

For example, your secondary server may perform other services on the network such as
running a statistical analysis application and distributed image processing software. A
preacquisition script quits the running applications to free up the CPU for the Web server. A
postacquisition script starts the Web server. Once the primary is up and running again, a
prerelinquish script quits the Web server, and a postrelinquish script starts the image
processing and statistical analysis applications. The sequence of scripted events might look
like this:

Test (if present)

PreAcq10.StopDIP

This manual is related to the following products: