The method to customize the shell script for replication pre/post-processing is explained below.
When Replication Target Is Volume Group
When replicating a file system which is part of a logical volume in a volume group, the processing scripts need to be modified as follows:
Modify the coding in lines 64 to 128 of the replication source volume pre-processing script and in lines 68 to 142 of the replication source volume post-processing script such that dismount and mount processing is performed for all the logical volumes comprising the file system. Change the parts marked "X" to match the actual environment. Also, remove the comment characters from lines 99-127 of the source volume pre-processing script (RepSrc.pre), and from lines 105-136 of the source volume post-processing script (RepSrc.post). If more than two logical volumes are being processed then repeat lines 99-127 of RepSrc.pre and lines 105-136 of RepSrc.post, once for each additional logical volume.
Modify the coding in lines 68 to 133 of the replication destination volume pre-processing script and in lines 180 to 201 and lines 204 to 240 of the replication destination volume post-processing script such that dismount and mount processing is performed for all the logical volumes comprising the file system. Change the parts marked "X" to match the actual environment. Also, remove the comment characters from lines 103-131 of the destination volume pre-processing script (RepDst.pre), and lines 188-189 and 224-238 of the destination volume post-processing script (RepDst.post). If more than two logical volumes are being processed then repeat lines 103-131 of RepDst.pre and lines 188-189 and 224-238 of RepDst.post, once for each additional logical volume.
The procedure for editing the destination volume post-processing script is given below:
Specify the physical volume name of the destination volume on line 182.
Specify the correspondence between the logical volume names of the source volume and destination volume in quotation marks on line 186. Use "logical volume name of source volume:logical volume of destination volume" as the format. If the source volume includes multiple logical volumes, specify the correspondence for each logical volume. This must be specified even when the logical volume is not mounted.
Specify the logical volume name of the destination volume in quotation marks on line 187, in the format "logical volume name of destination volume:logical volume name of destination volume". If the destination volume contains multiple logical volumes, specify all of the logical volume names on line 187. This must be specified even when the logical volume is not mounted.
Specify the volume name of the destination volume on line 208.
On line 209, specify the mount point of the logical volume of the source volume specified on line 208.
On line 210, specify the mount point of the logical volume of the destination volume specified on line 208.
After making the necessary corrections to the script, convert the exit statements on line 60 of the source volume pre-processing script and line 64 of the destination volume pre-processing script (RepDst.pre) into comments ("#").
If the volume group to be replicated includes a logical volume for which no file system has been built, make the above corrections and then convert the statements on lines 212 to 217 of the destination volume post-processing script (RepDst.post) into comments ("#").
Note
Note that unmount/mount processing to a volume group is not carried out if the scripts have not been customized.
Modify the parameters and options of the OS commands (such as the "mount" command and the "fsck" command), appropriately for their use.
If the operation involves activation of the destination volume group, the destination volume post-processing script rewrites (recreatevg) the LVM management information. This processing may take a long time.