TSM Server Rebalance and Reduce DB2 Table Space

From UNIX Systems Administration
Revision as of 14:08, 12 January 2016 by Michael Kohler (talk | contribs)
Jump to navigation Jump to search

Rebalance and Reduce DB2 Tablespace

  1. Add new LUN to the TSM server
# cfgmgr -v
# extendvg tsmdbvg <hdisk#>
# mklv -y'<lv_name>' -t'jfs2' -u'1' <tsm_db_vg_name> 298 <hdisk#>
# crfs -v jfs2 -d'<lv_name>' -m'<mount_point> -a logname='INLINE' -a logsize='512'
  1. Enter into TSM, and disable client sessions.
DISAble SESSions CLIent
  1. Note current administrative schedules.
Query SCHedule Type=Administrative
  1. Update the start times of all administrative schedules, so their start time is after the procedure completes.
UPDate SCHedule <schedule_name> Type=Administrative STARTTime=19:00:00
  1. Make note of all running processes and connected sessions.
Query Session
Query PRocess
  1. Make note of all current sequential storage pool reclamation thresholds
Query STGpool <pool_name> F=D
  1. Prevent any space reclamations from running on sequential access storage pools.
UPDate STGpool <pool_name> REClaim=100
UPDate STGPool BACKUPTAPE REClaim=100
  1. Cancel all running processes and sessions.
CANcel Session <session #>
CANcel Process <process #>
  1. Expand the TSM Database.
EXTend DBSpace </absolute/path/to/new/directory>
  1. Take a full Database backup. Wait for this process to complete before continuing.
Backup DB DEVclass=<device_class_name> Type=Full Wait=No
  1. Record the volume used for the full database backup.
Query VOLHistory Type=DBBackup
  1. Connect to db2 as the tsminst1 user.
db2 connect to tsmdb1
db2 set schema tsmdb1
  1. Run these commands in sequence, waiting for each rebalance to complete before starting the next rebalance.
db2 alter tablespace SYSCATSPACE rebalance
db2 alter tablespace USERSPACE1 rebalance
db2 alter tablespace IDXSPACE1 rebalance
db2 alter tablespace LARGESPACE1 rebalance
db2 alter tablespace LARGEIDXSPACE1 rebalance
db2 alter tablespace REPLTBLSPACE1 rebalance
db2 alter tablespace REPLIDXSPACE1 rebalance
db2 alter tablespace SYSTOOLSPACE rebalance
  1. To monitor the process TSM v6.
db2 "select * from SYSIBMADM.TBSP_UTILIZATION " | grep -i progress
  1. When the rebalance is complete, reduce the space on the tables, wait for each reduce to complete before starting the next reduce.
db2 alter tablespace SYSCATSPACE reduce
db2 alter tablespace USERSPACE1 reduce
db2 alter tablespace IDXSPACE1 reduce
db2 alter tablespace LARGESPACE1 reduce
db2 alter tablespace LARGEIDXSPACE1 reduce
db2 alter tablespace REPLTBLSPACE1 reduce
db2 alter tablespace REPLIDXSPACE1 reduce
db2 alter tablespace SYSTOOLSPACE reduce
  1. When the rebalance and reduce are complete, update the start times of all modified administrative schedules to their original times.
UPDate SCHedule <schedule_name> Type=Administrative STARTTime=<HH:MM:SS>

Further Reading

  1. Steps to rebalance Database tablespaces