I. ACSLS Display This utility utilizes the ACSLS display command which serves as a pass through for many acsls query commands such a q drive, q vol, q cap, etc. The great advantage is that wild cards are supported and the output can be filtered and sorted in a variety of different ways. Refer to the ACSLS Installation, Configuration, and Administration Guide, for 7.0 and higher, Display Command Reference. EDT uses an executable wrapper through which to pass the display commands: Syntax: acsls_display -d "display command" [-n] [-o] [-z] [-v] [-e] options: -v print debug info to standard output. -n strip all header info. -o show header every intermediate command. -z show raw xml return instead of formated return. -e show additional override syntax. Example: acsls_display -d "display volume 000*" vol_id acs lsm panel row column pool status media type 000658 0 0 2 1 2 299 home LTO-100G data 000659 0 0 0 1 0 299 home LTO-100G data 000660 0 0 1 33 1 200 home STK1R data 000662 0 0 2 1 1 299 home STK2P data 000663 0 0 0 0 4 299 home STK2P scratch 000665 0 0 0 1 1 299 home STK2P scratch 000666 0 0 2 2 1 299 home STK2P scratch 000780 0 0 1 34 2 175 home LTO-100G data 000782 0 0 0 0 1 175 home LTO-100G data 000783 0 0 0 1 4 175 home LTO-100G data 000799 0 0 1 32 2 200 home STK1R data II. Drive and Device Matching Use elm_match_device, to obtain a match between the ACSLS driveIDs and the corresponding device handles configured on your system. *NOTE: Make sure the communication path to ACSLS has been established as the utility queries ACSLS. *NOTE: Try to run the utility when there is little or no traffic on the drives. The utility does seek to access tape devices using the no rewind, no repos on close device extension, but caution always needs to be taken on a drive that is occupied and being held in a specific tape position, ready for next access. Syntax: elm_match_device -d driver [-f device#] [-g end device#] [-o num_opens] [-i timeout] [-n] [-Z] [-v] driver: all,tsm,atape,ibmtape,system device#: device file devno combine -f and -g to start at device# and end at 2nd device# -o num_opens: opens to perform on a device(default 1). -i timeout: in secs, device ready timeout (default 120 secs). -n: suppress headers. -Z: show all. Drive vendor and productID -v: verbose. Diag and Msgs printed to stderr. By default elm_match_device seeks to match all tape device handles configured on the host. EDT restricts itself to accessing the no rewind on close and no reposition on close device extension for each of the available major device nos. For example under OS AIX: elm_match_device -d all -Z device vendor product serial number drive match /dev/rmt0 IBM ULTRIUM-TD1 6811061457 0,0,0,0 /dev/mt0 error 19 /dev/mt1 STK 9840 331000022842 0,0,0,1 /dev/mt2 STK T9940A 456000003296 0,0,0,6 /dev/mt3 STK 9840 331000051873 0,0,0,4 /dev/mt4 STK T9940A 456000003723 0,0,0,5 Notice how the error is reported if contact with the drive can not be made. Through options, you can adjust drive parameters for open timeout and number of open attempts. You can restrict the search based on the type of driver under which a devices are configured, you can restrict to a range of device numbers or a specific device number, and you can combine the driver restriction with the range or specific device number search. III. Volume Labeling Utility Syntax: elm_label -d driveID -f device -n vol,vol,vol,... [-i timeout] [-X] [-w] [-v] driveID: media manager drive identifier example - 0,0,2,0 device: in form AIX /dev/rmt# or /dev/mt# Solaris /dev/rmt/#cb, /dev/rmt/#mt, /dev/rmt/#st HP-UX /dev/rmt/#m or /dev/rmt/tsmmt# Windows \\.\Tape# or \\.\mtx.y.z.n Tape# or mtx.y.z.n Linux /dev/tsmscsi/mt# or /dev/IBMtape# volname: 6 to 7 char barcode label Optional: -i timeout: in secs, device ready timeout (default 120). -v: verbose. Diag and Msgs printed to stderr. -X: extended label, VOL1,HDR1,HDR2,FM vs default VOL1,FM -w: force label overwrite, i.e. the internal label does not match the barcode. -E: print additional environmental override information. -P: print purpose of program. Purpose: The purpose of this program is to provide a tape label program outside of the elm program, which contains its own scratch volume label verification program. Like elm, this program will not label a volume that already contains a valid label. -NOTES- - If an error on the mount, dismount, or label verification occurs, elm_label will be able to judge whether or not to continue the labeling process. - Best way to view the action is to use the -v option, redirect stderr to a file, 2>>dbg.txt, and place a tail on the file. Examples: elm_label -d 0,0,0,1 -f /dev/mt1 -n ISV009 -i 60 -v 2>>diag.log [1]: ISV009 Mount...Success Label...Success Unload...Success Dismount...Success Place a tail on the diag log and see the details of the drive opening and confirming the label. IV. Drive Report Utility Syntax: elm_drvrpt -l libname [-P] libname: matching lib description entry in elm.conf Options: -P print purpose of program Purpose: The purpose of this program is to provide a utility to show drive status that is pertinent for EDT operation. EDT wants to know basic status and state, drive lockID and userID, and volume lock and userID if the drive is occupied. Normally, you would need to perform three operations, query drive status, query drive lock, query volume lock. The drive report produces output in as compact fashion as possible. The libname input matches the libname of a library description in the edt configuration file, elm.conf, and drive status information for these drives are obtained. By default status and state are shown. If a drive is locked, a secondary description line appears. If a drive is occupied, a third line appears showing volume in drive. Any drives that are occupied are listed ahead of unoccupied drives. Examples: elm_drvrpt -l LIB1 0,0,0,5 Status: available State: online 0,0,0,6 Status: available State: online elm_drvrpt -l LIB1 0,0,0,6 Status: in_use State: online Lock: 11891 UserID: abyss.LIB1.6478 Volume: 000662 0,0,0,5 Status: available State: online Future Work: - Show vol lock and owner(userID). V. Drive Clear Utility Syntax: elm_drive_clear -l libname [-d drive] [-f] [-P] libname: matching lib description entry in elm.conf By default, do a safe drive clear. options: -d drive: force clear single drive. -f: works with d option. Even if status empty, issue dismount. If drive can not be unloaded through the device, force dismount. Purpose: The purpose of this program is to provide a utility to clear a drive or drives, and to insure their proper ownership for use with EDT-ACSLS. By default, a safe drive clear is performed. This means that the utility will only look to clear drives listed in the libname library description, and that no longer have an active elm process in control of the drive. Furthermore, only the drives originally locked by this machine will be cleared. Optionally, you can name a drive to be cleared. No matter if the drive is actively in use by EDT or any other application on this or any other machine, the utility will attempt to unload, dismount, and remove any drive lock. With -f option, if drive can not be unloaded, force the dismount. By default, if drive status shows available, skip dismount. With "-f" option, issue dismount even if drive seen as empty. The only caveat is that the drive must be one of those listed in the library description in order for the utility to find the matching device handle. Note the device associated with the driveid can be faked. Unload would fail, but with -f option, drive clear will force the dismount. Final Note: Diagnostic output is controlled by the DIAG entry in the library description. Diagnostic classes and redirection are controlled by this entry. Examples: To run drive clear in the default safe mode: Example: elm_drive_clear -l LIB1 Run drive clear, targeting an occupied drive: Example: elm_drive_clear -l LIB1 -d 00126310 Future work: - Ability to see drive in keep drive locked state and not clear. - Ability to see if vol needs to be returned to scratch or is definitively marked as to not place in any scratch pool. Possibly contact TSM to see if vol is privately held volume. - Consult TSM as to what it believes is mounted and cross reference with EDT knowledge. VI. Insert/Insert Scratch Utility - If vol access control active, upon insert of private volumes back into library, the lockID and userID are reestablished for the correct TSM Server. - Upon insertion, place vols into scratch pool. - Pool based on lib description or command line option. - Place vols into specific pools based on media type. - Place vols into specific pools based on vol range. VII. Eject Vol Utility - Eject vols full cap door count at a time. - Detect if cap is full or in use (open). - Multiple cap use. If first cap full or in use, try alternate cap(s). - Be able to eject vols to cap(s) in same lsm as vol, ahead of caps in other lsms in order to minimize pass through. Allow choice of next closest cap. VIII. Vol Report Utility - Use elm_filter_vols to produce list of vols owned by TSM. - Obtain and show volume status, vol lockID, vol owner. - Optional if vol found assigned to scratch pool, remove it. Either obtain pool from lib desc or multiple pool command line override. - Optional if vol owned by other, reassert ownership and correct lockID. - Optional remove lockIDs. IX. Elm Filter Vols This utility provides a method of filtering TSM storage pools and volume history for volumes it is using. You can use the created list of volumes for information and to use with the elm_volrpt, acsls_setscratch, or acsls_eject utilities. - Syntax: elm_filter_vols -I id -P passwd [-S server] operation modes: -q [-d] [-p pool] [-a access] [-s status] [-F] [-A] or -o type [-F] [-A] -I id: tsm administrative id -P passwd: administrative password -S server: use for LAN free client to contact server -q : query all storage pools for all volumes -d : detailed format -p pool: restrict query to a specific storage pool -a access: restrict query to vols readwrite, readonly unavailable, offsite -s status: restrict query to vols full, filling, empty, offline, online, pending -o type: query vol history, type dbbackup, export, dbdump -F: filter output stripping out all but volume names. Volume names go to file vol_list.txt. -A: Append vol names to end of existing list. *NOTES* - This program opens a shell to the system and executes the tsm administrative command dsmadmc. If you observe the output of the program, you will see the form of the dsmadmc command. - The exception is under Windows, where the command wzrdhlpr.exe is executed, usually found in Program Files\tivoli\tsm\console. This program is finicky about how it is called and needs the support of several other files from the console directory. You are best served to copy the the files wzrdhlpr.exe, dscameng.txt, and DSM.OPT in the console directory into the EDT-ACSLS bin directory where the elm_filter_vols resides. - Example: You wish to insure that volumes used in TSM are owned by your client and do not exist in the scratch tape pool. You could set up the following script to be called from TSM as a scheduled macro command: Report ownership, correct ownership, ensure no vols in scratch pool: #! /bin/ksh # EDTB=/usr/lpp/GESedt-acsls/bin EDTU=/usr/lpp/GESedt-acsls/util # Create list of all volumes assigned to storage pools, $EDTB/elm_filter_vols -I admin -P admin -q -F sleep 1 # Scan volume history for all volumes of type dbbackup, append volume # names to list in file. $EDTB/elm_filter_vols -o dbbackup -F -A sleep 1 # Do the same for any dbdump and export volumes $EDTB/elm_filter_vols -o dbdump -F -A sleep 1 $EDTB/elm_filter_vols -o export -F -A sleep 2 # Proceed with scratch pool cleanse $EDTU/acsls_setscratch -f vol_list.txt -p 100 -c 2>&1 1>/dev/null $EDTU/acsls_setscratch -f vol_list.txt -p 200 -c 2>&1 1>/dev/null rm -f vol_list.txt return 0 # end of script If you wish to only check newly created volumes: #! /bin/ksh # EDTB=/usr/lpp/GESedt-acsls/bin EDTU=/usr/lpp/GESedt-acsls/util # Create list of all volumes assigned to storage pools, # create temporary file, base name vollist, and redirect list to file. $EDTB/elm_filter_vols -q -F sleep 1 # Scan volume history for all volumes of type dbbackup, append volume # names to list in file. $EDTB/elm_filter_vols -o dbbackup -F -A sleep 1 # Do the same for any dbdump and export volumes $EDTB/elm_filter_vols -o dbdump -F -A sleep 1 $EDTB/elm_filter_vols -o export -F -A sleep 2 if [ -a vol_list_save.txt ] ; then diff vol_list.txt vol_list_save.txt > vol_list_diff.txt else cp vol_list.txt vol_list_diff.txt fi # Proceed with scratch pool cleanse $EDTU/acsls_setscratch -f vol_list_diff.txt -p 100 -c 2>&1 1>/dev/null $EDTU/acsls_setscratch -f vol_list_diff.txt -p 200 -c 2>&1 1>/dev/null mv vol_list.txt vol_list_save.txt rm -f vol_list.txt rm -f vol_list_diff.txt return 0 # end of script