IBM Support

Understanding ARCHLOGDIR and ARCHFAILOVERLOGDIR parameters in dsmserv.opt

Question & Answer


Question

How do the ARCHLOGDIR and ARCHFAILOVERLOGDIR parameters in the dsmserv.opt file relate to the DB2 values for archive log paths?

Answer

Information about in-flight database transactions are recorded in the active logs. When all of the transactions stored on an active log have completed, the active log is then moved (archived) to the archive log directory. The data stored in the archive logs is used during recovery scenarios to replay transactions that took place since the last database backup. This is why performing full database backups will remove the archive logs - because the archive log data is no longer needed.

In the event that the archive log directory fills to capacity, DB2 will then attempt to archive the active logs to the archive log failover directory. If the failover directory is also full, or if no archive failover log directory is defined, then the active logs cannot be successfully archived and will begin to accumulate in the active log directory. If this situation is not rectified in a timely manner, the active log directory will also become full which would result in a server crash.

Over time, it may become necessary to update the archive log location to a new path, for example, in the event that a new filesystem with greater space is added. The typical process is that the Tivoli Storage Manager server is halted, and then the dsmserv.opt file values for ARCHLOGDirectory and ARCHFAILOVERLOGDIR can be updated to the new paths. If a database backup was taken before this operation, then it is not essential to copy the existing archive log or archive failover log directory structures to the new filesystem. The directory structure will be automatically generated in the new empty filesystem the next time the Tivoli Storage Manager server is started.

When the server starts up, it reads the dsmserv.opt file for the ARCHLOGDirectory and ARCHFAILOVERLOGDIR values. Database parameters for the instance are then updated to reflect the new locations. These values can be checked from within Tivoli Storage Manager using the administrative command line prompt with the 'query log f=d' command.

In the event that the existing archive log or archive failover log information is moved to a new filesystem, it is possible to update DB2 directly to reflect the location change using the procedure below. This procedure may also be useful in the event that there is a mismatch between the values in dsmserv.opt and the actual directory structure on the disk resulting from server restore attempts, or accidental filesystem manipulation by system administrators.


1) Halt the server after performing a full database backup, devconfig and volhistory backup

2) Login (or su) to your instance user account and check the existing log locations:

Example:


    su - tsminst1
    tsm@m:~/instance> db2 get db cfg for tsmdb1

Note these 3 variable / locations from the output:

Overflow log path (OVERFLOWLOGPATH) = /tsm/tsm_archivelog/RstDbLog/NODE0000/
First log archive method (LOGARCHMETH1) = DISK:/tsm/tsm_archivelog/archmeth1/
Failover log archive path (FAILARCHPATH) = /tsm/tsm_archivelog/failarch/


3) Unmount, move, or rename your existing archive log location to the path you would like to use. Make sure the new location is readable/writable by your DB2 instance user.

Example:
    tsm@m:~> mkdir /tsm/new_archivelog
    tsm@m:~> cp -R /tsm/tsm_archivelog/* /tsm/new_archivelog/
    tsm@m:~> chown -R tsm /tsm/new_archivelog
    tsm@m:~> chmod -R 750 /tsm/new_archivelog

4) Verify your new archive log directory contents using the find command.

Example:
    tsm@m:~/new_archivelog> find .
    .
    ./RstDbLog
    ./RstDbLog/NODE0000
    ./RstDbLog/NODE0000/SQLLPATH.TAG
    ./failarch
    ./failarch/tsm
    ./failarch/tsm/TSMDB1
    ./failarch/tsm/TSMDB1/NODE0000
    ./failarch/tsm/TSMDB1/NODE0000/C0000000
    ./archmeth1
    ./archmeth1/tsm
    ./archmeth1/tsm/TSMDB1
    ./archmeth1/tsm/TSMDB1/NODE0000
    ./archmeth1/tsm/TSMDB1/NODE0000/C0000000
    ./archmeth1/tsm/TSMDB1/NODE0000/C0000000/S0000427.LOG
    ./archmeth1/tsm/TSMDB1/NODE0000/C0000000/S0000429.LOG
    ./archmeth1/tsm/TSMDB1/NODE0000/C0000000/S0000428.LOG

5) Update DB2 to use the new path structure for these 3 variables:

OVERFLOWLOGPATH
LOGARCHMETH1
FAILARCHPATH

Example for setting the overflow archive log path:
    tsm@m:~/new_archivelog> db2 update db cfg for tsmdb1 using OVERFLOWLOGPATH /tsm/new_archivelog/RstDbLog/NODE0000/
    DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.

Example for setting the primary archive log path (note you must preface the path with 'DISK:' for this variable):

    tsm@m:~/new_archivelog> db2 update db cfg for tsmdb1 using LOGARCHMETH1 DISK:/tsm/new_archivelog/archmeth1/
    DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.

Example for setting the fail-over archive log path:
    tsm@m:~/new_archivelog> db2 update db cfg for tsmdb1 using FAILARCHPATH /tsm/new_archivelog/failarch/
    DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.

6) Verify the archive log path has been set to your new destination using 'db2 get db cfg for tsmb1'

Example:
    tsm@m:~/instance> db2 get db cfg for tsmdb1

Note these the 3 variable / locations have changed as a result of the steps above:

Overflow log path (OVERFLOWLOGPATH) = tsm/new_archivelog/RstDbLog/NODE0000/NODE0000/
First log archive method (LOGARCHMETH1) = DISK:/tsm/new_archivelog/archmeth1/
Failover log archive path (FAILARCHPATH) = /tsm/new_archivelog/failarch/

7) Edit your 'dsmserv.opt' and update the archive log path entry using a line similar to the following:
    ARCHLOGDirectory /tsm/new_archivelog
8) Start your Tivoli Storage Manager V6 Server.

Example:
    /opt/tivoli/tsm/server/bin/dsmserv -u tsm -i /tsm/instance

9) Run the 'q log f=d' command to view the archive log location path.

Example:
    ANR2017I Administrator SERVER_CONSOLE issued command: QUERY LOG f=d
    Total Space(MB): 16,384
    Used Space(MB): 3
    Free Space(MB): 16,301
    Active Log Directory: /tsm/tsm_activelog
    Archive Log Directory: /tsm/new_archivelog
    Mirror Log Directory:
    Archive Failover Log Directory:

[{"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":"6.3;7.1","Edition":"All Editions","Line of Business":{"code":"LOB26","label":"Storage"}}]

Product Synonym

tsm spectrum protect

Document Information

Modified date:
18 June 2018

UID

swg21441744