The method to customize the shell script for replication pre/post-processing is explained below.
When you do not want to unmount the replication target volume
To ensure the copy source volume is not unmounted, make the following modifications to the script.
If you do not want to unmount the copy source volume
Use an editor to remove the comment character ("#") at lines 76 to 79, 83, and 119 in the copy source volume pre-processing script (RepSrc.pre), and specify the target copy source volume name in the if statement on line 76.
If you do not want to unmount the copy destination volume for the copy source volume
Use an editor to remove the comment character ("#") on lines 84 to 136 in the copy destination volume post-processing script (RepDst.post), and specify the target copy destination volume name in the if statement on line 84. Ensure that the line numbers quoted above are not changed by the insertion of removal of any special processing statements used in the script. Ensure these changes are fully tested before applying the script to live backup processing.
This operation is possible only when the file system is one of the following:
ufs
SynfinityFILE (single-partition configuration)
The pre-processing and post-processing of the copy source volume in the customized script is described below.
Copy source volume status | Copy source pre-processing | Copy source post-processing |
---|---|---|
Mounted | Suppresses updating of the copy source volume | Cancels the suppressed updating of the copy source volume |
The pre-processing and post-processing of the copy destination volume in the customized script is described below.
Copy destination post-processing |
---|
Check of matching of the copy destination volume |
Note
Where the standard script is used, the caching of a file system and renewal of subsequent updates are inhibited by unmounting a file system before an advanced copy process using (EC/OPC), the integrity of the data of the entire file system is guaranteed.
Although flushing the cache of a file system and renewal of subsequent updates are inhibited using lockfs-w, when customizing a script to prevent unmounting a file system, data integrity or file consistency cannot be guaranteed if the file is in Write Open mode (the database space of Oracle which is supporting on-line backup).
Moreover, when the renewal of metadata is occurring, the data updates to the file system itself are not guaranteed, even with "lockfs" specified.
It is therefore critical to consider this and manage the integrity of data updates accordingly when you elect not to unmount a file system.
If an SDX object is operated in slice units, do not specify a slice name (/dev/sfdsk/<class name>/dsk/<volume name>:<DEVNAM value of sdxinfo>)in Line 76 of the copy source volume pre-processing script (RepSrc.pre) and in Line 84 of the copy destination volume post-processing script (RepDst.post). Instead, specify a logical volume name (/dev/sfdsk/<class name>/dsk/<volume name>).
Cluster operation using VERITAS Cluster Server
Customization of the pre-processing and post-processing scripts is required when performing cluster operations using VERITAS Cluster Server, and when the mount point of the original/source volume is registered in the cluster transaction.
Change unmount/mount processing in the pre-processing and post-processing scripts into offline/online processing of the mount point resource.
The mount point resource relating to the Volume is immediately offline/online whilst there will be a time delay before access is actually prevented when mount/unmount is used.
Please note that once the offline/online command is issued there will be a delay before the mount/unmount command can be executed. The "sleep" and "df" commands can be used to delay the mount/unmount until after the process that sets the volumes online or offline has completed.
The examples below show how the pre-processing and post-processing scripts are modified.
[lines 87 and 97]
(before change) | /usr/sbin/umount $mount_point |
(after change) | /opt/VRTSvcs/bin/hares -offline resource-name -sys system-name |
[line 116]
(addition) | while /usr/sbin/df -l "$device">/dev/null 2>&1; do :; done |
[lines 74 and 84]
(before change) | /usr/sbin/umount $mount_point |
(after change) | /opt/VRTSvcs/bin/hares -offline resource-name -sys system-name |
[line 103]
(addition) | while /usr/sbin/df -l "$device">/dev/null 2>&1; do :; done |
[lines 99, 103, 105, 118, 122 and 124]
(before change) | /usr/sbin/mount $lvname $lv_mount_point or /usr/sbin/mount -F $fs $device $mount_point |
(after change) | /opt/VRTSvcs/bin/hares -online resource-name -sys system-name |
[line 144]
(addition) | until /usr/sbin/df -l "$device">/dev/null 2>&1; do :; done |
[lines 153, 160, 172 and 179]
(before change) | /usr/sbin/mount $lvname $lv_mount_point or /usr/sbin/mount -F $fs $device $mount_point |
(after change) | /opt/VRTSvcs/bin/hares -online resource-name -sys system-name |
[line 197]
(addition) | until /usr/sbin/df -l "$device">/dev/null 2>&1; do :; done |