If you need to stop LifeKeeper, type the appropriate command as root to stop it:
Using systemctl Command
- systemctl set-environment LKSTOP_MODE=stop-nofailover; systemctl stop lifekeeper; systemctl unset-environment LKSTOP_MODE
This command will shut down LifeKeeper on the local system if it is currently running. It will first remove all protected resources from service on the local system then shut down the LifeKeeper daemons. Protected resources will not fail over to another system in the cluster.
- systemctl set-environment LKSTOP_MODE=stop-daemons; systemctl stop lifekeeper; systemctl unset-environment LKSTOP_MODE
This command will skip the section that removes the resources from service. The resources will remain running on the local system but will no longer be protected by LifeKeeper. This command should be used with caution because if resources are not gracefully shut down, then items such as SCSI locks will not be removed. If the system on which this command is executed subsequently fails or is shut down, the system(s) will NOT initiate failover of the appropriate resources.
- systemctl stop lifekeeper
This command will remove the resources from service but does not set the !nofailover! flag (see LifeKeeper flag) on any of the systems that it can communicate with. This means that failover will occur if the shutdown_switchover flag is set. If shutdown_switchover is not set, this command behaves the same as when stop-nofailover is specified in LKSTOP_MODE.
- systemctl set-environment LKSTOP_MODE=stop-failover; systemctl stop lifekeeper; systemctl unset-environment LKSTOP_MODE
This command will remove resources from service and initiate failover. It will behave the same as systemctl stop lifekeeper when the shutdown_switchover flag is set.
Using lkstop Command
- /opt/LifeKeeper/bin/lkstop
This command will shut down LifeKeeper on the local system if it is currently running. It will first remove all protected resources from service on the local system then shut down the LifeKeeper daemons.
- /opt/LifeKeeper/bin/lkstop -f
This command will skip the section that removes resources from service. The resources will remain running on the local system but will no longer be protected by LifeKeeper.
Stop Command Behavior Differences
Command | Automatic restart | Resource | Failover |
---|---|---|---|
systemctl set-environment LKSTOP_MODE=stop-nofailover; \ systemctl stop lifekeeper; \ systemctl unset-environment LKSTOP_MODE |
Do not change | Stop | No |
systemctl set-environment LKSTOP_MODE=stop-daemons; \ systemctl stop lifekeeper; \ systemctl unset-environment LKSTOP_MODE |
Do not change | Do not stop | No |
systemctl stop lifekeeper | Do not change | Stop | Follow ON/OFF of shutdown_switchover flag at that time of executing the command |
systemctl set-environment LKSTOP_MODE=stop-failover; \ systemctl stop lifekeeper; \ systemctl unset-environment LKSTOP_MODE |
Do not change | Stop | Yes |
lkstop | Disable | Stop | No |
lkstop -f | Disable | Do not stop | No |
Disabling Automatic LifeKeeper Restart
If you do not want LifeKeeper to automatically restart when the system is restarted, type the following command:
chkconfig lifekeeper off
or
systemctl disable lifekeeper
See the chkconfig (or systemctl) man page for further information.
Post your comment on this topic.