IBM Support

Forcing the immediate use of added (extended) database locations

Question & Answer


Question

In situations where a Tivoli Storage Manager/IBM Spectrum Protect Server is updated to use an additional database location, it appears that the added location is barely used. Is it possible to make use of the added space immediately?

Cause

After a database location has been added to the Tivoli Storage Manager/IBM Spectrum Protect Server, it may not be fully utilized immediately. Certain events with Tivoli Storage Manager will trigger the added database space to become increasingly used over time. For example, table reorganization, or certain temporary database transactions such as long running select statements may begin to cause the added database space location to start to fill up.

Answer

The design of Tivoli Storage Manager/IBM Spectrum Protect Server in conjunction with DB2 allows additional database locations to be added using the 'extend dbspace' command.

If the new database space location was added to enhance performance of the database, by equally distributing the data over a large number of disks (or LUNS), then it may be beneficial to force the immediate distribution of the database across all of the available database locations instead of waiting for it to automatically occur over some days or weeks.

Here are the steps necessary to add a database location and force the Tivoli Storage Manager V6 server and underlying database to immediately use all database locations equally:

1) Perform a full database backup along with a backup of the volhistory and devconfig.

It is critical that a successful full database backup is taken because the rest of this procedure will be deleting the Tivoli Storage Manager/IBM Spectrum Protect database. The database backup will be used to recreate the database in the new filesystem arrangement.

Example:

backup db type=full devclass=LTO4
backup volhistory
backup devconfig


2) Record the location of your existing database directories by using the 'q dbspace' command:

tsm: SERVER>q dbspace

Location Total Space(MB) Used Space(MB) Free Space(MB)
------------------------------ --------------- --------------- ---------------
/tsm/tsm_db 100,761 26,683 74,014


3) Verify your database backup has completed successfully and then halt the Tivoli Storage Manage server

4) Stop DB2 using the 'db2stop' command while logged in to your UNIX machine as your Tivoli Storage Manager/IBM Spectrum Protect instance user:

server:/tsm/tsm_db # su - tsm

Either of the following are acceptable responses to the db2stop command:

tsm@server:~/tsm_db> db2stop
02/03/2010 17:25:11 0 0 SQL1032N No start database manager
command was issued.
SQL1032N No start database manager command was issued. SQLSTATE=57019


tsm@tsm:~> db2stop
04/29/2010 12:22:20 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.

5) Delete your existing Tivoli Storage Manager/IBM Spectrum Protect database location using the path you found via the 'q dbspace' command in step (2)

Example:

rm -rf /tsm/tsm_db/*



6) Create your database directories or mount points which will store your Tivoli Storage Manager/IBM Spectrum Protect database. These locations must be empty and not contain any existing files. Make sure the Tivoli Storage Manager/IBM Spectrum Protect instance user has permission to read and write to these database locations.

For example:

tsm@server:~/tsm/tsm_db> mkdir db1
tsm@server:~/tsm/tsm_db> mkdir db2

tsm@server:~/> mount /dev/sdb1 /tsm/tsm_db/db1
tsm@server:~/> mount /dev/sdc1 /tsm/tsm_db/db2

tsm@server:~/> chown -R tsm /tsm/tsm_db/db1
tsm@server:~/> chown -R tsm /tsm/tsm_db/db2

tsm@server:~/> chmod 600 /tsm/tsm_db/db1
tsm@server:~/> chmod 600 /tsm/tsm_db/db2


7) Create a file containing the location (path names) to the database directories you created in step (6)

In this example, a blank file was created called 'on.txt' which contains the path names to the database directories:

tsm@server:~/instance> cat on.txt
/tsm/tsm_db/db1
/tsm/tsm_db/db2

Verify that the contents of the text file match up with the actual directory names on the system:

tsm@server:~/instance> ls -ltra /tsm/tsm_db/
total 16
drwxr-xr-x 2 tsm tsm 4096 Feb 3 17:27 db1
drwxr-xr-x 2 tsm tsm 4096 Feb 3 17:27 db2
drwxr-xr-x 4 tsm tsm 4096 Feb 3 17:27 .
drwxr-xr-x 11 tsm tsm 4096 Feb 3 17:27 ..


8) Restore the Tivoli Storage Manager/IBM Spectrum Protect Server database using the newly created directory location text file (on.txt in this example). The amount of time the restore process will take is based on the size of the database. A large database may take a long time to complete a restore, for example, many hours.

Example of a successful restore attempt:

tsm@server:~/instance> /opt/tivoli/tsm/server/bin/dsmserv restore db on=on.txt
ANR7800I DSMSERV generated at 16:21:18 on Mar 13 2009.
Tivoli Storage Manager for Linux/x86_64
Version 6, Release 1, Level 0.0
Licensed Materials - Property of IBM
(C) Copyright IBM Corporation 1990, 2008.
All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corporation.
ANR7801I Subsystem process ID is 15746.
ANR0900I Processing options file /tsm/instance/dsmserv.opt.
ANR7814I Using instance directory /tsm/instance.
ANR4726I The ICC support module has been loaded.
ANR1636W The server machine GUID changed: old value (), new value
(a4.fd.41.0a.f4.ab.11.de.88.f0.00.50.56.94.4d.9e).
ANR8200I TCP/IP Version 4 driver ready for connection with clients on
port 1500.
ANR0152I Database manager successfully started.
ANR4636I Starting roll-forward database restore.
ANR4620I Database backup series 1 operation 0 device class FILE.
ANR8340I FILE volume /tsm/poolspace/file/65246568.DBV mounted.
ANR1363I Input volume /tsm/poolspace/file/65246568.DBV opened (sequence
number 1).
ANR1364I Input volume /tsm/poolspace/file/65246568.DBV closed.
ANR8340I FILE volume /tsm/poolspace/file/65246592.DBV mounted.
ANR1363I Input volume /tsm/poolspace/file/65246592.DBV opened (sequence
number 1).
ANR1364I Input volume /tsm/poolspace/file/65246592.DBV closed.
ANR4638I Restore of backup series 1 operation 0 in progress.
ANR0406I Session 1 started for node $$_TSMDBMGR_$$ (DB2/LINUXX8664)
(Tcp/Ip localhost(40831)).
ANR8340I FILE volume /tsm/poolspace/file/65246568.DBV mounted.
ANR1363I Input volume /tsm/poolspace/file/65246568.DBV opened (sequence
number 1).
ANR1365I Volume /tsm/poolspace/file/65246568.DBV closed (end reached).
ANR1364I Input volume /tsm/poolspace/file/65246568.DBV closed.
ANR0403I Session 1 ended for node $$_TSMDBMGR_$$ (DB2/LINUXX8664).
ANR0406I Session 2 started for node $$_TSMDBMGR_$$ (DB2/LINUXX8664)
(Tcp/Ip localhost(40832)).
ANR8340I FILE volume /tsm/poolspace/file/65246592.DBV mounted.
ANR1363I Input volume /tsm/poolspace/file/65246592.DBV opened (sequence
number 1).
ANR1365I Volume /tsm/poolspace/file/65246592.DBV closed (end reached).
ANR1364I Input volume /tsm/poolspace/file/65246592.DBV closed.
ANR0403I Session 2 ended for node $$_TSMDBMGR_$$ (DB2/LINUXX8664).
ANR0406I Session 3 started for node $$_TSMDBMGR_$$ (DB2/LINUXX8664)
(Tcp/Ip localhost(40833)).
ANR0403I Session 3 ended for node $$_TSMDBMGR_$$ (DB2/LINUXX8664).
ANR4637I Roll-forward database restore complete.


9) Verify the contents of the database locations to make sure they are being utilized as expected.

The exact file structure may vary from system to system so there may be fewer or more files than the example below, but the directories should not be empty:

tsm@server:~/tsm/tsm_db> find .
.
./db2
./db2/tsm
./db2/tsm/.SQLCRT.FLG
./db2/tsm/NODE0000
./db2/tsm/NODE0000/TSMDB1
./db2/tsm/NODE0000/TSMDB1/T0000006
./db2/tsm/NODE0000/TSMDB1/T0000006/C0000000.LRG
./db2/tsm/NODE0000/TSMDB1/T0000006/.SQLCRT.FLG
./db2/tsm/NODE0000/TSMDB1/T0000001
./db2/tsm/NODE0000/TSMDB1/T0000001/C0000000.TMP
./db2/tsm/NODE0000/TSMDB1/T0000001/C0000000.TMP/SQLTAG.NAM
./db2/tsm/NODE0000/TSMDB1/T0000001/.SQLCRT.FLG
...
./db1
./db1/tsm
./db1/tsm/.SQLCRT.FLG
./db1/tsm/NODE0000
./db1/tsm/NODE0000/TSMDB1
./db1/tsm/NODE0000/TSMDB1/T0000006
./db1/tsm/NODE0000/TSMDB1/T0000006/C0000001.LRG
./db1/tsm/NODE0000/TSMDB1/T0000006/.SQLCRT.FLG
...


10) Start the Tivoli Storage Manager/IBM Spectrum Protect Serverr and check that the database locations are utilized equally using the 'q dbspace' command:

tsm: server>q dbspace
Location Total Size of File System(MB) Space Used on File System (MB) Free Space Available (MB)
------------------------------ ------------------------------ ------------------------------ ------------------------------
/tsm/tsm_db/db2 25,198.31 11,071.93 7,031.19
/tsm/tsm_db/db1 25,198.31 11,071.93 7,031.19

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Supported Versions","Edition":"Edition Independent","Line of Business":{"code":"LOB26","label":"Storage"}}]

Product Synonym

TSM

Document Information

Modified date:
17 June 2018

UID

swg21635994