KeepFCalive

Tietotori
Tips and Trix

In case of a powerfailure, shutdownFC...
If you have an UPS you've propably considered what happens when the battery runs out. The most rasonable thing is to shut down the server safely and then shut down the computer before that happens. Mac OS X inclues ability to run scripts before shutting down, as well as PowerChute from APC.

Note, that you should disable keepFCalive prior to stopping FCIS and FCS. If you do not do that the worst case scenario is that cron activates keepFCalive and you have the server starting up in the middle of the shutdown process. I propably do not need to explain that this could lead to hazardous problems in the FCNS.

To avoid mistakes you can use "shutdownFC.sh". It will do it all for you; first it disables keepFCalive, then shuts down FCIS and then FCS.

NB The command shutdownFC.sh should be executed by fcadmin, not root. If it is executed by root, you should also make sure you use root privileges when enabling keepFCalive. (This is because the "disableFCalive" file is then owned by root and fcadmin might not have privileges to remove that file.

...and enable keepFCalive at reboot
When the computer is rebooted keepFCalive will still remain disabled if it was disabled when the computer was shut down. You propably like to enable keepFCalive and launch FCS and FCIS automatically instead. You can use the line below in the crontab to enable keepFCalive at startup.
@reboot ~fcadmin/keepFCalive/enableFCalive.sh
212006_110226_0.png

Disable keepFCalive when you BU your mirror, enable it afterwards
Before you make a BackUp of your mirror you might like to disable keepFCalive. If the server crashes when the mirror is paused the server will destroy the mirror immediately when the server starts. If you disable keepFCalive you will get a BU of the mirror done (which may be important in this situation). Additionally there would be problems when the BU software is trying to copy files that are in use by FC and vice versa. When the BU is complete you should enable keepFCalive again. If the server crashed during the BU it will be started automatically after the BU is completed when keepFCalive is enabled again.