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