The execution steps of the protected group is frozen and unfrozen database to synchronized data in eReplication, to execute protected group normally, you can customize the execution prepared steps before frozen or unfrozen. For example, checking the database status.
Prerequisites
- At least one protected group has been created in the system.
- The protected group's status is Normal.
Context
- When the protected group is LUN, you can modify the execution step in a protected group.
- When the clone (SAN) DR technology is used, you can modify the execution step in a protected group.
Procedure
- On the menu bar, choose Protection > LUN.
- In the function pane, select the recovery plan to be modified and click Procedure.
- Click Edit.
The Edit dialog box is displayed.
- Select script name.
A self-defined script is not provided by eReplication, so the script provider must ensure the script correctness. Before configuring the script, ensure that the script has been verified by tests.
- Log in to the DR management server at the DR site or to the service host, place the self-defined execution script in a specified path.
- In Windows, the script path is %OceanStor BCManager Agent install path%\bin\thirdparty\sample and the script sample name is sample.bat.
- In Linux/UNIX, the script path is /home/rdadmin/Agent/sbin/thirdparty/sample and the script sample name is sample.sh.
- Place the custom execution script under the specified path of the host where the protected object resides.
- In Windows: the path is %OceanStor BCManager Agent install path%\bin\thirdparty\.
- In Linux/UNIX: /home/rdadmin/Agent/sbin/thirdparty/
- Set the owner and execute permission of the self-defined execution script.
- In Windows, settings are not required.
- Run the chown root xxx.sh command to set the owner of the script to root. Run the chmod 500 xxx.sh command to set the execute permission on the script to 500.
In the preceding command,
xxx indicates the user-defined script name.
If you do not set the owner and execution permissions of the custom execution script, the uploaded script may be tampered with by the attacker and there is a security risk.
- Edit steps based on site requirements.
- Select the steps that need to be edited.
If the protection policy is Clone: Local Protection Solution, steps that can be edited are shown in Table 1.
Table 1 Description about editing stepsStep
|
Description
|
Unmount copy
|
You can unmount the copy mounted previously from the test host using the script you set. If step Mount copy is enabled, step Unmount copy must be enabled.
The following describes how to edit step Unmount copy.
NOTE: If you deselect Enable the step, remove the mapping between the snapshots of cloned source LUNs and hosts. Otherwise, the snapshots may fail to be deleted.
- Unmount copy test host (group)
Select the test host or test host group whose copy needs to be unmounted from the drop-down list box.The test host or test host group whose copy needs to be unmounted in Unmount copy must be consistent with the test host or test host group whose copy needs to be mounted in Mount copy.
- Unmount copy script
Enter the name of the self-defined execution script. This script can be used to unmount the copy and shutdown the database.
- Remove mappings
After you select and execute this step, the mapping between the host and copy will be removed. If you select Remove mappings in Unmount copy, you must select Map copies to hosts in Mount copy.
|
Execute pre-script
|
After this step is activated, you can customize a script to prepare data for data replication, for example, freezing applications and refreshing applications' cache. If you customize a script of freezing an application's I/Os, you must also customize a post-processing script for unfreezing the I/Os.
The following describes how to edit step Execute pre-script.
- Enable the step
After it is selected, this step will be enabled.
- Host (group)
Select the host or host group to which the self-defined execution script needs to be imported. The host or host group in Execute pre-script must be consistent with that in Execute post-script.
- Execute pre-script
Enter the name of the self-defined execution script. This script can be used to freeze applications and refresh applications' cache.
|
Execute post-script
|
After this step is activated, you can customize a script to recover data after data replication, for example, unfreezing applications' I/Os.
The following describes how to edit step Execute post-script.
- Enable the step
After it is selected, this step will be enabled.
- Host (group)
Select the host or host group to which the self-defined execution script needs to be imported. The host or host group in Execute post-script must be consistent with that in Execute pre-script.
- Execute post-script
Enter the name of the self-defined execution script. This script can be used to unfreeze applications.
|
Mount copy
|
You can unmount the copy mounted previously from the test host using the script you set. If step Unmount copy is enabled, step Mount copy must be enabled.
The following describes how to edit step Mount copy.
- Enable the step
After it is selected, this step will be enabled.
- Mount copy test host (group)
Select the test host or test host group to which the copy needs to be mounted from the drop-down list box. The test host or test host group to which the copy needs to be mounted in Mount copy must be consistent with that whose copy needs to be unmounted in Unmount copy.
NOTE: If you select a host group, ensure that all the hosts in the host group belong to the same host group on the storage array. Otherwise, step Mount copy will fail.
- Mount copy script
Enter the name of the self-defined execution script. This script can be used to mount the copy and start the database.
- Map copies to hosts
After it is selected, the copy will be mapped to the host when you execute this step. If you select Map copies to hostsin Mount copy, you must select Remove mappings in Unmount copy .
|
- After you finish editing a step, click Apply.
- After you finish editing all the steps, click Close.
Exception Handling
After protected group execution steps are modified, the modification takes effect when the protected group is executed the next time. You are advised to implement execute protected group immediately after the protected group execution steps are modified to ensure correct configurations.
Copyright © Huawei Technologies Co., Ltd.