We have a TSM 5.2.2.0 server running under mainframe Linux. We have a locally written Perl script that reads messages from a console mode administrative session and manages server operations. The server uses a 3494 tape library.
When we started out, part of the code in the script detected the end of a database snapshot and executed a 'move drmedia' for the output volume or volumes. The 'move drmedia' command also causes the volume or volumes to be ejected from the 3494. The 'move drmedia' sometimes failed because a volume was still dismounting when TSM tried to eject it. When we discovered this problem we added logic to wait for dismounts to finish. This code looks for ANR8468I messages reporting dismounts. Each time such a message occurs the script executes a 'query mount' command. When the query reports no tapes mounted the script proceeds with the 'move drmedia' command. The new code occasionally hangs up. The last time this happened we discovered the following sequence of messages in the activity log: 01/19/2005 07:20:32 ANR8468I 3590 volume 630257 dismounted from drive IBMTAPE3 (/dev/IBMtape3) in library TJULIB01. (PROCESS: 5222) 01/19/2005 07:20:32 ANR2017I Administrator AUTOMATION issued command: QUERY MOUNT 63* 01/19/2005 07:20:32 ANR8331I 3590 volume 630257 is mounted R/W in drive IBMTAPE3 (/dev/IBMtape3), status: DISMOUNTING. 01/19/2005 07:20:32 ANR8334I 1 matches found. The server reports that a tape is dismounted, and then responds to a 'query mount' command with a claim that the very same tape is still in the process of being dismounted. Does anyone know of a good work-around for this sloppy status reporting?