IBM Support

When log archiving on Primary is not proceeding, HADR Standby accumulates log files which may lead to disk full and subsequently stalls HADR

Technical Blog Post


Abstract

When log archiving on Primary is not proceeding, HADR Standby accumulates log files which may lead to disk full and subsequently stalls HADR

Body

On HADR Standby, normally existing inactive log files will be renamed when Db2 needs to allocate

a new log file. However in case Standby detects the log files are not yet archived on Primary, Db2
allocates new log files instead of renaming existing log files.

See following message:

EDUID : 12345 EDUNAME: db2logalloc.0 (SAMPLE) 0
FUNCTION: DB2 UDB, data protection services, sqlpLogAllocCandidatePool::refresh, probe:100
MESSAGE : Head extent or last archived extent on primary is falling behind
current shipping extent.
DATA #1 : SQLPG_EXTENT_NUM, PD_TYPE_SQLPG_EXTENT_NUM, 4 bytes
92731
DATA #2 : SQLPG_EXTENT_NUM, PD_TYPE_SQLPG_EXTENT_NUM, 4 bytes
86255
DATA #3 : SQLPG_EXTENT_NUM, PD_TYPE_SQLPG_EXTENT_NUM, 4 bytes
92735
DATA #4 : unsigned integer, 4 bytes
318
The above message tells the last archived log file on Primary is log 86255. Therefore Db2 is not reusing
log files on Standby after 86256.

Depending on your disk capacity, accumulating log files may lead to disk full on Standby.

In case disk was full on Standby, log receiving may be blocked on Standby:

EDUID : 12345 EDUNAME: db2logalloc.0 (SAMPLE) 0
FUNCTION: DB2 UDB, data protection services, sqpLogAllocEdu::sqlpgMaintainFilesForHdrSecondary, probe:10182
MESSAGE : ADM12508W Log receiving has been suspended on the HADR standby
database because of a disk full condition. If the primary and standby
databases are in peer state and in SYNC, NEARSYNC, or ASYNC HADR
synchronization mode, transactions on the primary might be blocked.

 

This may in turn causes writing on Primary to stall and therefore appears to be hanging from application perspective.

 

To resoles the problem, you may temporarily move inactive log files on Standby to  work around disk full condition.

You also need to investigate why log archiving is failing on Primary and take measures accordingly.

 

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm13285687