Showing posts with label Checkout. Show all posts
Showing posts with label Checkout. Show all posts

Friday, June 12, 2009

TSM Checkout and ACSLS Question

At Infocrossing we have a tape operations group and they handle the physical opening of the cap and insert returned tapes and removing tapes for offsite. Because of this I didn't realize (until I had to handle the checkout myself) that TSM is checking out my tapes by filling the cap and pausing, waiting for the operations people to take the tapes out, then resuming the eject. OK, normal process except I have two 40 tape cap doors. When an eject has more than 40 tapes I figured that TSM would use the next cap door when I leave a specific cap identifier out of the checkout command, but it does not use the alternate cap. Both caps are set to a priority higher than zero so I find it frustrating TSM only uses one cap door. ACSLS itself allows you to use 0,0,* and it will checkout to all available caps above priority zero, but TSM does not accept the *. So what am I missing here? Is it possible with TSM to use both cap doors and not have the checkout pause for the one cap to be emptied? I didn't see anything suggesting REMOVE=BULK is any different from REMOVE=YES. I searched Google but didn't fine what I was looking for, and didn't find anything on ADSM.org so any ideas? Here's an example of my command:

CHECKOUT LIBVOLUME LIBRARY1 REMOVE=YES VOLLIST=FILE:/tsm/logs/chkout.list

Whether I specify a cap door or not it only uses one of the two.

Wednesday, April 22, 2009

ACSLS Checkout Script Update

I Modified the ACSLS checkout script due to an Admin with BYU pointing out it doesn't work when the library clients reside on seperate servers. It was changed due to how TSM processes the CMDFILE= option in my MOVE DRM macro, plus if your TSM server names vary the while loop is not as easy to setup. So here is the new script and macro. I switched it to use an array for the servernames for easier processing when names don't follow a similar convention. Also you might need to modify the grep if your volumes don't start with L0 thru 4. If your volser is a different range just modify the grep so it will work for you.

<---------------------MOVE DRM MACRO------------------------>

move drm * so=dbb wherestate=mo tostate=vault remove=no WAIT=YES
move drm * so=dbb wherestate=vaultr tostate=onsiter

<------------------------Cut Below-------------------------->

#!/bin/ksh

cd /usr/tivoli/tsm/client/ba/bin

ADSMID=`cat /usr/local/scripts/ADSMID`
ADSMPASS=`cat /usr/local/scripts/ADSMPASS`

OFFSITE=/usr/tivoli/tsm/client/ba/bin/OFFSITE/offsite.txt
DRVOLS=/usr/tivoli/tsm/client/ba/bin/OFFSITE/Vol_List
RETRIEVE=/usr/tivoli/tsm/client/ba/bin/OFFSITE/retrieve.txt

set -A SERV TSM-1 TSM-2 TSM-3 TSM-4

cp $OFFSITE "$OFFSITE.BAK"

mv /usr/tivoli/tsm/client/ba/bin/OFFSITE/Vol_List /usr/tivoli/tsm/client/ba/bin/OFFSITE/Vol_List.bak

printf "Use this list to determine tapes that are to go offsite report any discrepancies to the Recovery Services Team.\n\n" > $OFFSITE
printf " \n\n" >> $OFFSITE
printf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n" >> $OFFSITE
printf " The following tapes will checkout from the library\n\n" >> $OFFSITE
printf " and should be sent offsite\n\n" >> $OFFSITE
printf " Current as of: `date`\n\n" >> $OFFSITE
printf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n" >> $OFFSITE

printf "Use this list to determine tapes that are to come back onsite from Iron Mountain for reuse. Report any discrepancies to the Recovery Service Team.\n\n" > $RETRIEVE
printf " \n\n" >> $RETRIEVE
printf "********************************************************\n\n" >> $RETRIEVE
printf " Tapes to be brought back onsite from Iron Mountain\n" >> $RETRIEVE
printf " and placed back into TSM library for scratch.\n\n" >> $RETRIEVE
printf " Current as of: `date`\n\n" >> $RETRIEVE
printf "********************************************************\n\n" >> $RETRIEVE

i=0
while [ $i -lt 4 ]
do
dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=${SERV[$i]} -dataonly=yes "select volume_name from drmedia where state='MOUNTABLE' and volume_name not in (select volume_name from drives where volume_name is not NULL) " grep L[0-4] >> $DRVOLS

dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=${SERV[$i]} -dataonly=yes "select volume_name from drmedia where state='VAULTRETRIEVE' " grep L[0-4] >> $RETRIEVE

dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=${SERV[$i]} 'macro /usr/tivoli/tsm/client/ba/bin/move_drmedia.mac'

sleep 120

i=$(( $i + 1 ))
done

dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=
CHECKIN LIBVOL search=yes stat=private checklabel=barcode vollist=FILE:$DRVOLS

sleep 180

dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=
CHECKOUT LIBVOL checkl=no remove=bulk vollist=FILE:$DRVOLS

cat $DRVOLS sort >> $OFFSITE

mail -s "Daily Tape Rotation - Tapes to be sent to Iron Mountain" tape_rpt < $OFFSITE mail -s "Daily Tape Return" tape_rpt < $RETRIEVE