6.5.3 Logical host operation in the non-cluster system
The operation methods for running a non-failover logical host, such as JP1/IM - Manager operation, backup, and recovery, are the same as for logical hosts that run in a cluster system, except for the failover operations associated with cluster software.
- Organization of this subsection
(1) Startup and termination
Start the JP1 products on the logical host in the following order:
-
JP1/Base
-
JP1/IM - Manager
If you use the IM databases, start the JP1 products in the following order:
-
JP1/Base
-
IM databases
Start JP1/IM-Manager DB Cluster Service_logical-host-name.
-
JP1/IM - Manager
Stop the JP1 products on the logical host in the following order:
-
JP1/IM - Manager
-
JP1/Base
If you use the IM databases, stop the JP1 products in the following order:
-
JP1/IM - Manager
-
IM databases
Stop JP1/IM-Manager DB Cluster Service_logical-host-name.
-
JP1/Base
(2) Example of setting automatic startup and automatic termination
If you will be starting and stopping JP1 services automatically for the logical host at the times of system startup and termination, you must specify the settings as described below. The setting method depends on the OS supported by JP1/IM - Manager. This subsection describes the setting method for each OS.
(a) In a Windows environment
To set automatic startup and automatic termination:
-
Use a text editor to add the following code in the start sequence definition file (JP1SVPRM.DAT):
storage-destination: Base-path\conf\boot\JP1SVPRM.DAT
[Jp1BaseEvent_logical-host-name]
Name=JP1/BaseEvent_logical-host-name
ServiceName=JP1_Base_Event logical-host-name
[Jp1Base_logical-host-name]
Name=JP1/Base_logical-host-name
ServiceName=JP1_Base_logical-host-name
StopCommand=jbs_spmd_stop.exe -h logical-host-name
[JP1/IM-Manager DB Cluster Service_logical-host-name]
Name=JP1/IM-Manager DB Cluster Service_logical-host-name
ServiceName=HiRDBClusterService_JMn
StopCommand=Manager-path\bin\imdb\jimdbstop.exe -h logical-host-name
[Jp1IM-Manager_logical-host-name]
Name=JP1/IM-Manager_logical-host-name
ServiceName=JP1_Console_logical-host-name
StopCommand=jco_spmd_stop.exe -h logical-host-name
JMn: For n, specify the same value as specified for LOGICALHOSTNUMBER in the cluster setup information file.
The command specified in the StopCommand parameter is executed when shutdown is performed from JP1/Power Monitor.
(b) In a Solaris environment
To set automatic startup and automatic termination:
-
Create an automatic startup script and an automatic termination script for the logical host.
storage-destination:/etc/init.d/jp1_service_cluster
Example of automatic startup and automatic termination scripts:
#!/bin/sh
## Set Environment-variables
PATH=/sbin:/bin:/usr/bin:/opt/jp1base/bin:/opt/jp1cons/bin
export PATH
JP1_HOSTNAME=logical-host-name
export JP1_HOSTNAME
case $1 in
start_msg)
echo "Start JP1 Service $JP1_HOSTNAME"
;;
stop_msg)
echo "Stop JP1 Service $JP1_HOSTNAME"
;;
'start')
if [ -x /etc/opt/jp1base/jbs_start.cluster ]
then
/etc/opt/jp1base/jbs_start.cluster
fi
if [ -x /etc/opt/jp1cons/jco_start.cluster ]
then
/etc/opt/jp1cons/jco_start.cluster
fi
;;
'stop')
if [ -x /etc/opt/jp1cons/jco_stop.cluster ]
then
/etc/opt/jp1cons/jco_stop.cluster
fi
if [ -x /etc/opt/jp1base/jbs_stop.cluster ]
then
/etc/opt/jp1base/jbs_stop.cluster
fi
;;
esac
exit 0
-
Set a link to the scripts created in step 1.
- Startup script
-
Execute the following command to set the link:
ln -s /etc/init.d/jp1_service_cluster /etc/rc2.d/S**_JP1_SERVICE
The larger the value of ** in a start script, the later the script is executed.
- Termination script
-
Execute the following command to set the link:
ln -s /etc/init.d/jp1_service_cluster /etc/rc0.d/K**_JP1_SERVICE
The larger the value of ** in a termination script, the later the script is executed.
In general, set the program that is started first to be stopped last.
(c) In an AIX environment
To set automatic startup and automatic termination:
-
Use the mkitab command to add the following code in the /etc/inittab file:
# mkitab -i hntr2mon "jp1base:2:wait:/etc/opt/jp1base/jbs_start.cluster logical-host-name"
# mkitab -i jp1base "jp1cons:2:wait:/etc/opt/jp1cons/jco_start.cluster logical-host-name"
This code executes JP1 service startup processing when the system starts.
-
Following the entries for products that require JP1/Base and JP1/IM - Manager in /etc/rc.shutdown, use a text editor to add the following code:
test -x /etc/opt/jp1cons/jco_stop.cluster && /etc/opt/jp1cons/jco_stop.cluster logical-host-name
test -x /etc/opt/jp1base/jbs_stop.cluster && /etc/opt/jp1base/jbs_stop.cluster logical-host-name
test -x /opt/hitachi/HNTRLib2/etc/D002stop &&
/opt/hitachi/HNTRLib2/etc/D002stop
This code executes JP1 service stop processing when the system terminates.
(d) In a Linux environment
To set automatic startup and automatic termination:
-
Create an automatic startup script and an automatic termination script for the logical host.
Storage location: /etc/rc.d/init.d/jp1_service_cluster
Example of automatic startup and automatic termination scripts:
#!/bin/sh
## Set Environment-variables
PATH=/sbin:/bin:/usr/bin:/opt/jp1base/bin:/opt/jp1cons/bin
export PATH
JP1_HOSTNAME=logical-host-name
export JP1_HOSTNAME
case $1 in
start_msg)
echo "Start JP1 Service $JP1_HOSTNAME"
;;
stop_msg)
echo "Stop JP1 Service $JP1_HOSTNAME"
;;
'start')
if [ -x /etc/opt/jp1base/jbs_start.cluster ]
then
/etc/opt/jp1base/jbs_start.cluster
touch /var/lock/subsys/_JP1_BASE_$JP1_HOSTNAME
set_return
fi
if [ -x /etc/opt/jp1cons/jco_start.cluster ]
then
/etc/opt/jp1cons/jco_start.cluster
touch /var/lock/subsys/_JP1_CONS_$JP1_HOSTNAME
set_return
fi
;;
'stop')
if [ -x /etc/opt/jp1cons/jco_stop.cluster ]
then
/etc/opt/jp1cons/jco_stop.cluster
rm -f /var/lock/subsys/_JP1_CONS_$JP1_HOSTNAME
fi
if [ -x /etc/opt/jp1base/jbs_stop.cluster ]
then
/etc/opt/jp1base/jbs_stop.cluster
rm -f /var/lock/subsys/_JP1_BASE_$JP1_HOSTNAME
fi
;;
esac
exit 0
-
Set a link to the scripts created in step 1.
- Startup script
-
Execute the following command to set the link:
ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc3.d/S**_JP1_SERVICE
ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc5.d/S**_JP1_SERVICE
The larger the value of ** in a startup script, the later the execution of the script.
- Termination script
-
Execute the following command to set the link:
ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc0.d/K**_JP1_SERVICE
ln -s /etc/rc.d/init.d/jp1_service_cluster /etc/rc.d/rc6.d/K**_JP1_SERVICE
The larger the value of ** in a termination script, the later the execution of the script.
In general, set the program started first as the last program to be stopped.
If you want to automatically terminate JP1 services, make sure that you automatically start them. If you set up only automatic startup, the termination script will not start.
(e) Settings for performing automatic startup and automatic termination on both physical and logical hosts
To perform automatic startup and automatic termination on both physical and logical hosts, you must specify the settings described below in addition to the automatic startup and termination settings for the logical host.
The setting method depends on the OS. This subsection describes the setting method for each OS.
- In a Windows environment:
-
Startup control executes startup and termination processing sequentially in the order specified in the start sequence definition file (JP1SVPRM.DAT). To change the startup sequence of physical and logical hosts, define the startup and termination of physical and logical hosts in the desired sequence in the startup sequence definition file (JP1SVPRM.DAT).
- In a Solaris or Linux environment:
-
The sequence of automatic startup and automatic termination is determined by the value of ** in the expressions S** and K** in the automatic startup and termination scripts. The greater the value of **, the later the processing is executed. A symbolic link to the automatic startup and termination scripts for the physical host is created automatically during installation. To also perform automatic startup and termination for the physical host, rename the symbolic link that is created for the logical host, and then adjust the startup and termination sequence for both physical and logical hosts.
Automatic startup and automatic termination scripts for a physical host have already been provided. The following table provides a list of the symbolic links to the automatic startup and automatic termination scripts for a physical host.
Table 6‒15: List of symbolic links to automatic startup and automatic termination scripts for a physical host OS name
Startup script
Termination script
Solaris
/etc/rc2.d/S99_JP1_20_CONS
/etc/rc0.d/K01_JP1_80_CONS
Linux
/etc/rc.d/rc3.d/S99_JP1_20_CONS
/etc/rc.d/rc0.d/K01_JP1_80_CONS
/etc/rc.d/rc5.d/S99_JP1_20_CONS
/etc/rc.d/rc6.d/K01_JP1_80_CONS
Adjust the startup sequence for the physical and logical hosts according to the relationship between the value (numeric) of ** in the expressions S** and K** in the above list, and the value (numeric) of ** in the expressions S** and K** in the symbolic link in the automatic startup and termination scripts for the logical host.
For example, to start the logical host first, set a value that is less than 99 (for Solaris and Linux) in ** in the expression S** that is the name of the symbolic link to the automatic startup script for a logical host.
- In an AIX environment:
-
To perform automatic startup and termination of a physical host, you must add settings. For details about these settings, see 2.18.2 Setting automatic startup and automatic stop.
(3) Logical host operation on JP1
When you execute commands on the JP1 created on the logical host, specify the logical host name explicitly in the same manner as with a logical host that is run in a cluster system.
(4) Inheriting the logical host
The logical host in a non-cluster system environment does not support failover because the management information on the shared disk is not inherited. Do not run a logical host in such a manner that the logical host IP is inherited among multiple hosts.