The method of customizing the shell script for backup pre- and post-processing is explained below.
When you are backing up the volume group containing the logical volume used to build the file system, insert a comment character ("#") into line 75 of the pre-processing script (OpcBackup.pre) to remove the exit statement.
Remove the comment from lines 79-148 of the pre-processing script (OpcBackup.pre), as well as from lines 78-153 of the post-processing script (OpcBackup.post). Correct the description in a comment so that unmount/mount processing is carried out on all the logical volumes across which the file system exists. Change the parts shown as "X" to match the actual environment. If more than one logical volume is being processed, repeat lines 115-147 of the pre-processing script (OpcBackup.exe) and lines 116-147 of the post-processing script (PpcBackup.post) once for each additional logical volume.
Note
Note that unmount/mount processing to a volume group is not carried out if the scripts have not been customized.
If the backup volume is a volume group, deactivate the backup volume during backup pre-processing.
Correct the parameters and options, of the OS commands, such as the mount command and the fsck command, appropriately for their use.
Cluster operation by 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 transaction volume is registered in the cluster transaction.
Change the 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 online/offline 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 85, 94, 116, 119 and 127]
(before change) | /usr/sbin/umount $mount_point |
(after change) | /opt/VRTSvcs/bin/hares -offline resource-name -sys system-name |
[lines 114 and 148]
(addition) | mount_status="mounted" while [ $mount_status = "mounted" ] do mount_status=`/usr/sbin/mount | /usr/bin/nawk -v lv=/dev/XXXXX 'lv==$1{flag=1; exit;} END{if(flag==1) print "mounted"; else print "not_mounted";}'` done |
[lines 88, 97, 121 and 130]
(before change) | /usr/sbin/mount $lvname $lv_mount_point |
(after change) | /opt/VRTSvcs/bin/hares -online resource-name -sys system-name |
[lines 115 and 148]
(addition) | mount_status="not_mounted" while [ $mount_status = "not_mounted" ] do mount_status=`/usr/sbin/mount | /usr/bin/nawk -v lv=$lvname 'lv==$1{flag=1; exit;} END{if(flag==1) print "mounted"; else print "not_mounted";}'` done |