Database resource stuck in stopped state
The database does not get activated after the instance recovers.
Important: In
Db2®
11.5.8 and later, Mutual Failover high
availability is supported when using Pacemaker as the
integrated cluster manager. In Db2
11.5.6 and later, the Pacemaker cluster manager
for automated fail-over to HADR standby databases is packaged and installed with Db2. In Db2
11.5.5, Pacemaker is included and
available for production environments. In Db2
11.5.4, Pacemaker is included as
a technology preview only, for development, test, and proof-of-concept environments.
Identifying the problem
Running the crm status command shows the database resource is stopped and
unmanaged:
[root@svlxtordpacemaker]# crm status
Stack: corosync
Current DC: svlxtord(version 2.0.2-1.db2pcmk.el8-744a30d655) -partition with quorum
Last updated: Fri May 29 11:54:25 2020
2 nodes configured
18 resources configured
Online: [ svlxtorc svlxtord ]
Full list of resources:
db2_svlxtord_enc420c (ocf::heartbeat:db2ethmon): Started svlxtord
db2_svlxtorc_enc4209 (ocf::heartbeat:db2ethmon): Started svlxtorc
db2_svlxtorc_rohant_0 (ocf::heartbeat:db2inst): Started svlxtorc
db2_svlxtord_rohant_0 (ocf::heartbeat:db2inst): Started svlxtord
Clone Set: db2_rohant_rohant_GTDB-clone [db2_rohant_rohant_GTDB] (promotable) (unmanaged)
db2_rohant_rohant_GTDB (ocf::heartbeat:db2hadr): Unpromoted svlxtorc(unmanaged)
Stopped: [ svlxtord]
The previous output shows the state of the hosts, instances,
and database.Here is a breakdown of each of those states:
The hosts are online in the Pacemaker
cluster:
Online: [ svlxtorc svlxtord ]
The instance resources are
started:
db2_svlxtorc_rohant_0 (ocf::heartbeat:db2inst): Started svlxtorc
db2_svlxtord_rohant_0 (ocf::heartbeat:db2inst): Started svlxtord
However, the database resource shows that one database is in a stopped state, and that the
resource is
unmanaged:
Clone Set: db2_rohant_rohant_GTDB-clone [db2_rohant_rohant_GTDB] (promotable) (unmanaged)
db2_rohant_rohant_GTDB (ocf::heartbeat:db2hadr): Unpromoted svlxtorc(unmanaged)
Stopped: [ svlxtord]
The output from running the db2pd -hadr -db <dbname> command shows that the
database is not
activated:
db2pd -hadr -db HADRDB
Database HADRDB not activated on database member 0 or this database name cannot be found in the local database directory.
Option -hadr requires -db <database> or -alldbs option and active database.
Resolving the problem
Correct this state with the following steps: