Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Automatic Job Management System 3 Administration Guide


11.5.3 Logical host use in a non-cluster environment

JP1/AJS3 operations and backup and recovery procedures are the same on a logical host that does not fail over as on a logical host in a cluster system. However, the logical host will not fail over with the cluster software.

Organization of this subsection

(1) Startup and shutdown order

Start services on the logical host in the following order:

  1. JP1/Base

  2. JP1/AJS3

Stop services on the logical host in the following order:

  1. JP1/AJS3

  2. JP1/Base

(2) Performing operations for JP1/AJS3 on a logical host

When you execute a command for an instance of JP1/AJS3 set up on a logical host, specify the logical host name explicitly.

(3) Example of setting up automatic start and stop

If you want JP1/AJS3 services for logical hosts to automatically start and stop when the system starts or stops, you need to specify the settings described below. The setting method differs for each OS supported by JP1/AJS3. The following describes the setting method for each OS.

To delete a logical host, delete the automatic start and stop scripts created for the logical host and the link setting.

(a) In Windows

Using a text editor, open the file JP1/Base-installation-folder\conf\boot\Jp1svprm.dat used by JP1/Base startup control and add the following lines:

  :
JP1/Base-settings
  :
 
[Jp1AJS2_logical-host-name]
Name=JP1/AJS2_logical-host-name
ServiceName=JP1_AJS2_logical-host-name
StopCommand=jajs_spmd_stop.exe -h logical-host-name

The command specified in StopCommand is executed when JP1/Power Monitor shuts down the host.

The StopCommand is available only when JP1/AJS3 and JP1/Power Monitor are installed on the same host.

(b) In HP-UX

  1. Create the automatic start and stop scripts for the logical host.

    Example automatic start and stop scripts (/sbin/init.d/jp1_service_cluster):

    #!/bin/sh
     
    case $1 in
    start_msg)
          echo "Start JP1 Service $JP1_HOSTNAME"
          ;;
     
    stop_msg)
          echo "Stop JP1 Service $JP1_HOSTNAME"
          ;;
     
    'start')
                  :
          JP1/Base-start-processing
                  :
          if [ -x /etc/opt/jp1ajs2/jajs_start.cluster ]
          then
                /etc/opt/jp1ajs2/jajs_start.cluster logical-host-name jajs_spmd-command-option
          fi
          ;;
     
    'stop')
          if [ -x /etc/opt/jp1ajs2/jajs_stop.cluster ]
          then
                /etc/opt/jp1ajs2/jajs_stop.cluster logical-host-name jajs_spmd_stop-command-option
                  :
          JP1/Base-stop-processing
                  :
          ;;
     
    esac
     
    exit 0
  2. Link to the scripts you created in step 1.

    Start script

    Execute the following command to set up the link:

    ln -s /sbin/init.d/jp1_service_cluster /sbin/rc2.d/SXXX_JP1_SERVICE

    The higher the value in XXX, the later the start script is executed.

    Stop script

    Execute the following command to set up the link:

    ln -s /sbin/init.d/jp1_service_cluster /sbin/rc1.d/KXXX_JP1_SERVICE

    The higher the value in XXX, the later the stop script is executed.

    Typically, set the values so that a JP1 service that starts earlier stops later.

  3. Set permissions for the created file.

    Execute the following commands to set permissions:

    chmod u=rx,go=r /sbin/init.d/jp1_service_cluster
    chown root:sys /sbin/init.d/jp1_service_cluster
    chmod u=rx,go=r /sbin/rc2.d/SXXX_JP1_SERVICE
    chown -h root:sys /sbin/rc2.d/SXXX_JP1_SERVICE
    chmod u=rx,go=r /sbin/rc1.d/KXXX_JP1_SERVICE
    chown -h root:sys /sbin/rc1.d/KXXX_JP1_SERVICE

(c) In Solaris

  1. Create the automatic start and stop scripts for the logical host.

    Example automatic start and stop scripts (/etc/init.d/jp1_service_cluster)

    #!/bin/sh
     
    case $1 in
    start_msg)
          echo "Start JP1 Service $JP1_HOSTNAME"
          ;;
     
    stop_msg)
          echo "Stop JP1 Service $JP1_HOSTNAME"
          ;;
     
    'start')
                  :
          JP1/Base-start-processing
                  :
          if [ -x /etc/opt/jp1ajs2/jajs_start.cluster ]
          then
                /etc/opt/jp1ajs2/jajs_start.cluster logical-host-name option-of-jajs_spmd command
          fi
          ;;
     
    'stop')
          if [ -x /etc/opt/jp1ajs2/jajs_stop.cluster ]
          then
                /etc/opt/jp1ajs2/jajs_stop.cluster logical-host-name option-of-jajs_spmd_stop-command
          fi
                  :
          JP1/Base-stop-processing
                  :
          ;;
     
    esac
     
    exit 0
  2. Link to the scripts you created in step 1.

    Start script

    Execute the following command to set up the link:

    ln -s /etc/init.d/jp1_service_cluster /etc/rc2.d/SXX_JP1_SERVICE

    The higher the value in XX, the later the start script is executed.

    Stop script

    Execute the following command to set up the link:

    ln -s /etc/init.d/jp1_service_cluster /etc/rc0.d/KXX_JP1_SERVICE

    The higher the value in XX, the later the stop script is executed.

    Typically, set the values so that a JP1 service that starts earlier stops later.

  3. Set permissions for the created file.

    Execute the following commands to set permissions:

    chmod u=rx,go=r /etc/rc2.d/SXX_JP1_SERVICE
    chown -h root:sys /etc/rc2.d/SXX_JP1_SERVICE
    chmod u=rx,go=r /etc/rc0.d/KXX_JP1_SERVICE
    chown -h root:sys /etc/rc0.d/KXX_JP1_SERVICE

(d) In AIX

  • Initialization process

    Use the mkitab command to make the following entries in the /etc/inittab file.

    # mkitab -i JP1/Base-record "jp1ajs2:2:wait:/etc/opt/jp1ajs2/jajs_start.cluster logical-host-name option-of-jajs_spmd-command"
  • Shutdown process

    Add the following code to the /etc/rc.shutdown file, in a position later than code that shuts down programs for which JP1/AJS3 is a prerequisite.

    test -x /etc/opt/jp1ajs2/jajs_stop.cluster && /etc/opt/jp1ajs2/jajs_stop.cluster logical-host-name option-of-jajs_spmd_stop-command
        :
    JP1/Base-stop-processing
        :
    exit 0

    If this script terminates abnormally, the OS shutdown process will be canceled. Enter exit 0 on the last line so that the script terminates normally.

(e) In Linux

  1. Create the automatic start and stop scripts for the logical host.

    Example automatic start and stop scripts (/etc/rc.d/init.d/jp1_service_cluster):

    #!/bin/sh
     
    case $1 in
    start_msg)
          echo "Start JP1 Service $JP1_HOSTNAME"
          ;;
     
    stop_msg)
          echo "Stop JP1 Service $JP1_HOSTNAME"
          ;;
     
    'start')
                  :
          JP1/Base-start-processing
                  :
          if [ -x /etc/opt/jp1ajs2/jajs_start.cluster ]
          then
                /etc/opt/jp1ajs2/jajs_start.cluster logical-host-name jajs_spmd-command-option
                touch /var/lock/subsys/_JP1_SERVICE
          fi
          ;;
    'stop')
          if [ -x /etc/opt/jp1ajs2/jajs_stop.cluster ]
          then
                /etc/opt/jp1ajs2/jajs_stop.cluster logical-host-name jajs_spmd_stop-command-option
                rm -f /var/lock/subsys/_JP1_SERVICE
          fi
                  :
          JP1/Base-stop-processing
                  :
          ;;
     
    esac
     
    exit 0
  2. Link to the scripts you created in step 1.

    Start script

    Execute the following command to set up the link:

    ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc3.d/SXX_JP1_SERVICE
    ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc5.d/SXX_JP1_SERVICE

    The higher the value in XX, the later the start script is executed.

    Stop script

    Execute the following command to set up the link:

    ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc0.d/KXX_JP1_SERVICE
    ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc6.d/KXX_JP1_SERVICE

    The higher the value in XX, the later the stop script is executed.

    Typically, set the values so that a JP1 service that starts earlier stops later.

  3. Set permissions for the created file.

    Execute the following commands to set permissions:

    chmod u=rwx,go=rx /etc/rc.d/init.d/jp1_service_cluster
    chown root:root /etc/rc.d/init.d/jp1_service_cluster
    chmod u=rwx,go=rx /etc/rc.d/rc3.d/SXX_JP1_SERVICE
    chown -h root:root /etc/rc.d/rc3.d/SXX_JP1_SERVICE
    chmod u=rwx,go=rx /etc/rc.d/rc5.d/SXX_JP1_SERVICE
    chown -h root:root /etc/rc.d/rc5.d/SXX_JP1_SERVICE
    chmod u=rwx,go=rx /etc/rc.d/rc0.d/KXX_JP1_SERVICE
    chown -h root:root /etc/rc.d/rc0.d/KXX_JP1_SERVICE
    chmod u=rwx,go=rx /etc/rc.d/rc6.d/KXX_JP1_SERVICE
    chown -h root:root /etc/rc.d/rc6.d/KXX_JP1_SERVICE
Cautionary note

If the JP1 service is set to automatically stop, make sure that it also automatically starts. If only automatic stopping is specified, the stop script will not start.

(4) Setting up automatic start and stop on both the physical host and logical host

If you want JP1/AJS3 services to automatically start and stop on both the physical host and logical host, you must specify the settings described below in addition to the automatic start and stop settings on the logical host.

The setting method differs for each OS supported by JP1/AJS3. The following describes the setting method for each OS.

(a) In a Windows environment

Use startup control to define the order in which the services are started and stopped.

If you want to change the startup sequence and stop sequence for the physical host and logical host, change the definition in startup control.

For details about startup control, see the Job Management Partner 1/Base User's Guide.

(b) In HP-UX, Solaris and Linux environments

The sequence for automatic start and automatic stop is determined by the value of the number part (XX in SXX or KXX) of the automatic start and stop scripts. The higher the XX value, the later the script is executed. Symbolic links to the automatic start and stop scripts for the physical host are automatically created during installation. To implement the automatic start and stop of services for the physical host, change the name of the symbolic link created for the logical host, and then adjust the start and stop sequences for the physical host and logical host.

Note that the automatic start and stop scripts for the physical host are already provided. The following table lists the symbolic links to the automatic start and stop scripts for the physical host.

Table 11‒3: Symbolic links to the automatic start and automatic stop scripts for the JP1/AJS3 physical host

OS name

Start script

Stop script

HP-UX

/sbin/rc2.d/S907jp1ajs2

/sbin/rc1.d/K093jp1ajs2

Solaris

/etc/rc2.d/S99_JP1_80_AJS2

/etc/rc0.d/K01_JP1_20_AJS2

Linux

/etc/rc.d/rc3.d/S99_JP1_80_AJS2

/etc/rc.d/rc5.d/S99_JP1_80_AJS2

/etc/rc.d/rc0.d/K01_JP1_20_AJS2

/etc/rc.d/rc6.d/K01_JP1_20_AJS2

Check the value of XX (number) in SXX or KXX in the above table and XX (number) in SXX or KXX of the automatic start and stop scripts for the logical host. Determine the start sequence for the physical host and logical host according to the relationship of these values.

For example, if you want to start services on the logical host first, specify a value smaller than 900 (in HP-UX) or 99 (in Solaris and Linux) for XX in symbolic-link-name SXX of the automatic start script created for the logical host.

Note that because JP1/AJS3 requires JP1/Base, JP1/Base must be started first.