Hitachi

For Linux(R) (x86) Systems HA Monitor Cluster Software


6.3.2 Specifying system files

Set HA Monitor in system files. Use the monsetup command to set the HA Monitor to automatically start and stop.

Organization of this subsection

(1) If the OS is RHEL7 or a later version

HA Monitor provides the Unit settings file (/usr/lib/systemd/system/HAmon-powercontrol.service). Execute the systemctl command of the OS to enable the service.

Use the following method to enable the service:

# systemctl enable HAmon-powercontrol.service

The following shows the contents of the Unit settings file:

[Unit]
Description=HA Monitor(power control)
After= sysinit.target network.target sshd.service jp1_base.service HABooster.service ltd.service haconnd.service
 
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c '/opt/hitachi/HAmon/bin/HApwon >/dev/null 2>&1'
ExecStop=/bin/sh -c '/opt/hitachi/HAmon/bin/HApwoff >/dev/null 2>&1'
 
[Install]
WantedBy=multi-user.target

To change the automatic start and stop sequence of HA Monitor, modify the values specified for the After entry under the [Unit] section in the Unit settings file. For details about the Unit settings file, see the documentation for systemd of the OS.

Notes
  • You can change only the values for the After entry from the default settings. Do not change or delete other default settings provided since installation.

  • Although you can add services to the After entry, you must not change or delete the other default settings provided since installation.

  • If you add options, adequately make prior consideration and verification. If you specify incorrect settings, such as those causing service dependencies to loop, the OS might be unable to start.

  • The Unit settings file under /usr/lib/systemd/system is overwritten when an overwrite installation of HA Monitor is performed. Therefore, if you want to edit the Unit settings file, copy HAmon-powercontrol.service under /usr/lib/systemd/system to /etc/systemd/system, and then edit the file at the copy destination.

(2) If the OS is RHEL6

HA Monitor provides the /etc/rc.d/init.d/HAmon script. Register the script by executing the chkconfig command of the OS.

Use the following method to register the script:

# /sbin/chkconfig --add HAmon

To change the automatic start and termination sequence of HA Monitor, modify the chkconfig control statement at the beginning of the /etc/rc.d/init.d/HAmon file. For details about the control statement, see Help for the chkconfig command of the OS.

Note that the /etc/rc.d/init.d/HAmon file is overwritten when an overwrite installation of HA Monitor is performed. Therefore, if you modified the /etc/rc.d/init.d/HAmon file, back up the /etc/rc.d/init.d/HAmon file before you perform an overwrite installation of HA Monitor. After an overwrite installation of HA Monitor is performed, modify the /etc/rc.d/init.d/HAmon file again based on the backup file.