Start a Conversation

Unsolved

This post is more than 5 years old

1264

December 28th, 2009 12:00

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,


117 Posts

December 28th, 2009 12:00

Use get_group_state group= -xml

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

          LOGGED ACCESS

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

-rick


2 Posts

December 29th, 2009 11:00

Thanks for the prompt answer. It worked properly.

3 Posts

January 20th, 2010 05:00

Rick,

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

Thanks,

Charles

No Events found!

Top