Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Administration Guide


3.3.2 Setting up automatic startup and automatic stop when a logical host operates in a non-cluster system (for Linux)

  1. Create a script for automatic startup and automatic stop for the logical host.

    Storage destination: /usr/lib/systemd/system/jp1_cons_logical-host-name.service

    Automatic startup and automatic stop script example

    [Unit]
    Description=JP1/Integrated Management - Manager logical-host-name Service
    Requires=jp1_base_logical-host-name.service
    After=jp1_base_logical-host-name.service
    ConditionFileIsExecutable=/etc/opt/jp1cons/jco_start.cluster
    ConditionFileIsExecutable=/etc/opt/jp1cons/jco_stop.cluster
     
    [Service]
    ExecStart=/etc/opt/jp1cons/jco_start.cluster logical-host-name
    ExecStop=/etc/opt/jp1cons/jco_stop.cluster logical-host-name
     
    Type=forking
    KillMode=none
    StandardOutput=null
    StandardError=null
     
    [Install]
    WantedBy=multi-user.target graphical.target

    logical-host-name indicates the name of the logical host to be started. For details about the Unit file of a JP1/Base logical host, follow the settings in JP1/Base.

    After creating an automatic start or automatic stop script for a logical host, run the following command to set permissions.

    chmod 644 /usr/lib/systemd/system/jp1_cons_logical-host-name.service

    chgrp root /usr/lib/systemd/system/jp1_cons_logical-host-name.service

    chown root /usr/lib/systemd/system/jp1_cons_logical-host-name.service

  2. Use the following command to register the created script for automatic startup and automatic stop.

    # systemctl --system enable jp1_cons_logical-host-name

  3. To edit the script for automatic startup and automatic stop, use the following command to apply the change to systemd:

    # systemctl daemon-reload

    Important

    In Linux, to start or stop JP1/IM - Manager manually when the automatic start and automatic stop of JP1/IM - Manager are enabled, execute the commands listed below. To start or stop JP1/IM - Manager manually, you can use the commands listed below. To check the status (started or stopped) of JP1/IM - Manager processes, you can use the jco_spmd_status command. When the IM database is used, you can use the jimdbstatus command to check the operating status of the IM database.

    • Starting JP1/IM - Manager

      Physical hosts:

      systemctl start jp1_cons.service

      Logical hosts:

      systemctl start jp1_cons_logical-host-name.service

    • Stopping JP1/IM - Manager

      Physical hosts:

      systemctl stop jp1_cons.service

      Logical hosts:

      systemctl stop jp1_cons_logical-host-name.service

    Even when automatic startup and stop is set to enabled, JP1/IM - Manager does not stop automatically after it is started or stopped by using a command other than the systemctl command, for example, by using the jco_start or jco_start.cluster command to start, or the jco_stop or jco_stop.cluster command to stop. (In such a case, automatic startup and stop remains enabled although the stop script does not start when the system stops.)

    To allow JP1/IM - Manager to stop automatically when the system stops, start it again by using the systemctl command. To know whether JP1/IM - Manager will stop automatically, execute the following commands to check whether active is returned.

    Physical hosts:

    systemctl is-active jp1_cons.service

    Logical hosts:

    systemctl is-active jp1_cons_logical-host-name.service