テープコピー実行時の後処理のシェルスクリプト名は、以下のとおりです。
非クラスタ運用の場合
/etc/opt/FJSVswsts/sh/TapeCopy.post |
クラスタ運用の場合
/etc/opt/FJSVswsts/<論理ノード名>/sh/TapeCopy.post |
シェルスクリプトの内容は、以下のとおりです。
1: #!/bin/sh 2: 3: # AdvancedCopy Manager 4: # All Rights Reserved, Copyright FUJITSU LIMITED, 2005-2008 5: 6: # 7: # Postprocessing of tape copy processing 8: # 9: # Argument: $1 Device or VG name of backup disk 10: # $2 Reserve 11: # 12: # Error number 13: # 2: Argument error 14: 15: # Argument check 16: case $# in 17: 1) 18: ;; 19: 2) 20: ;; 21: *) 22: exit 2 23: ;; 24: esac 25: 26: device=$1 27: 28: # Determination of postprocessing file name 29: 30: if [ "$SWSTGNODE" != "" ] 31: then 32: swstg_node="/`echo $SWSTGNODE`" 33: else 34: swstg_node="" 35: fi 36: 37: err_log_path="/var/opt/FJSVswsts"$swstg_node"/log" 38: 39: # Device type check 40: trans="`echo $device | /usr/bin/grep -e "/dev/dsk/" -e "/dev/disk/"`" 41: lvmtrans="`echo $device | /usr/bin/grep "/dev/"`" 42: vxpvtrans="`echo $device | /usr/bin/grep "/dev/vx/dmp/"`" 43: if [ "$trans" != "" ] 44: then 45: dev="`echo $device | /usr/bin/sed -e "s/\/dev\/dsk\///" -e "s/\/dev\/disk\//_hppv_/"`" 46: elif [ "$vxpvtrans" != "" ] 47: then 48: dev_type="vxvm_pv" 49: # /dev/vx/dmp/XXXX -> XXXX 50: dev="`echo $device | /usr/bin/awk -F\/ '{ print $5 }'`" 51: elif [ "$lvmtrans" != "" ] 52: then 53: # /dev/vgXX -> vgXX 54: dev="`echo $device | /usr/bin/awk -F\/ '{ print $3 }'`" 55: else 56: exit 0 57: fi 58: post_file="/etc/opt/FJSVswsts"$swstg_node"/data/DEFAULT/"$dev".pre" 59: 60: # Confirmation of postprocessing 61: if [ ! -r $post_file ] 62: then 63: exit 0 64: fi 65: /usr/bin/rm -f $post_file 2> /dev/null 66: 67: exit 0 |