This section explains the sample script for simplifying the automation of the standby operation.
Figure F.10 Explanatory Automation Procedure of Standby Operation According to Sample Script
In the operation side, the NAS volume is backed up by executing the acnas backup command.
Waiting for the physical copy completion of the NAS volume backup is performed by executing the acopc query command.
An REC from the NAS backup volume in the operation side to the NAS backup volume in the standby side is performed by executing the acec start command.
Waiting for the REC equivalency by executing the acec query command.
The REC is suspended REC is performed by executing the acec suspend command.
In the standby side, the NAS volume is restored by executing the acnas restore command.
Waiting for the physical copy completion of the NAS volume restore is performed by executing the acopc query command with the -r option.
The REC is resumed REC by executing the acec resume command.
Information
The sample script checks whether an REC copy session exists when starting REC in step (3), and if no copy session exists, perform an initial copy. In order to shorten processing time, it is recommended that you execute the acnas backup command in advance to back up the NAS volume and after confirming that the physical copy is complete, start REC.
Note
Do not execute this script when the NAS backup volume in the standby side is mounted.
Sample Script Name / Stored Directory
The name and stored directory of the sample script are explained below:
Copy all files under the stored directory of the sample script to a different directory. In addition, after customizing the copied files according to the actual operation, use those files.
For Windows
Batch File Name | Stored Directory Name |
---|---|
nas_rec_backup2.bat | <Environment settings directory>\CCM\etc\sample\nasrec |
For Solaris/Linux
Script File Name | Stored Directory Name |
---|---|
nas_rec_backup2.sh | /etc/opt/FJSVccm/samp/nasrec |
How to Start
For Windows
nas_rec_backup2.bat NASCopyGroup RECCopyGroup NASRestoreCopyGroup
For Solaris/Linux
nas_rec_backup2.sh NASCopyGroup RECCopyGroup NASRestoreCopyGroup
Operands
Copy group name (for QuickOPC) of the NAS volume and the NAS backup volume in the operation side
Copy group name (for REC) of the NAS backup volume in the operation side and the NAS backup volume in the standby side
Copy group name (for QuickOPC) of the NAS backup volume and the NAS volume in the standby side
Exit Status
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
4 | Invalid copy mode |
5 | Invalid environment |
Example
Usage example of when executing this script in Solaris with a normal completion
> nas_rec_backup2.sh NAS_QuickOPC_NAS_Vol_0_1 RECGRP NASRestoreCopyGroup nas_rec_backup2 start backup from primary NAS volume to primary backup volume start backup from primary NAS volume to primary backup volume end rc=0 rec from primary backup volume to secondary backup volume start rec from primary backup volume to secondary backup volume end rc=0 suspend rec from primary backup volume to secondary backup volume start suspend rec from primary backup volume to secondary backup volume end rc=0 restore from secondary backup volume to secondary NAS volume start restore from secondary backup volume to secondary NAS volume end rc=0 resume rec from primary backup volume to secondary backup volume start resume rec from primary backup volume to secondary backup volume end rc=0 nas_rec_backup end rc=0 >
Usage example of when executing this script in Solaris with an abnormal completion
> nas_rec_backup2.sh NAS_QuickOPC_NAS_Vol_0_1 RECGRP NASRestoreCopyGroup nas_rec_backup2 start backup from NAS volume to primary backup volume start ccmxxxxx(Some error occurred in AdvancedCopy Manager CCM, and its message was output) backup from NAS volume to primary backup volume end rc=2 nas_rec_backup end rc=2 >