IBM Tivoli Storage Manager, Version 7.1

Running commands in parallel or serially

You have the options of running commands in a script serially, in parallel, or serially and in parallel by using the SERIAL or PARALLEL script commands in the COMMAND_LINE parameter of DEFINE and UPDATE SCRIPT. You can run multiple commands in parallel and wait for them to complete before proceeding to the next command.

About this task

Running commands serially in a script ensures that any preceding commands are complete before proceeding and ensures that any following commands are run serially. When a script starts, all commands are run serially until a PARALLEL command is encountered. Multiple commands running in parallel and accessing common resources, such as tape drives, can run serially.

Script return codes remain the same before and after a PARALLEL command is run. When a SERIAL command is encountered, the script return code is set to the maximum return code from any previous commands run in parallel.

When using server commands that support the WAIT parameter after a PARALLEL command, the behavior is as follows:

In most cases, you can use WAIT=YES on commands that are run in parallel.

The following example illustrates how the PARALLEL command is used to back up, migrate, and reclaim storage pools.

/*run multiple commands in parallel and wait for 
them to complete before proceeding*/
PARALLEL
/*back up four storage pools simultaneously*/
BACKUP STGPOOL PRIMPOOL1 COPYPOOL1 WAIT=YES
BACKUP STGPOOL PRIMPOOL2 COPYPOOL2 WAIT=YES
BACKUP STGPOOL PRIMPOOL3 COPYPOOL3 WAIT=YES
BACKUP STGPOOL PRIMPOOL4 COPYPOOL4 WAIT=YES
/*wait for all previous commands to finish*/
SERIAL
/*after the backups complete, migrate stgpools 
simultaneously*/
PARALLEL
MIGRATE STGPOOL PRIMPOOL1 DURATION=90 WAIT=YES
MIGRATE STGPOOL PRIMPOOL2 DURATION=90 WAIT=YES
MIGRATE STGPOOL PRIMPOOL3 DURATION=90 WAIT=YES
MIGRATE STGPOOL PRIMPOOL4 DURATION=90 WAIT=YES
/*wait for all previous commands to finish*/
SERIAL
/*after migration completes, relcaim storage 
pools simultaneously*/
PARALLEL
RECLAIM STGPOOL PRIMPOOL1 DURATION=120 WAIT=YES
RECLAIM STGPOOL PRIMPOOL2 DURATION=120 WAIT=YES
RECLAIM STGPOOL PRIMPOOL3 DURATION=120 WAIT=YES
RECLAIM STGPOOL PRIMPOOL4 DURATION=120 WAIT=YES


Feedback