Chapter 5. The DMF Lock Manager

The dmlockmgr(8) process must be executing at all times for any DMF process to safely access and update a DMF database. The dmlockmgr process and its clients (such as dmatls, dmfdaemon (8), dmvoladm(8), and dmcatadm(8)) communicate through files, semaphores, and message queues. There are times when abnormal process terminations will result in non-orderly exit processing that will leave files and/or interprocess communication (IPC) resources allocated. As a DMF administrator, periodically you will want to look for these resources to remove them.


Note: HOME_DIR and SPOOL_DIR refer to the values of the HOME_DIR and SPOOL_DIR parameter, respectively, in the DMF configuration file. See Chapter 2, “Configuring DMF”.

The dmlockmgr files used by the database utilities are found in several different places. There are the following types of files:

dmlockmgr Communication and Log Files

The dmlockmgr communication and activity log files are all found in a directory formed by HOME_DIR /RDM_LM. The HOME_DIR/RDM_LM and HOME_DIR/RDM_LM/ftok_files directories contain the token files used to form the keys that are used to create and access the IPC resources necessary for the dmlockmgr to communicate with its clients, its standard output file, and the transaction file.

The dmlockmgr token files have the form shown in Table 5-1.

Table 5-1. dmlockmgr Token Files

File

 

Description

HOME_DIR/RDM_LM/dmlockmgr

Used by the dmlockmgr and its clients to access dmlockmgr's semaphore and input message queue

HOME_DIR/RDM_LM/ftok_files/ftnnnn

Preallocated token files that are not currently in use. As processes attempt to connect to dmlockmgr , these files will be used and renamed as described below. nnnn is a four digit number from 0000 through 0099.

HOME_DIR/RDM_LM/ftok_files/ftnnnn.xxxpid

The renamed version of the preallocated token files. nnnn is a four digit number from 0000 through 0099. xxx is a three-character process identifier with the following meaning:

  • atr = dmatread

  • ats = dmatsnf

  • cat = dmcatadm

  • ddb = dmdadm

  • dmd = dmfdaemon

  • dmv = dmmove

  • hde = dmhdelete

  • lfs = dmloadfs

  • lib = dmatls

  • sel = dmselect

  • vol = dmvoladm

 

pid is the numeric process ID of the process connected to dmlockmgr.

The IPC resources used by DMF are always released during normal process exit cleanup. If one of the dmlockmgr client processes dies without removing its message queue, dmlockmgr will remove that queue when it detects the death of the client. The token files themselves are periodically cleaned up by the dmlockmgr process.


Note: Normally, the dmlockmgr process is terminated as part of normal shutdown procedures. However if you wish to stop dmlockmgr manually, you must use the following command:
/usr/sbin/dmclripc -u dmlockmgr -z HOME_DIR/RDM_LM



This command will do all of the necessary IPC resource and token file maintenance.

If the dmlockmgr process aborts, all DMF processes must be stopped and restarted in order to relogin to a new dmlockmgr process. If the dmfdaemon or dmatls processes abort during a period when the dmlockmgr has died, when they restart they will attempt to restart the dmlockmgr. The new dmlockmgr process will detect existing DMF processes that were communicating with the now-dead copy of dmlockmgr, and it will send a termination message to those DMF processes.

The dmlockmgr maintains a log file that is named as follows, where yyyy, mm, and dd are the year, month, and day:

HOME_DIR/RDM_LM/dmlocklog.yyyymmdd

The log file is closed and a new one opened at the first log request of a new day. These files are not typically large files, but a new file will be created each day. These log files are removed via the run_remove_log.sh daemon task command. For more information about run_remove_log.sh, see “Configuring Daemon Maintenance Tasks” in Chapter 2.

dmlockmgr Individual Transaction Log Files

The individual transaction log files have the following form:

prefix.log

where prefix is the same format as the token file name described in Table 5-1 as ftnnnn.xxxpid. The prefix associates a log file directly with the token file of the same name.

Most of these log files will be created in the HOME_DIR under the daemon's and library servers' subdirectories. In almost all cases, the processes that create these log files will remove them when they exit. However, if a process terminates abnormally, its log file may not be removed. Transaction log files can sometimes become quite large, on the order of 10's of Mbytes. Most of these orphaned log files will be removed by the daemon as part of its normal operation.

Several DMF commands allow accessing copies of database files in places other than the HOME_DIR. If an orphaned log is encountered in a location other than in the HOME_DIR , it may be removed after it is clear that it is no longer in use. In order to verify that it is no longer in use, search the HOME_DIR/RDM_LM/ftok_files directory for a file with the same name as the prefix of the log file. If no such ftok_files file exists, it is safe to remove the log file.

The transaction activity file, HOME_DIR/RDM_LM/vista.taf , is the transaction log file that contains information about active transactions in the system. It is used to facilitate automatic database transaction processing.


Caution: Do not delete the HOME_DIR/RDM_LM/vista.taf file.