Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Administration Guide


10.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.

    Configure settings so that, when the OS starts, JP1/AJS3 starts after initialization of the embedded database finishes, because the embedded database is initialized under /sbin/rc2.d. If multiple embedded databases are installed, as many files as embedded databases will be created. If the embedded database setup identifier is _JF0 and the installation directory is /opt/jp1ajs2/embdb/_JF0, the file name becomes S899HiRDB_E.opt.jp1ajs2.embdb._JF0.

    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.

    Configure settings so that, when the OS starts, JP1/AJS3 starts after initialization of the embedded database finishes, because the embedded database is initialized under /etc/rc2.d. If multiple embedded databases are installed, as many files as embedded databases will be created. If the embedded database setup identifier is _JF0 and the installation directory is /opt/jp1ajs2/embdb/_JF0, the file name becomes S91HiRDB_E.opt.jp1ajs2.embdb._JF0.

    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"

    Configure settings so that, when the OS starts, JP1/AJS3 starts after initialization of the embedded database finishes, because the embedded database is initialized under /etc/rc.d/rc2.d. If multiple embedded databases are installed, as many files as embedded databases will be created. If the embedded database setup identifier is _JF0 and the installation directory is /opt/jp1ajs2/embdb/_JF0, the file name becomes S910HiRDB_E.opt.jp1ajs2.embdb._JF0.

  • 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.

    Configure settings so that, when the OS starts, JP1/AJS3 starts after initialization of the embedded database finishes, because the embedded database is initialized under /etc/rc3.d and /etc/rc5.d. If multiple embedded databases are installed, as many files as embedded databases will be created. If the embedded database setup identifier is _JF0 and the installation directory is /opt/jp1ajs2/embdb/_JF0, the file name becomes S91HiRDB_E.opt.jp1ajs2.embdb._JF0.

    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 JP1/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 10‒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. In addition, do not change values for symbolic links to automatic start or automatic stop scripts. Because the initialization handling of embedded database is carried out in OS starting, set it so that JP1/AJS3 starts later than the initialization process of the embedded database.

The following table lists the scripts for initializing an embedded database.

Table 10‒4: Initialization scripts for embedded DB

OS name

Initialization scripts for embedded DB

HP-UX

/sbin/rc2.d/S899HiRDB_E.embedded-database-practical-directory

Solaris

/etc/rc2.d/S91HiRDB_E.embedded-database-practical-directory

Linux

/etc/rc.d/rc3.d/S91HiRDB_E.embedded-database-practical-directory

/etc/rc.d/rc5.d/S91HiRDB_E.embedded-database-practical-directory

Note

If multiple embedded databases are installed, as many files as embedded databases will be created under the directory. If the embedded database setup identifier is _JF0 and the installation directory is /opt/jp1ajs2/embdb/_JF0, the file name becomes SxxxHiRDB_E.opt.jp1ajs2.embdb._JF0.

For example, if you want the logical host to start first, set a value for XX in SXX (the symbolic link name for the automated startup script to be created for the logical host) as follows:

  • In HP-UX

    A value larger than 899 and smaller than 905.

  • In Solaris and Linux

    A value larger than 91 and smaller than 99.

Note that JP1/Base must have already started because it is a prerequisite product for JP1/AJS3.

The end processing of the embedded database is performed when the OS stops. Therefore, specify settings so that JP1/AJS3 stops before the end processing of the embedded database. The following table lists the end processing scripts for the embedded database.

Table 10‒5: List of the end processing scripts of the embedded database

OS name

End processing script

HP-UX

/sbin/rc1.d/K094HiRDB_E.embedded-database-practical-directory

Solaris

/etc/rc0.d/K090HiRDB_E.embedded-database-practical-directory

Linux

/etc/rc.d/rc0.d/K09HiRDB_E.embedded-database-practical-directory

/etc/rc.d/rc6.d/K09HiRDB_E.embedded-database-practical-directory

Note

If multiple embedded databases are installed, as many files as embedded databases will be created under the directory. If the embedded database setup identifier is _JF0 and the installation directory is /opt/jp1ajs2/embdb/_JF0, the file name becomes KxxxHiRDB_E.opt.jp1ajs2.embdb._JF0.

For example, if you want the logical host to stop after the physical host, set a value for XX in KXX (the symbolic link name for the automatic stop script to be created for the logical host) as follows:

  • In HP-UX

    A value greater than 0941 and less than 0949

  • In Solaris and Linux

    A value greater than 01 and less than 09

Note that JP1/AJS3 must be stopped first because JP1/Base is a prerequisite product for JP1/AJS3.

(c) In AIX environment

Because the initialization handling of embedded database is carried out in OS starting, set it so that JP1/AJS3 starts later than the initialization process of the embedded database. The following table lists the scripts for initializing an embedded database in AIX environment.

Table 10‒6: Initialization scripts for embedded DB in AIX environment

OS name

Initialization scripts

AIX

/etc/rc.d/rc2.d/S910HiRDB_E.embedded-database-practical-directory

Note

If multiple embedded databases are installed, as many files as embedded databases will be created under the directory. If the embedded database setup identifier is _JF0 and the installation directory is /opt/jp1ajs2/embdb/_JF0, the file name becomes S910HiRDB_E.opt.jp1ajs2.embdb._JF0.