• No results found

Create subdirectories in log volume ....

========================================================================

mkdir: cannot create directory `/hana/log/ANA/mnt00001/hdb00001': File exists mkdir: cannot create directory `/hana/log/ANA/mnt00001/hdb00002': File exists mkdir: cannot create directory `/hana/log/ANA/mnt00001/hdb00003': File exists mkdir: cannot create directory `/hana/log/ANA/mnt00001/hdb00004': File exists mkdir: cannot create directory `/hana/log/ANA/mnt00002/hdb00005': File exists mkdir: cannot create directory `/hana/log/ANA/mnt00003/hdb00006': File exists

========================================================================

Run post commands hdbnsutil useSnapshot , convertTopology....

========================================================================

checking for inactive nameserver ...

nameserver cishanar08:34201 not responding.

opening persistence ...

run as transaction master done.

checking for inactive nameserver ...

nameserver cishanar08:34201 not responding.

opening persistence ...

run as transaction master

converting topology from cloned instance...

- keeping instance 42 - keeping host cishanar08 - keeping host cishanar09 - keeping host cishanar10 - keeping host cishanar11 done.

cishanar08:/opt/NetApp/HANA-DR-Scripts>

7.9 Start HANA

The HANA system can now be started at the DR site.

cishanar08:/usr/sap/ANA/HDB42> sapcontrol -nr 42 -function GetSystemInstanceList 18.09.2013 13:20:09

GetSystemInstanceList OK

hostname, instanceNr, httpPort, httpsPort, startPriority, features, dispstatus cishanar11, 42, 54213, 0, 0.3, HDB, GRAY

cishanar10, 42, 54213, 0, 0.3, HDB, GRAY cishanar08, 42, 54213, 0, 0.3, HDB, GRAY cishanar09, 42, 54213, 0, 0.3, HDB, GRAY cishanar08:/usr/sap/ANA/HDB42>

43 SAP HANA Disaster Recovery using Snap Creator and SnapMirror

cishanar08:/usr/sap/ANA/HDB42> sapcontrol -nr 42 -function StartSystem HDB 18.09.2013 13:20:23

StartSystem OK

cishanar08:/usr/sap/ANA/HDB42> sapcontrol -nr 42 -function GetSystemInstanceList 18.09.2013 13:22:01

GetSystemInstanceList OK

hostname, instanceNr, httpPort, httpsPort, startPriority, features, dispstatus cishanar10, 42, 54213, 0, 0.3, HDB, GREEN

cishanar11, 42, 54213, 0, 0.3, HDB, GREEN cishanar08, 42, 54213, 0, 0.3, HDB, GREEN cishanar09, 42, 54213, 0, 0.3, HDB, GREEN cishanar08:/usr/sap/ANA/HDB42>

44 SAP HANA Disaster Recovery using Snap Creator and SnapMirror

Appendix

Script call-get-log-dirs

#!/bin/bash

# HANA_NODE and HANA_SID is set by Snap Creator as environment variables echo "Calling get-log-dirs.sh on HANA node: $HANA_NODE for SID: $HANA_SID."

ssh $HANA_NODE /opt/NetApp/HANA-DR-Scripts/get-log-dirs.sh $HANA_SID

Script get-log-dirs

echo "usage: ./get-log-dirs.sh <SID>"

exit fi

echo "========================================================================"

echo " Get a list of subdirectories in the log volumes ...."

echo "========================================================================"

ls -R /hana/log/$SID|grep mnt000 |grep hdb00 | awk -F ":" '{print $1}' >

/hana/shared/$SID/.logfile_dir.txt

echo "usage: snapmirror-initialize.sh <file_with_list_of_volumes>"

exit fi

echo "========================================================================"

echo " SnapMirror Initialize...."

echo "========================================================================"

DEST_FILER[index]=`echo $LINE | awk -F ":" '{print $3}'`

DEST_VOLUME[index]=`echo $LINE | awk -F ":" '{print $4}'`

((index=index+1))

echo "command: ssh ${DEST_FILER[$index]} snapmirror initialize -S

${FILER[$index]}:${VOLUME[$index]} ${DEST_FILER[$index]}:${DEST_VOLUME[$index]}"

ssh ${DEST_FILER[$index]} snapmirror initialize -S ${FILER[$index]}:${VOLUME[$index]}

${DEST_FILER[$index]}:${DEST_VOLUME[$index]}

((COUNT=COUNT-1)) done

45 SAP HANA Disaster Recovery using Snap Creator and SnapMirror

echo "usage: snapmirror-break.sh <file_with_list_of_volumes>"

exit fi

echo "========================================================================"

echo " SnapMirror Break: Make destination volumes writeable ...."

echo "========================================================================"

DEST_FILER[index]=`echo $LINE | awk -F ":" '{print $3}'`

DEST_VOLUME[index]=`echo $LINE | awk -F ":" '{print $4}'`

((index=index+1))

echo "command: ssh ${DEST_FILER[$index]} snapmirror break ${DEST_VOLUME[$index]}"

ssh ${DEST_FILER[$index]} snapmirror break ${DEST_VOLUME[$index]}

((COUNT=COUNT-1))

echo "usage: snaprestore-destination.sh <snap-name> <file_with_list_of_volumes>"

exit

echo "usage: snaprestore-destination.sh <snap-name> <file_with_list_of_volumes>"

exit fi

echo "========================================================================"

echo " SnapRestore destination volumes ...."

echo "========================================================================"

DEST_FILER[index]=`echo $LINE | awk -F ":" '{print $3}'`

DEST_VOLUME[index]=`echo $LINE | awk -F ":" '{print $4}'`

((index=index+1))

46 SAP HANA Disaster Recovery using Snap Creator and SnapMirror

echo "command: ssh ${DEST_FILER[$index]} snap restore -f -t vol -s $SNAP_NAME

${DEST_VOLUME[$index]}"

ssh ${DEST_FILER[$index]} snap restore -f -t vol -s $SNAP_NAME ${DEST_VOLUME[$index]}

((COUNT=COUNT-1))

echo "Create subdirectories in log volume ...."

echo "========================================================================"

cat /hana/shared/$SAPSYSTEMNAME/.logfile_dir.txt | grep -v backup | while read FILE do

mkdir $FILE done

echo "========================================================================"

echo " Run post commands hdbnsutil useSnapshot , convertTopology...."

echo "========================================================================"

hdbnsutil -useSnapshot hdbnsutil -convertTopology

NetApp provides no representations or warranties regarding the accuracy, reliability, or serviceability of any information or recommendations provided in this publication, or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS, and the use of this information or the implementation of any recommendations or techniques herein is a customer’s responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.

© 2014 NetApp, Inc. All rights reserved. No portions of this document may be reproduced without prior written consent of NetApp, Inc. Specifications are subject to change without notice. NetApp, the NetApp logo, Go further, faster, Snap Creator, SnapMirror, SnapRestore, and Snapshot are trademarks or registered trademarks of NetApp, Inc. in the United States and/or other countries.

Cisco and Cisco UCS are registered trademarks of Cisco Systems, Inc. SAP is a registered trademark of SAP AG. All other brands or products are trademarks or registered trademarks of their respective holders and should be treated as such. TR-4279-0314

Refer to the Interoperability Matrix Tool (IMT) on the NetApp Support site to validate that the exact product and feature versions described in this document are supported for your specific environment. The NetApp IMT defines the product components and versions that can be used to construct configurations that are supported by NetApp. Specific results depend on each customer's installation in accordance with published specifications.

Related documents