5.9.3 Logical host operation in a non-cluster environment
JP1 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, this excludes the fact that the logical host does not fail over with the cluster software.
- Organization of this subsection
(1) Startup and termination
Start JP1 services on the logical host in the following order:
-
JP1/Base
-
JP1 programs for which JP1/Base is a prerequisite
Stop JP1 services on the logical host in the following order:
-
JP1 programs for which JP1/Base is a prerequisite
-
JP1/Base
(2) Examples of setting up automatic startup and automatic termination
To start and stop JP1 services on a logical host automatically at system startup and shutdown, you must set up JP1/Base as described below. The procedure differs for each OS. The following shows the procedure for each OS.
(a) In Windows
-
Using a text editor, add the following lines to the start sequence definition file (JP1SVPRM.DAT):
File location: installation-folder\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 [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.
(b) In AIX environment
-
Using the mkitab command, make the following entries in the /etc/inittab file:
# mkitab -i hntr2mon "unique-ID:2:wait:/etc/opt/jp1base/jbs_start.cluster logical-host-name" # mkitab -i unique-ID "unique-ID:2:wait:/etc/opt/jp1ajs2/jajs_start.cluster logical-host-name"
Note: Be sure to define unique-ID by using no more than 14 bytes, and use an ID that is unique within the file.
Example:
# mkitab -i hntr2mon "jp1base_ronri1:2:wait:/etc/opt/jp1base/jbs_start.cluster logical-host-name" # mkitab -i jp1base_ronri1 "jp1ajs2_ronri1:2:wait:/etc/opt/jp1ajs2/jajs_start.cluster logical-host-name"
The added lines execute startup processing for JP1 services when the system starts.
-
Using a text editor, add the following lines to the /etc/rc.shutdown file, after the code that terminates programs for which JP1/Base is a prerequisite:
test -x /etc/opt/jp1ajs2/jajs_stop.cluster && /etc/opt/jp1ajs2/jajs_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
The added lines execute termination processing for JP1 services when the system stops.
(c) Linux environment
-
Create a Unit file (for automatic startup and termination) for the logical host.
Location: /etc/systemd/system/jp1_base_logical-host-name.service
Example of a Unit file
[Unit] # Service name Description=JP1/Base logical-host-name Service After=rsyslog.service network.target network.service HNTRLib2D002.service ConditionFileIsExecutable=/etc/opt/jp1base/jbs_start.cluster ConditionFileIsExecutable=/etc/opt/jp1base/jbs_stop.cluster [Service] # Service type Type=forking # Service operations ExecStart=/etc/opt/jp1base/jbs_start.cluster logical-host-name ExecStop=/etc/opt/jp1base/jbs_stop.cluster logical-host-name KillMode=none StandardOutput=null StandardError=null [Install] WantedBy=multi-user.target graphical.target
-
Enable the Unit file.
- Execute the following command to enable the Unit file:
-
systemctl --system enable jp1_base_logical-host-name.service
When you configure a JP1 service to terminate automatically, you must also configure it to start automatically. The system will not execute the termination script for a JP1 service that is configured to terminate but not start automatically.
(d) Setting to start and stop JP1 automatically on both logical host and physical host
To start and stop JP1 automatically on the logical host and physical host, you must perform the following setting in addition to the setup for automatic startup and termination of the logical host. Note that the setup procedure depends on the OS. The following shows the procedure for each OS.
- In Windows:
-
The startup control executes start/stop processing in the order in which services are written in the start sequence definition file (JP1SVPRM.DAT), starting from the service written first. If you want to change the order in which the physical host and logical host start or stop, define their start/stop sequence in this file, in the order in which you want the hosts to start or stop.
- In Linux:
-
For details about the settings to adjust the order in which JP1 services start and stop automatically between the logical host and physical host in Linux, see (e) below.
- In AIX:
-
To start and stop the physical host automatically, additional settings are required. For details on the additional settings, see 7.2.1 Setting services to start and stop automatically.
(e) Settings to adjust the start order between a physical host and logical host (in a Linux environment)
You can adjust the order in which JP1 services start and stop automatically between a physical host and logical host in a Linux environment. To do this, you must specify the following settings in addition to the settings to start and stop JP1 services automatically on the logical host.
- To start JP1 services on the physical host first:
-
Edit the Unit file for the logical host.
Location: /etc/systemd/system/jp1_base_logical-host-name.service
Part to edit: Add jp1_base.service to the end of the After= line.
Example of a Unit file
[Unit] # Service name Description=JP1/Base logical-host-name Service After=rsyslog.service network.target network.service HNTRLib2D002.service jp1_base.service ConditionFileIsExecutable=/etc/opt/jp1base/jbs_start.cluster ConditionFileIsExecutable=/etc/opt/jp1base/jbs_stop.cluster
- To start P1 services on the logical host first:
-
Edit the Unit file for the logical host.
Location: /etc/systemd/system/jp1_base_logical-host-name.service
Part to edit: Add the Before= line, and then define jp1_base.service.
Example of a Unit file
[Unit] # Service name Description=JP1/Base logical-host-name Service Before=jp1_base.service After=rsyslog.service network.target network.service HNTRLib2D002.service ConditionFileIsExecutable=/etc/opt/jp1base/jbs_start.cluster ConditionFileIsExecutable=/etc/opt/jp1base/jbs_stop.cluster
(3) Operations on JP1 running on the logical host
When executing a command for JP1 configured on a logical host, specify the logical host name explicitly in the same way as for a logical host running in a cluster system.
(4) Inheritance of logical host information
A logical host in a non-cluster environment cannot be failed over because it does not inherit the management information on the shared disk. For this reason, do not use such a logical host in a multiple-host environment where a logical host IP is passed from one host to another.