:-? Inconsistencies in Tape pool and Copy pool

happy

ADSM.ORG Member
Joined
Jun 28, 2005
Messages
7
Reaction score
0
Points
0
I am looking to confirm that all data in the onsite tape pool has copied to the offsite copy tape pool.

The q occ does not give accurate results as files spread across 2 volumes shows up as 2 files.

I can manually for a " Query CONtent <Volume Name> copied=No " which works well but how would I script this. I don't fancy hardcoding each volume in a script.

Any suggestions???
 
You could script it from outside of TSM. A for loop would be able to run through all the TSM volumes without too much trouble.



Why not just run a "backup stgpool" and see if it has any data to copy? If there is none, then you have a complete copy.



-Aaron
 
what system are you running on your server? AIX?



Do you want to know specifics or just if you are up to date with your cross-site?



If offsite you can use the script below, if you want specifics.... HMMM depending on the number of tapes you have I would no be all that keen on running one.



if that is not a concern just...



grab all volumes into a variable, and do a for loop as Aaron haas suggested



for example



*****



PVOLS=`cat volfile`

for volume in $PVOLS

do

your commands on $volume

done



*************



Try the usual login jargon





#!/usr/bin/ksh



USER="username"

PASS="password"

tsmCMD=`dsmadmc -id=$USER -pa=$PASS`



then



LOCAL=`$tsmCMD "select sum(logical_mb) from occupancy where (stgpool_name in (select stgpool_name from stgpools where pooltype='PRIMARY'))"|tail +13 |head -n 1`



COPY=`$tsmCMD "select sum(logical_mb) from occupancy where (stgpool_name in (select stgpool_name from stgpools where pooltype='COPY'))"|tail +13 |head -n 1`



DIFF=`expr $LOCAL - $COPY`



echo "The Differnce between your primary and copy storage pools is $DIFF MB"
 
Okay will go a step further



You can either put this info into a script or run from the command line. I am assuming you have an input file with all of the volumes you want to query and it is called qvols.list

The command echo "$CHECKCOPY" > ${volumes}.list is creating a seperate file name volumename.list which contains the data not copied and can be excluded if you like...



You will end up with the following files in all likelyhood

notcopied.list

copied.list

**and an individual file for each entry that has offline files



YOU SHOULD NOT GET ANY FALL INTO THE ERROR CATEGORY!!



QVOLS=`cat qvols.list`



for volumes in $QVOLS

do

CHECKCOPY=`dsmadmc -id=you -pa=yourpass "q content $volumes copied=no"

RC=`echo $?`

if [[ $RC -eq "0" ]]

then

echo The volume $volumes has files that have not been copied offsite >> notcopied.list

echo "$CHECKCOPY" > ${volumes}.list

elif [[ $RC -eq "11" ]]

then

echo The volume $volumes has been copied crosssite >> copied.list

else

echo There has been a problem getting info on $volumes >> error.list

fi

done
 
Back
Top