Specifications
250 Chapter 14 Configuring and Managing Network Services
You run the Test script 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 at
/usr/bin/false to the folder named with your primary server IP address, and then
change the name of the script to Test. This script always returns a nonzero result.
Using the Test script, you can configure the primary server to monitor the secondary
server and send mail 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 (before acquisition), after acquiring the IP address (post acquisition),
before relinquishing the primary IP address (before relinquish), and after relinquishing
the IP address back to the primary server (after relinquish).
These scripts reside in the /Library/IPFailover/<IP_address> folder on the secondary
server. The scripts use the following prefixes:
Â
PreAcq—Run before acquiring the IP address from the primary server.
 PostAcq—Run after acquiring the IP address from the primary server.
 PreRel—Run before relinquishing the IP address back to the primary server.
 PostRel—Run after relinquishing the IP address back to the primary server.
Important: Before you activate IP failover on the secondary server, be sure the primary
server is up and functioning normally. If the primary server isn’t sending broadcast
messages, the secondary server initiates the failover process and acquires the primary’s
public IP address.
You might have more than one script at each stage. The scripts in each prefix group are
run in the order in which their file names appear in a folder listing using the ls tool.
For example, your secondary server might 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 the CPU for the web
server. A postacquisition script starts the web server. After the primary server 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:
<Failover condition detected>
Test (if present)
PreAcq10.StopDIP
PreAcq20.StopSA
PreAcq30.CleanupTmp
<Acquire IP address>