These links lead to sections in the text below.
Freeing up library slots
If your library becomes full, you may need to free up some slots. The trick is to eject older tapes from the library that you are not likely to use for a while, and keep the active tapes in the library. The 'MOVE MEDIA' command gives us the ability to have a combination automatic/manual library. We can 'move' tapes outside of the library to a nearby 'location', but the tapes are still considered as mountable. The distinction is whether they have the media state of 'MOUNABLEINLIB' or 'MOUNTABLENOTINLIB', and this tells TSM whether to ask the robot for to mount the volume or to issue a manual mount request. When processing an manual mount request, you must use the 'Checkin Libvol' command to update the library inventory and tell TSM that the tape is back in the robot (since that is ultimately how the tape gets mounted).
TSM will automatically toggle the volume's access mode from ReadOnly to ReadWrite and back again as it is moved in and out of the library. This is to allow any read operations to proceed (e.g.: restore) and cause a manual mount request, but write operations will not attempt to access the volume.
Re-generating a library definition
Sometimes, especially with TSM servers hosted on Windows, it is necessary to delete and redefine a tape libary. After you remove the tape paths, you have to delete the library itself to remove the TSM server library inventory. You do this with the 'delete library library_name' command. Once you re-define the library and paths, you need to re-generate the library inventory by running the following commands, which must be run in the sequence shown.
Checkin the scratch volumes
checkin libvol library_name search=yes checklabel=barcode status=scratch
Checkin the private volumes
checkin libvol library_name search=yes checklabel=barcode status=private
back to top
Checkin and Checkout
TSM needs to know where it's tapes are if they are stored in tape libraries and to keep it informed you use CHECKIN and CHECKOUT commands
A tape library has a small compartment usually called an IO station with a door. You place your new cartridges into the IO station then run a checkin command. The syntax of the command varies slightly depending on what type of library you have. The command for a SCSI library is
Checkin libv Library_name search=bulk checklabel=yes status=scr
This will read in all the tapes in the IO station, read the labels and define them to TSM as scratch. To check in a single named tape that contains required data, maybe something you are importing from a different system, try
Checkin libv Library_name Volume_name checklabel=yes
Both CHECKIN and CHECKOUT commands will issue a console message asking you to confirm you are ready. Reply to the message with 'REPLY nn' where nn is the message number.
However be aware that the robot will select the first tape from the IO station, it will not scan the IO station for your tape. I've had the Library Manager tell me the IO station was empty apart from a specific tape that I wanted, yet TSM kept selecting an incorrect tape on checkin. Eventually I tried a bulk checkin and then discovered there was four foreign tapes in the IO station.
If you have lots of tapes to input to TSM you can power your library down, open the main door, then just put the tapes directly into empty libary slots. You then power the library up and run an audit, then a bulk checkin to TSM like this
CHECKIN LIBV library_name SEARCH=YES CHECKL=B
If you have some unallocated tapes in your library, maybe because they were checked out with the REMOVE=NO parameter, and you want them checked in as scratch, use the following command - it compares the TSM database with the library database and will just check in tapes that TSM did not know about and set them to scratch status.
CHECKIN LIBVOL library_name STATUS=scratch SEARCH=YES CHECKL=B
Most of us have several TSM servers that share a physical library. This is done by partitioning the library into several logical libraries. Say you have two servers, TSM1 and TSM2 each with virtual libraries VLIB1 and VLIB2 In this case it is quite easy to transfer data between TSM servers. You run an Export, note the tape used (xyz123) then check it out VLIB1 like this
CHECKOUT LIBV VLIB1 xyx123 REMOVE=YES
This will place the tape into the IO station. You then log into the Library Manager (the control software for the tape library) and re-assign the tape from VLIB1 to VLIB2. Finally you check it back in with
CHECKIN LIBV VLIB2 tapeno xyz123 STAT=PRI CHECKL=YES
If you find the tape is rejected with an invalid label, try a bulk checkin.
If a volume has been removed from the library, but TSM has not been informed you can clear it from TSM with the command below. Checklabel=no and remove=no means that TSM will do no validation, it just removes it from the database.
Checkout libvolume Library_name Volume_name checklabel=no remove=no
back to top
Drive cleaning errors
It is neccessary to clean tape drives regularily to prevent tape read and write errors. With IBM libraries you have two options for managing this, Automatic Cleaning and Host Cleaning. These options are set using the library interface from the Drives, Cleaning Mode panel. Automatic Cleaning means the library will manage the cleaning while Host Cleaning means that TSM will manage the cleaning. If you configure Automatic Cleaning then decide to clean the drives using the TSM command CLEAN DRIVE, contention can happen, with an error like
ANR8300E I/O error on library LIBNAME (OP=00006C03, CC=314, KEY=05, ASC=3B, ASCQ=0E,SENSE=70.00.05.00.00.00.00. 0A.00.00.00.00.3B.0E.00.C0.00.04.,
Description=The source slot or drive was empty in an attempt to move a volume).
ANR8907E CLEAN DRIVE for drive LTO1 (/dev/rmt0) in library LIBNAME failed.
It is really your choice which option you chose, but if you decide to let the tape library manage cleaning then set the library Cleaning Mode to Automatic and don't checkin cleaning tapes to TSM. If you want TSM to manage drive cleaning then disable Automatic Cleaning on the tape library and checkin cleaning tapes to TSM so the server can find and use them for cleaning.
Virtual Tape Systems
The virtual tape section discusses some the the different virtual tape systems available. Basically there are two types, those that replace tape completely with disk, and those that front real tapes with a big disk cache. Most hardware implementations use post-process deduplication these days, which avoids storing duplicate data. However TSM supports software de-duplication and this is arguably a more effective option.
The advantages of using VTS with TSM, is that you get a lot of virtual tape drives, and can run a lot of processes in parallel. One of the other advantages of a VTS is that it allows you to fill up big tapes with small files. TSM does this for you anyway. If you need to recall data from physical tape to VTS cache, this can add a considerable overhead.
A VTS that still uses physical tapes has another quirk - the logical vs physical implementation. VTS emulates physical tape in that when a file is
expired, it still uses space on the virtual tape volume. A virtual volume must be re-written to reclaim scratched space. When virtual volumes become scratch they too occupy space on the physical tapes, which again must be re-written to reclaim the space.
back to top