Technical Blog Post
Abstract
75 ways to demystify DB2: #15: On Linux, DB2 instance is not automatically starting upon system reboot
Body
Recently worked on an issue with DB2 Fault Monitor (FM) process failing to start on a Linux RHEL 6 platform. After following the steps in the technical note below:
the DB2 Fault Monitor process was failing with the following message :
# su - db2inst1
$ . ./sqllib/db2profile
$ db2fm -s -S
Gcf module 'fault monitor' is INSTALLED PROPERLY but NOT ALIVE
Gcf module '/opt/IBM/DB2/lib64/libdb2gcf.so' is INSTALLED PROPERLY but NOT ALIVE
As a result, the DB2 instance will not automatically start upon a system reboot.
Below are tips you can follow to verify you are working with the proper environment in order to resolve the problem :
- If you are on a Linux RHEL 6 or 7 platform, the /etc/inittab has been deprecated as mentioned in the link above.
-
Verify the /etc/init/db2fmcd.conf exist with the proper permissions, owner and group. For example :
$ ls -l /etc/inittotal 72-rw-r--r-- 1 root root 446 Feb 23 22:11 db2fmcd.conf -
Verify the db2fmcd.conf contains the proper entry :
###################################################################### DB2 fault monitor# Starts fmcd# Note: any customizations to this file will be lost the next time this is updateddescription 'Fault Monitor is the DB2 database facility that monitors DB2 database manager instances, and restarting any instance that exits prematurely.'version 'DB2 v10.5.0.2'start on stopped rc RUNLEVEL=[2345]stop on starting rc RUNLEVEL=[016]console outputrespawnrespawn limit 10 120exec /opt/IBM/DB2/bin/db2fmcd############################################################################ -
As instance onwner, verify the global registry field StartAtBoot is set to 1.
$ db2greg -getinstrec instancename='db2inst1'
Retrieved record:
Service = |DB2|
Version = |10.5.0.2|
InstanceName = |db2inst1|
InstancePath = |/home/db2inst1/sqllib|
Usage = |N/A|
StartAtBoot = 1
Maintenance = 0
InstallPath = |/opt/IBM/DB2|
RemoteProf = |N/A|
Comment = |N/A| -
As root, verify the registry variable DB2AUTOSTART=YES
$ $DB2DIR/instance/db2iset -i db2inst1 -all[i] DB2_USE_ALTERNATE_PAGE_CLEANING=ON[i] DB2_INLIST_TO_NLJN=YES[i] DB2_REDUCED_OPTIMIZATION=YES[i] AUTOSTART=YES[i] DB2COMM=TCPIP[i] DB2AUTOSTART=YES[g] DB2SYSTEM=sdatas5t[g] DB2INSTDEF=db2inst1
Note: $DB2DIR is the path on which DB2 is installed. -
Ensure the Linux reboot is set to "normal". If its set to "firstboot", Linux will just run utilities configured for first boot.
-
As root, verify if exec /opt/IBM/DB2/bin/db2fmcd command can successfully start the service. If the service does not start, involve Linux Technical support to find out why the service is not starting.
UID
ibm11141198