DB2 Rebalance not working after a successful EXTEND DBSPACE
After a EXTEND DBSPACE process completes, a DB2 rebalance process needs to be started. Sometimes it could hang/stop unexpectedly.
The "db2 list utilities show detail" or "db2pd -utilities" does not show any rebalance is running.
There is an internal DB2 registry called REBALANCER wrongly set to OFF.
Diagnosing the problem
When a rebalance DB2 process is started (manually redistributing/reclaiming data or automatically, following an "EXTEND DBS" process with "reclaim=yes"(*) option set), the DB2 commands:
(*)Note: the "reclaim=yes" options is available only since Server version V7
"db2 list utilities show detail"
can be used to monitor the DB2 rebalance status.
If no data is returned, it could mean the rebalance is not properly working.
For example, running :
$db2 list utilities show detail
it will show:
SQL1611W No data was returned by Database System Monitor.
while it should show :
Also, despite the following DB2 commands which run successfully :
ALTER TABLESPACE tablespace_name REBALANCE SUSPEND;
ALTER TABLESPACE tablespace_name REBALANCE RESUME;
still the rebalance is not started.
There is absolutely no error message logged in the db2diag.log file.
Resolving the problem
There is an internal DB2 registry which was improperly set to OFF. It's call "REBALANCER".
In order to display its value, use the DB2 command:
and in the output look for the "REBALANCER" variable value, for example:
The internal DB2 registries are there to be used ONLY by DB2 Support Analysts, in order to help in some critical situations and should not be used/changed casually.
This being an internal registry, it does not even log diagnostics in the db2diag.log as this is supposed to be used consciously by IBM DB2 Support Analysts.
In order to fix the problem, run the following steps:
- from a DB2 command prompt, using the DB2 instance owner, run:
db2 connect to TSMDB1
db2 set schema TSMDB1
- Restart DB2 by issuing :
db2stop / db2start
That will restart the rebalance process and should complete the DB2 tablespace rebalance.