rb23
1 Copper

Failover script - RP 3.2

I have RP 3.2.SP2 using Clariion splitter.

We are migrating a script from version 2.4 (SP2) which was responsible for the failover for a AIX (HACMP) server.

Previously we had the script below:

GROUP=GROUP_TEST
DATE=`date +%Y%m%d%H%M`
HOSTNAME=`hostname`

SITE=`ssh userrpa@rpamgmt -i /.ssh/ssh_key get_group_state group=$GROUP | grep "Data Transfer" | awk '{ print $4 }'`
if [ $HOSTNAME = "server_bkp" ] && [ $SITE = "Primary" ] || [ $HOSTNAME = "server_prod" ] && [ $SITE = "Secondary" ]
then

ssh userrpa@rpamgmt -i /.ssh/ssh_key bookmark_image group=$GROUP bookmark=Image_$DATE
ssh userrpa@rpamgmt -i /.ssh/ssh_key enable_image_access group=$GROUP image=Image_$DATE
ssh userrpa@rpamgmt -i /.ssh/ssh_key pause_transfer group=$GROUP

if [ $HOSTNAME = "server_bkp" ]
then
ACTIVESITE=BKP
else
ACTIVESITE=MAIN
fi

ssh userrpa@rpamgmt -i /.ssh/ssh_key set_active_site group=$GROUP active_site=$ACTIVESITE
ssh userrpa@rpamgmt -i /.ssh/ssh_key start_transfer group=$GROUP

fi

---------

We migrated this script to the new commands for the version 3.2.SP2 as below.


GROUP=GROUP_TEST
DATE=`date +%Y%m%d%H%M`
HOSTNAME=`hostname`

ssh userrpa@rpamgmt -i /.ssh/ssh_key get_group_state group=$GRUPO | grep "Transfer source: Local Copy" > /dev/null
if [[ $? = 0 ]]
then
SITE="Primary"
COPY="'Remote Copy (GROUP_TEST)'"
else
SITE="Secondary"
COPY="'Local Copy (GROUP_TEST)'"
fi

if [ $HOSTNAME = "server_bkp" ] && [ $SITE = "Primary" ] || [ $HOSTNAME = "server_prod" ] && [ $SITE = "Secondary" ]
then

ssh userrpa@rpamgmt -i /.ssh/ssh_key bookmark_image group=$GROUP bookmark=Image_$DATE
ssh userrpa@rpamgmt -i /.ssh/ssh_key enable_image_access group=$GROUP copy=$COPY image=Image_$DATE
ssh userrpa@rpamgmt -i /.ssh/ssh_key pause_transfer group=$GROUP

ssh userrpa@rpamgmt -i /.ssh/ssh_key failover group=$GROUP copy=$COPY

fi

---------

and sometimes we got the error message.

Error: Cannot change the replication direction when logged access is not yet enabled for the specified image.

Adding a sleep of 30 seconds between the pause and failover it runs successfully but we would like to failover as soon as possible.

How can we be sure that the image is available to failover?

Thanks,


Labels (1)
0 Kudos
3 Replies
8 Krypton

Re: Failover script - RP 3.2

Use get_group_state group=<group_name> -xml

for the copy in the group that you are attempting access on check the

          <string name="storageAccess">LOGGED ACCESS</string>

if it has value of LOGGED ACCESSS  you are good to go.

-rick


0 Kudos
rb23
1 Copper

Re: Failover script - RP 3.2

Thanks for the prompt answer. It worked properly.

0 Kudos
Charles4
1 Copper

Re: Failover script - RP 3.2

Rick,

Is there documentation or examples of scripts of EMC, to integration of RecoverPoint with Oracle RAC and HACMP (AIX)?

Thanks,

Charles

0 Kudos