Admin script - call scripts parallel

Lisatech

ADSM.ORG Member
Joined
Oct 7, 2008
Messages
52
Reaction score
0
Points
0
I have an admin scripts that runs daily and I would like to have the reclaim section call 2 different scripts: 1 for the reclaiming the onsite tape pool and one for the offsite tape pool. Within each script I will run reclaims in sequence so the reclaims runs for 90% free then runs for 80% free then for 70% down to 50%. I want to initiate 2 separate scripts so that if the copy pool has many tapes for 90% free and the tape pool only has tapes with 70% free, I don't want the tape pool to have to wait for the copy pool processes to catch up...

I have the commands set up but not sure how to get the controlling admin script to spawn each the script for the tape and copy pool.
 
You put the commands in the script to run the RECLAIM STG without a wait=yes so the shell script runs the command then moves on to the next script. I'm sure I could come up with something if I could review the master script and the secondary scripts.
 
Thanks for your reply...

Essentially I copied and modified the TSM Maintenance script - this is the reclaim area I want to replace:

PARALLEL
reclaim stgpool TAPEP4 threshold=50 wait=yes
reclaim stgpool COPYP4 threshold=50 wait=yes
SERIAL
--> This generally kicks off 2 reclaims for each pool which run until I turn them off daily around 11 pm so they don't interfere with overnight backups.

I want to replace the above with a 'call' of some sort to execute the following for each tape pool:
reclaim stgpool *tapepool* threshold=90 wait=yes
reclaim stgpool *tapepool* threshold=80 wait=yes
reclaim stgpool *tapepool* threshold=70 wait=yes
reclaim stgpool *tapepool* threshold=60 wait=yes
reclaim stgpool *tapepool* threshold=50 wait=yes

I am unsure of the syntax and whether the 'reclaim' in the separate script will still require the 'wait=yes' clause.

Aaaahh... - we are talking about Windows scripting, right? :)
 
Well I can't think of a way to make TSM go on to the next threshold when the command finishes with the current setting. Either way you will have either one pool done and waiting for the other pool to finish, or one pool finishes and the other is not and it tries to run the next series. Also I would definitely use a duration so I don't have to manually cancel the process before backups kick off for the night. If you have the ability to run UNIX shell scripts you could list the reclaimable volumes by pct_util in ascending order and run a move data command on them in a shell script. I've done that before and it works pretty well.
 
Maybe you can help me with one more part. I got the reclaims to run sequentially with a script like what I posted - now I would like to these 2 scripts called from my main maintenance script so that if/when the migration finishes these 2 scripts will start up on their own in parallel but the actual reclaims stmts would run serially for each tape pool...

Is there a way to call a script/macro from within an Admin script? Like you can use "CALL file.cmd" to call and execute another batch file from within an executing one.

Thanks!!
 
Sunhillow - Thanks it works perfectly! I created a script that calls my 2 separate scripts for the reclaims and they seem to be working properly - the onsite reclaim ran through the iterations for 90 to 50 before finding a volume to reclaim and the offsite had a number of volumes in the 90 threshold... and they are both started at the same time. :)
 
Sunhillow - just wondered if you had configured the script in your environment. I have been running it for over 2 weeks now and I have found my overall TSM daily performance has increased - more tapes are being returned more regularly. I run the reclaim daily with a script to stop the reclaims around midnight daily with a definite performance improvement.
 
Hi Lisatech,

I admit I did not change my scripts until today.
Up to now I had several parallel blocks running in sequence where I tried to put pools into a block with similar reclamation durations. Works quite good, but drive utilization ist a bit unbalanced.

Now I changed it to 3 scripts running parallel. One for VTL, one for Tape Primary and one for Tape Copy. Each script contains parallel sections, but with less calls than the old script.

Disadvantage of this method is that there is no wait=yes when calling another script. So this can only be done as the last stage of the mother-script.

I will report to you how it works.

One question: how do you stop your reclaim processes at a given time? With an external script? Or do you use something with
select process_num from processes where process = 'Space Reclamation'
where I would not know how to go on within the built-in script language
 
Last edited:
Hi there,

of course the calling script waits for the child script :)
The method proposed by Lisatech works really well. By tuning the amount of processes running parallel for each library the whole reclamation can be finished in shorter time than before in my environment.

I'm going to migrate this method to my two other TSM servers now
 
Hi all, I'm wondering if there is a way to start a windows VBS script from a TSM admin script. I think I see it eluded to in this thread but I'm not sure. For example: I'm at the TIP Command Line and I issue RUN REGISTERNODE. REGISTERNODE starts a windows VBS script. What I'm after is a way to automate with a VBS all the settings needed to register a node. Then the VBS issues the register command via dsmadmc. I guess. I'm sort of thinking as I go here. Other TSM related applications are possible too if I can get this to work.
 
Back
Top