Create the following applications to be registered with the HACMP system:
Start script
Stop script
Monitor method
Create the above applications on each active node and standby node, placing them in the same directory path. Do not create them on the shared disk. After creating the applications, be sure to assign execution rights to them.
Examples of creating each application are explained and samples of each of these applications are provided.
Back up or copy these samples, and then modify them to match the environment.
Create a start script that activates the daemons of Jobscheduler and Job Execution Control. The following sample is provided for Systemwalker Operation Manager:
/opt/FAIXJMCMN/etc/script/hacmp/omgr_start.sh |
This sample script is for 1:1 active/standby configuration (without subsystems).
Changes to the start script need to be made for the 1:1 active/standby configuration (with subsystems), the 1:1 active/standby configuration (with subsystems and partial cluster operation), and dual node mutual standby configurations.
After copying the sample, modify it to match your cluster environment. For 1:1 active/standby configuration (without subsystems), you can use this sample without modification after making its backup.
The following examples show how to modify the start script.
Example of how to modify the start script for 1:1 active/standby configurations (with subsystems) and 1:1 active/standby configurations (with subsystems and partial cluster operation)
In a system where multiple subsystems are running, start/stop the daemons of Jobscheduler and Job Execution Control on each subsystem.
The following examples show a 1:1 active/standby configuration (with subsystems), in which both subsystem 0 and subsystem 1 are running, and a 1:1 active/standby configuration (with subsystems and partial cluster operation), in which subsystem 0 is not operated in a cluster but subsystem 1 is.
Change the "SUBSYSTEM" variable to "PLU_SUBSYSTEM" and its value to the subsystem numbers. In the case of the 1:1 active/standby configuration (with subsystems and partial cluster operation), simply change the number for the subsystem that will be operated in the cluster.
[Before]
SUBSYSTEM="0"
[After]
1:1 active/standby configuration (with subsystems)
PLU_SUBSYSTEM="0 1"
1:1 active/standby configuration (with subsystems and partial cluster operation)
PLU_SUBSYSTEM="1"
Add the for, do, and done statements to start Jobscheduler and Job Execution Control on each subsystem.
[Before]
# Starts Job Scheduler & Job Execution Control # - 1:1 standby, 2 nodes mutual standby /bin/sh /opt/FAIXMJS/usr/lib/mjes/S99MJS -sys $SUBSYSTEM /bin/sh /opt/FAIXJOBSC/bin/S99JOBSCH -sys $SUBSYSTEM
[After]
# Starts Job Scheduler & Job Execution Control # - 1:1 standby, 2 nodes mutual standby for SUBSYSTEM in $PLU_SUBSYSTEM do /bin/sh /opt/FAIXMJS/usr/lib/mjes/S99MJS -sys $SUBSYSTEM /bin/sh /opt/FAIXJOBSC/bin/S99JOBSCH -sys $SUBSYSTEM done
Add the for, do, done, and break statements to be able to check that the startup of the daemons of Jobscheduler and Job Execution Control has been completed on each subsystem.
[Before]
# Sleep .... /bin/sleep 5 status=0 # - 1:1 standby, 2 nodes mutual standby MJES_STATUS=`$CHK_CMD mjsdaemon stop -sys $SUBSYSTEM` if [ $MJES_STATUS = "DAEMON_STOPPED" ] then status=1 fi # - 1:1 standby, 2 nodes mutual standby JOB_STATUS=`$CHK_CMD tskmnsrv stop -sys $SUBSYSTEM` if [ $JOB_STATUS = "DAEMON_STOPPED" ] then status=1 fi
[After]
# Sleep .... /bin/sleep 5 status=0 for SUBSYSTEM in $PLU_SUBSYSTEM do # - 1:1 standby, 2 nodes mutual standby MJES_STATUS=`$CHK_CMD mjsdaemon stop -sys $SUBSYSTEM` if [ $MJES_STATUS = "DAEMON_STOPPED" ] then status=1 break fi # - 1:1 standby, 2 nodes mutual standby JOB_STATUS=`$CHK_CMD tskmnsrv stop -sys $SUBSYSTEM` if [ $JOB_STATUS = "DAEMON_STOPPED" ] then status=1 break fi done
In the case of the 1:1 active/standby configuration (with subsystems and partial cluster operation), add the for, do, and done statements so that the security information will be reflected on each subsystem automatically.
[Before]
# - 1:1 standby opt/FJSVfwseo/bin/mpaclcls /bin/sh /opt/FJSVfwseo/bin/jmacltrn.sh
[After]
# - 1:1 standby for SUBSYSTEM in $PLU_SUBSYSTEM do /opt/FJSVfwseo/bin/mpaclcls -s $SUBSYSTEM /bin/sh /opt/FJSVfwseo/bin/jmacltrn.sh $SUBSYSTEM done
Example of how to modify the start script for dual node mutual standby configuration
Copy the sample script and create a start script with the file name changed, and then change the value of the "SUBSYSTEM" variable to "1".
[Before]
SUBSYSTEM="0"
[After]
SUBSYSTEM="1"
Change the "- 1:1 standby" section to dual node mutual standby (change the position of "#").
[Before]
# - 1:1 standby /opt/FJSVfwseo/bin/mpaclcls /bin/sh /opt/FJSVfwseo/bin/jmacltrn.sh # - 2 nodes mutual standby #/opt/FJSVfwseo/bin/mpaclcls -s $SUBSYSTEM #/bin/sh /opt/FJSVfwseo/bin/jmacltrn.sh $SUBSYSTEM # Starts Job Scheduler & Job Execution Control
[After]
# - 1:1 standby #/opt/FJSVfwseo/bin/mpaclcls #/bin/sh /opt/FJSVfwseo/bin/jmacltrn.sh # - 2 nodes mutual standby /opt/FJSVfwseo/bin/mpaclcls -s $SUBSYSTEM /bin/sh /opt/FJSVfwseo/bin/jmacltrn.sh $SUBSYSTEM # Starts Job Scheduler & Job Execution Control
Prepare another start script file with the same contents, rename the file, and change the value of the "SUBSYSTEM" variable to "2".
[Before]
SUBSYSTEM="1"
[After]
SUBSYSTEM="2"
Place the two start scripts on the active and standby nodes, using the same directory path each case.
The following example shows how to place these files:
Active node1: /opt/FAIXJMCMN/etc/script/hacmp/omgr_start1.sh (Standby node2)/opt/FAIXJMCMN/etc/script/hacmp/omgr_start2.sh Active node2: /opt/FAIXJMCMN/etc/script/hacmp/omgr_start2.sh (Standby node1)/opt/FAIXJMCMN/etc/script/hacmp/omgr_start1.sh
Create a stop script that stops the daemons of Jobscheduler and Job Execution Control. The following sample is provided for Systemwalker Operation Manager:
/opt/FAIXJMCMN/etc/script/hacmp/omgr_stop.sh |
This sample script is for 1:1 active/standby configuration (without subsystems).
Changes to the stop script need to be made for the 1:1 active/standby configuration (with subsystems), the 1:1 active/standby configuration (with subsystems and partial cluster operation), and dual node mutual standby configurations.
After copying the sample, modify it to match your cluster environment. For 1:1 active/standby configuration (without subsystems), you can use this sample without making changes after making its backup.
The following examples show how to modify the stop script.
Example of how to modify the stop script for 1:1 active/standby configurations (with subsystems) and 1:1 active/standby configurations (with subsystems and partial cluster operation)
The following examples show a 1:1 active/standby configuration (with subsystems), in which both subsystem 0 and subsystem 1 are running, and a 1:1 active/standby configuration (with subsystems and partial cluster operation), in which subsystem 0 is not operated in a cluster but subsystem 1 is.
Change the "SUBSYSTEM" variable to "PLU_SUBSYSTEM" and its value to the subsystem numbers. In the case of the 1:1 active/standby configuration (with subsystems and partial cluster operation), simply change the number for the subsystem that will be operated in the cluster.
[Before]
SUBSYSTEM="0"
[After]
1:1 active/standby configuration (with subsystems)
PLU_SUBSYSTEM="0 1"
1:1 active/standby configuration (with subsystems and partial cluster operation)
PLU_SUBSYSTEM="1"
Add the for and do statements to stop Jobscheduler and Job Execution Control on each subsystem.
[Before]
# Job Execution Control Server MJSDAEMON=`/bin/ps -eo pid,args | /bin/grep "/usr/lib/mjes/mjsdaemon -sys $SUBSYSTEM" | /bin/grep -v "grep" | /usr/bin/wc -l `
[After]
# Job Execution Control Server for SUBSYSTEM in $PLU_SUBSYSTEM do MJSDAEMON=`/bin/ps -eo pid,args | /bin/grep "/usr/lib/mjes/mjsdaemon -sys $SUBSYSTEM" | /bin/grep -v "grep" | /usr/bin/wc -l `
Add the done statement after completing the daemon stop processing.
[Before]
# Stops Job Scheduler & Job Execution Control # - 1:1 standby, 2 nodes mutual standby /bin/sh /opt/FAIXJOBSC/bin/K00JOBSCH -sys $SUBSYSTEM /bin/sh /opt/FAIXMJS/usr/lib/mjes/K00MJS -r -sys $SUBSYSTEM /opt/FJSVstem/bin/stem_end -sys $SUBSYSTEM # Daemon Status Check
[After]
# Stops Job Scheduler & Job Execution Control # - 1:1 standby, 2 nodes mutual standby /bin/sh /opt/FAIXJOBSC/bin/K00JOBSCH -sys $SUBSYSTEM /bin/sh /opt/FAIXMJS/usr/lib/mjes/K00MJS -r -sys $SUBSYSTEM /opt/FJSVstem/bin/stem_end -sys $SUBSYSTEM done # Daemon Status Check
Add the for, do, done, and break statements to be able to check that the stop of the daemons of Jobscheduler and Job Execution Control has been completed on each subsystem.
[Before]
# Sleep .... /bin/sleep 1 status=0 # - 1:1 standby, 2 nodes mutual standby MJES_STATUS=`$CHK_CMD mjsdaemon stop -sys $SUBSYSTEM` if [ $MJES_STATUS = "DAEMON_RUNNING" ] then status=1 fi # - 1:1 standby, 2 nodes mutual standby JOB_STATUS=`$CHK_CMD tskmnsrv stop -sys $SUBSYSTEM` if [ $JOB_STATUS = "DAEMON_RUNNING" ] then status=1 fi
[After]
# Sleep .... /bin/sleep 1 status=0 for SUBSYSTEM in $PLU_SUBSYSTEM do # - 1:1 standby, 2 nodes mutual standby MJES_STATUS=`$CHK_CMD mjsdaemon stop -sys $SUBSYSTEM` if [ $MJES_STATUS = "DAEMON_RUNNING" ] then status=1 break fi # - 1:1 standby, 2 nodes mutual standby JOB_STATUS=`$CHK_CMD tskmnsrv stop -sys $SUBSYSTEM` if [ $JOB_STATUS = "DAEMON_RUNNING" ] then status=1 break fi done
Example of how to modify the stop script for dual node mutual standby configuration
Copy the sample script and create a stop script with the file name changed, and then change the value of the "SUBSYSTEM" variable to "1".
[Before]
SUBSYSTEM="0"
[After]
SUBSYSTEM="1"
Prepare another stop script with the same contents, rename the file, and change the value of the "SUBSYSTEM" variable to "2".
[Before]
SUBSYSTEM="1"
[After]
SUBSYSTEM="2"
Place the two stop scripts on the active and standby nodes, using the same directory path in each case.
The following example shows how to place these files:
Active node1: /opt/FAIXJMCMN/etc/script/hacmp/omgr_stop1.sh (Standby node2) /opt/FAIXJMCMN/etc/script/hacmp/omgr_stop2.sh Active node2: /opt/FAIXJMCMN/etc/script/hacmp/omgr_stop2.sh (Standby node1) /opt/FAIXJMCMN/etc/script/hacmp/omgr_stop1.sh
Creating and registering a monitor method enables you to monitor the Systemwalker Operation Manager daemons running on a cluster system and notify the trigger of a failover to the cluster system.
The following sample is provided for Systemwalker Operation Manager:
/opt/FAIXJMCMN/etc/script/hacmp/omgr_monitor.sh |
This sample script is for 1:1 active/standby configuration (without subsystems). Changes to the monitor method need to be made for the 1:1 active/standby configuration (with subsystems), the 1:1 active/standby configuration (with subsystems and partial cluster operation), and dual node mutual standby configurations.
After copying the sample, modify it to match your cluster environment. For 1:1 active/standby configuration (without subsystems), you can use this sample without modification after making its backup.
The following examples show how to modify the monitor method.
Example of how to modify the monitor method for 1:1 active/standby configurations (with subsystems) and 1:1 active/standby configurations (with subsystems and partial cluster operation)
In a system where multiple subsystems are running, monitor the daemons on each subsystem. The following examples show a 1:1 active/standby configuration (with subsystems), in which both subsystem 0 and subsystem 1 are running, and a 1:1 active/standby configuration (with subsystems and partial cluster operation), in which subsystem 0 is not operated in a cluster but subsystem 1 is.
Change the "SUBSYSTEM" variable to "PLU_SUBSYSTEM" and its value to the subsystem numbers. In the case of the 1:1 active/standby configuration (with subsystems and partial cluster operation), simply change the number for the subsystem that will be operated in the cluster.
[Before]
SUBSYSTEM="0"
[After]
1:1 active/standby configuration (with subsystems)
PLU_SUBSYSTEM="0 1"
1:1 active/standby configuration (with subsystems and partial cluster operation)
PLU_SUBSYSTEM="1"
Add the for and do statements to monitor the daemons on each subsystem.
[Before]
MJSDAEMON=`/bin/ps -eo pid,args | /bin/grep "/usr/lib/mjes/mjsdaemon -sys $SUBSYSTEM" | /bin/grep -v "grep" | /usr/bin/wc -l `
[After]
for SUBSYSTEM in $PLU_SUBSYSTEM do MJSDAEMON=`/bin/ps -eo pid,args | /bin/grep "/usr/lib/mjes/mjsdaemon -sys $SUBSYSTEM" | /bin/grep -v "grep" | /usr/bin/wc -l `
Add the done statement before "exit 0".
[Before]
JOB_STATUS=`$CHK_CMD tskmnsrv stop -sys $SUBSYSTEM` if [ $JOB_STATUS = "DAEMON_STOPPED" ] then exit 1 fi exit 0
[After]
JOB_STATUS=`$CHK_CMD tskmnsrv stop -sys $SUBSYSTEM` if [ $JOB_STATUS = "DAEMON_STOPPED" ] then exit 1 fi done exit 0
Example of how to modify the monitor method for dual node mutual standby configuration
Change the value of the "SUBSYSTEM" variable to "1".
[Before]
SUBSYSTEM="0"
[After]
SUBSYSTEM="1"
Prepare another monitoring script with the same contents, rename the file, and then change the value of the "SUBSYSTEM" variable to "2".
[Before]
SUBSYSTEM="1"
[After]
SUBSYSTEM="2"
Place the two monitoring scripts on the active and standby nodes, using the same directory path in each case.
The following example shows how to place there files:
Active node1: /opt/FAIXJMCMN/etc/script/hacmp/omgr_monitor1.sh (Standby node2) /opt/FAIXJMCMN/etc/script/hacmp/omgr_monitor2.sh Active node2: /opt/FAIXJMCMN/etc/script/hacmp/omgr_monitor2.sh (Standby node1) /opt/FAIXJMCMN/etc/script/hacmp/omgr_monitor1.sh