Re: Script Question
2001-06-04 19:00:04
Subject: RE: Script Question
This is a sequence dependent DR Admin script that checks every 6 minutes to
see if
the diskpool to tapepool migration has completed and then continues on.
Admin Tasks for Disaster Recovery.
Sequence dependent
rs6000:/scripts/admin_dr
#!/bin/ksh
dsmadmc -id=xxx-pass=xxx backup stg diskpool copypool maxpr=4 wait=yes >
/dev/null
dsmadmc -id=xxx -pass=xxx upd stg diskpool hi=0 lo=0 migpr=4 > /dev/null
/scripts/mig_rng #see script mig_rng below
dsmadmc -id=xxx -pass=xxx upd stg diskpool hi=90 lo=70 > /dev/null
dsmadmc -id=xx -pass=xxx backup stg tapepool copypool maxpr=2 wait=yes >
/dev/null
dsmadmc -id=xxx -pass=xxx backup db t=f devc=3590_class wait=yes > /dev/null
dsmadmc -id=xxx -pass=xxx move drmedia * wherestate=mountable
tostate=courier
remove=yes
dbbackup=yes wait=yes > /dev/null
dsmadmc -id=xxx -pass=xxx prepare wait=yes > /dev/null
rs6000:/scripts/ mig_rng
#!/usr/bin/perl
$done=0;
while ($done == 0) {
sleep 360; #wait 6 minutes
system (`dsmadmc -id=xxx -pass=xxx q pr > tmpfile`); #query process
system (`cat tmpfile | grep Migration > outfile`); # check for
Migration process
if (-z "outfile") { #if migration is not finished, wait
again
$done=1; #if migration is finished, exit the
loop
}
}
exit
Frank McClean
Frank_McClean AT calpers.ca DOT gov
|
|
|