InfoScale™ 9.0 Storage and Availability Management for DB2 Databases - AIX, Linux
- Section I. Storage Foundation High Availability (SFHA) management solutions for DB2 databases
- Overview of Storage Foundation for Databases
- About Veritas File System
- Overview of Storage Foundation for Databases
- Section II. Deploying DB2 with InfoScale products
- Deployment options for DB2 in a Storage Foundation environment
- Deploying DB2 with Storage Foundation
- Deploying DB2 in an off-host configuration with Storage Foundation
- Deploying DB2 with High Availability
- Deployment options for DB2 in a Storage Foundation environment
- Section III. Configuring Storage Foundation for Database (SFDB) tools
- Configuring and managing the Storage Foundation for Databases repository database
- Configuring the Storage Foundation for Databases (SFDB) tools repository
- Configuring authentication for Storage Foundation for Databases (SFDB) tools
- Configuring and managing the Storage Foundation for Databases repository database
- Section IV. Improving DB2 database performance
- About database accelerators
- Improving database performance with Quick I/O
- About Quick I/O
- Improving DB2 database performance with Veritas Concurrent I/O
- Section V. Using point-in-time copies
- Understanding point-in-time copy methods
- Volume-level snapshots
- Storage Checkpoints
- Considerations for DB2 point-in-time copies
- Administering third-mirror break-off snapshots
- Administering Storage Checkpoints
- Database Storage Checkpoints for recovery
- Backing up and restoring with Netbackup in an SFHA environment
- Understanding point-in-time copy methods
- Section VI. Optimizing storage costs for DB2
- Section VII. Storage Foundation for Databases administrative reference
- Storage Foundation for Databases command reference
- Tuning for Storage Foundation for Databases
- Troubleshooting SFDB tools
Relocating inactive tablespaces or segments to tier two storage
It is general practice to use partitions in databases. Each partition maps to a unique tablespace. For example in a shopping goods database, the orders table can be portioned into orders of each quarter. Q1 orders can be organized into Q1_order_tbs tablespace, Q2 order can be organized into Q2_order_tbs.
As the quarters go by, the activity on older quarter data decreases. By relocating old quarter data into Tier-2, significant storage costs can be saved. The relocation of data can be done when the database is online.
For the following example use case, the steps illustrate how to relocate Q1 order data into Tier-2 in the beginning of Q3. The example steps assume that all the database data is in the /DBdata filesystem.
To prepare to relocate Q1 order data into Tier-2 storage for DB2
- Obtain a list of containers belonging to Q1_order_tbs.
$ db2inst1$ db2 list tablespaces
- Find the tablespace-id for the tablespace Q1_order_tbs.
$ db2inst1$ db2 list tablespace containers for <tablespace-id>
- Find the path names for the containers and store them in file Q1_order_files.txt.
#cat Q1_order_files.txt NODE0000/Q1_order_file1.f NODE0000/Q1_order_file2.f ... NODE0000/Q1_order_fileN.f
To relocate Q1 order data into Tier-2
- Prepare a policy XML file. For the example, the policy file name is Q1_order_policy.xml. Below is a sample policy.
This is policy is for unconditional relocation and hence there is no WHEN clause. There are multiple PATTERN statements as part of the SELECT clause. Each PATTERN selects a different file.
<?xml version="1.0"?> <!DOCTYPE PLACEMENT_POLICY SYSTEM "/opt/VRTSvxfs/etc/\ placement_policy.dtd"> <PLACEMENT_POLICY Version="5.0" Name="selected files"> <RULE Flags="data" Name="Key-Files-Rule"> <COMMENT> This rule deals with key important files. </COMMENT>
<SELECT Flags="Data"> <DIRECTORY Flags="nonrecursive" > NODE0000</DIRECTORY> <PATTERN> Q1_order_file1.f </PATTERN> <PATTERN> Q1_order_file2.f </PATTERN> <PATTERN> Q1_order_fileN.f </PATTERN> </SELECT>
<RELOCATE> <COMMENT> Note that there is no WHEN clause. </COMMENT> <TO> <DESTINATION> <CLASS> tier2 </CLASS> </DESTINATION> </TO> </RELOCATE>
</RULE> </PLACEMENT_POLICY>
- Validate the policy Q1_order_policy.xml.
# fsppadm validate /DBdata Q1_order_policy.xml
- Assign the policy.
# fsppadm assign /DBdata Q1_order_policy.xml
- Enforce the policy.
# fsppadm enforce /DBdata