The name of a script file for post-processing of a backup is as follows.
/etc/opt/FJSVswsts/sh/OpcBackup.post
Post-processing Script for Backup (OpcBackup.post)
1: #!/bin/sh 2: 3: # AdvancedCopy Manager 4: # All Rights Reserved, Copyright FUJITSU LIMITED, 2004-2007 5: 6: # 7: # Post-processing of backup processing 8: # 9: # Argument: $1 Device or VG name of transaction disk 10: # $2 Reserve 11: # 12: # Error number 13: # 2: Argument error 14: # 11: mount error 15: 16: # Argument check 17: case $# in 18: 1) 19: ;; 20: 2) 21: ;; 22: *) 23: exit 2 24: ;; 25: esac 26: 27: device=$1 28: 29: if [ "$SWSTGNODE" != "" ] 30: then 31: swstg_node="/`echo $SWSTGNODE`" 32: else 33: swstg_node="" 34: fi 35: 36: err_log_path="/var/opt/FJSVswsts"$swstg_node"/log" 37: 38: # Determination of postprocessing file name 39: if [ "`echo $device | /usr/bin/grep "/dev/hdisk"`" != "" ] 40: then 41: dev_type="lvm_pv" 42: # /dev/hdisk? -> hdisk? 43: dev="`echo $device | /usr/bin/awk -F\/ '{ print $3 }'`" 44: 45: elif [ "`echo $device | /usr/bin/grep "/dev/vx/dmp/"`" != "" ] 46: then 47: dev_type="vxvm_pv" 48: # /dev/vx/dmp/device -> device 49: dev="`echo $device | /usr/bin/awk -F\/ '{ print $5 }'`" 50: 51: elif [ "`echo $device | /usr/bin/grep "/dev/"`" != "" ] 52: then 53: dev_type="lvm_vg" 54: # /dev/VG_Name -> VG_Name 55: dev="`echo $device | /usr/bin/awk -F\/ '{ print $3 }'`" 56: 57: else 58: # Other Volume 59: exit 0 60: fi 61: 62: post_file="/etc/opt/FJSVswsts"$swstg_node"/data/DEFAULT/"$dev".pre" 63: 64: # Confirmation of postprocessing 65: if [ ! -r $post_file ] 66: then 67: exit 0 68: fi 69: post="`/usr/bin/cat $post_file`" 70: 71: # mount processing 72: if [ "$post" = "mount" ] 73: then 74: 75: # When devices of volume group can be unmounted 76: # Specify the name of volume group to mount 77: 78: if [ "$device" = "/dev/vgXX" ] 79: then 80: mount_error=0 81: 82: # Mount all logical volumes of the volume group 83: lvname="/dev/XXXXX" 84: lv_mount_point="/XX" 85: 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";}'` 86: if [ $mount_status = "not_mounted" ] 87: then 88: /usr/sbin/mount $lvname $lv_mount_point 2> /dev/null 89: if [ $? != 0 ] 90: then 91: retry_count=3 92: sleep_time=1 93: result_flag=1 94: 95: while [ $retry_count -gt 0 ] 96: do 97: /usr/sbin/mount $lvname $lv_mount_point > $err_log_path/$dev.mount 2>&1 98: if [ $? != 0 ] 99: then 100: retry_count=`expr $retry_count - 1` 101: /usr/bin/sleep $sleep_time 102: else 103: /usr/bin/rm -f $err_log_path/$dev.mount 104: result_flag=0 105: break 106: fi 107: done 108: 109: if [ $result_flag != 0 ] 110: then 111: mount_error=1 112: fi 113: fi 114: fi 115: 116: # lvname="/dev/XXXXX" 117: # lv_mount_point="/XX" 118: # 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";}'` 119: # if [ $mount_status = "not_mounted" ] 120: # then 121: # /usr/sbin/mount $lvname $lv_mount_point 2> /dev/null 122: # if [ $? != 0 ] 123: # then 124: # retry_count=3 125: # sleep_time=1 126: # result_flag=1 127: # 128: # while [ $retry_count -gt 0 ] 129: # do 130: # /usr/sbin/mount $lvname $lv_mount_point > $err_log_path/$dev.mount 2>&1 131: # if [ $? != 0 ] 132: # then 133: # retry_count=`expr $retry_count - 1` 134: # /usr/bin/sleep $sleep_time 135: # else 136: # rm -f $err_log_path/$dev.mount 137: # result_flag=0 138: # break 139: # fi 140: # done 141: # 142: # if [ $result_flag != 0 ] 143: # then 144: # mount_error=1 145: # fi 146: # fi 147: # fi 148: 149: if [ $mount_error != 0 ] 150: then 151: exit 11 152: fi 153: fi 154: fi 155: 156: /usr/bin/rm -rf $post_file 2> /dev/null 157: exit 0