How to delay the VCS startup after a reboot on RHEL 7.3

How to delay the VCS startup after a reboot on RHEL 7.3

  • Article ID:100042310
  • Last Published:
  • Product(s):InfoScale & Storage Foundation

Description

This document shows how to delay the VCS startup after the reboot on RHEL 7.3

 


FOR RHEL 7.3 with INFOSCALE 7.3 or ABOVE

In Infoscale 7.3, VCS services uses the systemd. So to delay the VCS startup by five minutes, make the necessary changes to the OS level tunable TimeoutStartSec and ExecStartPre.

  • TimeoutStartSec: Configures the time to wait for start-up. If a daemon service does not signal start-up completion within the configured time, the service will be considered failed and will be shut down again.
  • ExecStartPre: The commands which are specified in ExecStartPre will be executed before starting the service.

Below is the default value

# systemctl show vcs.service -p TimeoutStartUSec
TimeoutStartUSec=1min 30s
#

#systemctl show vcs.service -p ExecStartPre
#


>> Add below entries for TimeoutStartSec and ExecStartPre along with the desired values  in the file /etc/systemd/system/multi-user.target.wants/vcs.service.

TimeoutStartSec=300                           
ExecStartPre=/bin/sleep 180

>> Run 'systemctl daemon-reload' to reload units.

#systemctl daemon-reload



In this example, delay for VCS start is 3 minutes, so added TimeoutStartSec value to 5 minutes and command sleep for 180 seconds in ExecStartPre.

# systemctl show vcs.service -p ExecStartPre
ExecStartPre={ path=/bin/sleep ; argv[]=/bin/sleep 180 ; ignore_errors=no ; start_time=[Wed 2018-02-28 05:22:46 EST] ; stop_time=[Wed 2018-02-28 05:25:46 EST
lines 1-1/1 (END)

#systemctl show vcs.service -p TimeoutStartUSec
TimeoutStartUSec=5min
#


Note: By making these changes, even there will be delay everytime in starting HAD  using the command hastart.


#systemctl status vcs.service
? vcs.service - VERITAS Cluster Server (VCS)
  Loaded: loaded (/opt/VRTSvcs/bin/vcs; enabled; vendor preset: disabled)
  Active: activating (start-pre) since Wed 2018-02-28 23:26:52 EST; 1min 18s ago
  Process: 6660 ExecStop=/opt/VRTSvcs/bin/vcs stop 2>&1 (code=exited, status=0/SUCCESS)
  Process: 13148 ExecStart=/opt/VRTSvcs/bin/vcs start 2>&1 (code=exited, status=0/SUCCESS)
  Control: 7068 (sleep)
  CGroup: /system.slice/vcs.service
          ??control
            ??7068 /bin/sleep 180

Feb 28 23:26:52 server101 systemd[1]: Starting VERITAS Cluster Server (VCS)...
[root@server101 ~]#
 


FOR RHEL 7.3 with INFOSCALE 7.2

VCS is not started by system in Infoscale 7.2 and it used the legacy init method.

Follow the below steps to make the necessary changes to delay the VCS startup for infoscale 7.2

1) cp /etc/init.d/vcs /etc/init.d/vcs_bk
2) Edit the file etc/init.d/vcs and induce sleep

   186 # See how we were called.
    187 case "$1" in
    188     start)
    189         sleep 300                                   
    190         hastart
    191         ;;
    192     stop)
    193         hastop
    194         ;;

In this example, delay for VCS start is 5 minutes, so included the sleep for 300 seconds.

3) Run 'systemctl daemon-reload' to reload units.

#systemctl daemon-reload

4) reboot the node and verify the VCS startup

#systemctl status vcs.service


Note: By making these changes, there will be delay every time in starting HAD.

Was this content helpful?