Appendix D
385
Using SNAplus2 in a High Availability Environment
Advanced Configuration Techniques
#
# Attempt to start the LS. If the LS is configured to
# be initially active, the command will have no effect.
#
snapadmin start_ls, ls_name=TRLS
#
# Monitor the primary LS again to see if local restart
# was successful. Only allow 30 seconds for the LS to
# become active.
#
snapmon -i1 -r30 TRLS
#
# Since snapmon returned, the LS is no longer active.
# Save the exit code. An exit code of zero means the
# LS was active at one time, so try local restart again.
# Otherwise, go to Step 2.
#
exitcode=$?
done
#-------------------------------------------------------------
# STEP 2: Local failover
#-------------------------------------------------------------
#
# Since snapmon returned with a non-zero exit code, the primary
# LS cannot be activated. Attempted local failover, which
# means:
#
# 1. Start the backup LS.
#
# NOTE: The active node must be configured to run the backup
# LS.
#
snapadmin start_ls, ls_name=SDLCLS
#
# Monitor the backup LS to see if local failover was
# successful. Allow 90 seconds for the LS to become active.
#
snapmon -i1 -r90 SDLCLS
#-------------------------------------------------------------
#STEP 3: Exit
#-------------------------------------------------------------
#
# Since snapmon returned, the backup LS is not active. Inform
# ServiceGuard that this package has failed. ServiceGuard will
# perform remote failover.
exit 0
Notice that this shell script uses the return code of snapmon to
determine what action to take. If snapmon returns 0, the
TRLS
link
station was active at some point while snapmon was running. If that is
the case, it makes sense to simply attempt to restart the LS. If snapmon
returns with a non-zero value, however, the LS failed to start for the
entire initialization period (about 30 seconds). If that happens, the script
Содержание HP-UX SNAplus2
Страница 4: ...4 ...
Страница 14: ...14 Contents ...
Страница 22: ...22 ...
Страница 23: ...23 1 SNA Terms and Concepts ...
Страница 65: ...65 2 Introduction to SNAplus2 ...
Страница 107: ...107 3 Administering SNAplus2 ...
Страница 132: ...132 Chapter3 Administering SNAplus2 Using the Command Line Administration Program ...
Страница 133: ...133 4 Basic Configuration Tasks ...
Страница 142: ...142 Chapter4 Basic Configuration Tasks Configuring Logging ...
Страница 143: ...143 5 Defining Connectivity Components ...
Страница 167: ...167 6 Configuring Dependent LUs ...
Страница 174: ...174 Chapter6 Configuring Dependent LUs Defining LU Pools ...
Страница 175: ...175 7 Configuring APPC Communication ...
Страница 208: ...208 Chapter7 Configuring APPC Communication Configuring APPC Security ...
Страница 209: ...209 8 Configuring User Applications ...
Страница 222: ...222 Chapter8 Configuring User Applications Configuring RJE Workstations ...
Страница 223: ...223 9 Configuring Passthrough Services ...
Страница 235: ...235 10 Managing SNAplus2 from NetView ...
Страница 248: ...248 Chapter10 Managing SNAplus2 from NetView Using UCF ...
Страница 249: ...249 11 Managing SNAplus2 Clients ...
Страница 300: ...300 Chapter11 Managing SNAplus2 Clients Managing HP UX Clients ...
Страница 301: ...301 A Configuration Planning Worksheets ...
Страница 337: ...337 B APPN Network Management Using the Simple Network Management Protocol ...
Страница 343: ...343 C Configuring an Invokable TP Using snaptpinstall ...
Страница 353: ...353 D Using SNAplus2 in a High Availability Environment ...