1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This message will disappear after you have made at least 12 posts. Thank you for your cooperation.

Using Parallel in a Maintenance Script

Discussion in 'Scripting' started by bobrains, Aug 4, 2009.

  1. bobrains

    bobrains New Member

    Joined:
    Aug 4, 2009
    Messages:
    1
    Likes Received:
    0
    During the processing of my daily maintenance I am issuing the following commands:

    parallel
    backup stg diskpool1 copypool1 process=4 wait=yes
    backup stg diskpool2 copypool2 process=4 wait=yes

    /* this is copying data from my primary disk pools to my copy pools

    serial
    parallel
    backup stg tapepool1 copypool1 process=2 wait=yes
    backup stg tapepool2 copypool2 process=2 wait=yes

    /* this is catching anything that happened to overflow due to a triggered migration

    serial

    /* remaining maintenance commands are here


    My question is regarding the "serial" stuck in the middle. I need the disk to tape copies to complete before the tape to tape copies begin. My assumption is that the serial command is needed to delimit the first two backup commands from the next two. Am I correct in this thinking?

    Thanks much,
    Bob
     
  2.  
  3. toxy13

    toxy13 Senior Member

    Joined:
    Sep 24, 2003
    Messages:
    739
    Likes Received:
    12
    Occupation:
    Administrator
    Location:
    Leipzig
    You don't need the serial!
     
  4. Eldoraan

    Eldoraan Senior Member

    Joined:
    Feb 19, 2003
    Messages:
    288
    Likes Received:
    10
    Occupation:
    Data Protection
    Location:
    Charlotte, NC
    You will need the first serial you have specified if you want to track the return code from the first 2 backup stg commands run in parallel. I believe Toxy13 is saying if you don't care about the return code from the first 2 parallel commands, you can just issue another parallel and the 2nd set of backup stg commands. Personally, I always put the serial in just to better indicate to others that the prior set is supposed to complete successfully before next set of parallel commands.
     
  5. BBB

    BBB Moderator

    Joined:
    Feb 13, 2007
    Messages:
    2,075
    Likes Received:
    19
    Location:
    Brisbane, Australia
    Serial causes it to wait for all the parallels you started just beforehand.

    I wasn't aware that a parallel would also cause it to wait for the processes before to finish - I am not sure if that is true or not to be honest, maybe toxy misunderstood. But I haven't tested it so I guess its possible.

    As Eldoraan said, better to leave it in as its more "self documenting" and makes it easier for people to understand.
     

Share This Page