TSM Server Rebalance and Reduce DB2 Table Space
Jump to navigation
Jump to search
Rebalance and Reduce DB2 Tablespace
- 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'
- Enter into TSM, and disable client sessions.
- DISAble SESSions CLIent
- Note current administrative schedules.
- Query SCHedule Type=Administrative
- 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
- Make note of all running processes and connected sessions.
- Query Session
- Query PRocess
- Make note of all current sequential storage pool reclamation thresholds
- Query STGpool <pool_name> F=D
- Prevent any space reclamations from running on sequential access storage pools.
- UPDate STGpool <pool_name> REClaim=100
- UPDate STGPool BACKUPTAPE REClaim=100
- Cancel all running processes and sessions.
- CANcel Session <session #>
- CANcel Process <process #>
- Expand the TSM Database.
- EXTend DBSpace </absolute/path/to/new/directory>
- Take a full Database backup. Wait for this process to complete before continuing.
- Backup DB DEVclass=<device_class_name> Type=Full Wait=No
- Record the volume used for the full database backup.
- Query VOLHistory Type=DBBackup
- Connect to db2 as the tsminst1 user.
- db2 connect to tsmdb1
- db2 set schema tsmdb1
- 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
- To monitor the process TSM v6.
- db2 "select * from SYSIBMADM.TBSP_UTILIZATION " | grep -i progress
- 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
- 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>