Using SNAplus2 in a High Availability Environment
Advanced Configuration Techniques
to add more intelligence to the Service in the Package Control Script that will allow you to attempt local recovery before informing ServiceGuard that a remote failover is necessary.
Writing Your Own SNAplus2 Service Script
By customizing the Service used in the Package Control Script, you can do the following:
•Automatically attempt local restart of an SNAplus2 package that has failed.
•Automatically attempt local failover to another network adapter when one fails.
•Use a backup link type when the primary link fails.
Local failover allows SNAplus2 to attempt local recovery of an SNAplus2 LS before informing ServiceGuard that the package has failed. This will add more redundancy to your network and reduce even further the effects of a single point of failure.
NOTE | Some networking packages, like TCP/IP, support Continuous Availability |
| during local failover ; t hat is, applications do not experience outages |
| while the system is switching from one network adapter to another. |
| SNAplus2 does not support Continuous Availability during local |
| failovers. Applications will experience session outages, and must |
| |
| switch has occurred. |
| The following command is the previously discussed Service Command for |
| |
| the SNAplus2 package that instructs ServiceGuard to start the |
| snapmon process to monitor an SNAplus2 LS. |
| SERVICE_CMD[0]=”/opt/sna/bin/snapmon |
| The Service Command starts a process. The termination of this process |
| is a signal to ServiceGuard that your package has failed. To add local |
| recovery options to the package, replace the Service Command with a |
| new executable file (a program or shell script) that you write. For |
| example, if you change the Service Command to say, |
| SERVICE_CMD[0]=”/usr/local/bin/snapkg.mon” |
| then you can add commands to perform local recovery in a shell script |
| called snapkg.mon. You will still use the snapmon utility to monitor |
| the state of your SNAplus2 LS, but you can include other SNAplus2 |
Appendix D | 383 |