テープコピー実行時の後処理のシェルスクリプト名は、以下のとおりです。
非クラスタ運用の場合
/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-2006 5 6 # 7 # Postprocessing of tape copy processing 8 # 9 # Argument: $1 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 if [ "$SWSTGNODE" != "" ] 29 then 30 swstg_node="/`echo $SWSTGNODE`" 31 else 32 swstg_node="" 33 fi 34 35 err_log_path="/var/opt/FJSVswsts"$swstg_node"/log" 36 37 # Determination of postprocessing file name 38 if [ "`echo $device | /usr/bin/grep "/dev/hdisk"`" != "" ] 39 then 40 dev_type="lvm_pv" 41 # /dev/hdisk? -> hdisk? 42 dev="`echo $device | /usr/bin/awk -F¥/ '{ print $3 }'`" 43 44 elif [ "`echo $device | /usr/bin/grep "/dev/vx/dmp/"`" != "" ] 45 then 46 dev_type="vxvm_pv" 47 # /dev/vx/dmp/device -> device 48 dev="`echo $device | /usr/bin/awk -F¥/ '{ print $5 }'`" 49 50 elif [ "`echo $device | /usr/bin/grep "/dev/"`" != "" ] 51 then 52 dev_type="lvm_vg" 53 # /dev/VG_Name -> VG_Name 54 dev="`echo $device | /usr/bin/awk -F¥/ '{ print $3 }'`" 55 56 else 57 # Other Volume 58 exit 0 59 fi 60 61 post_file="/etc/opt/FJSVswsts"$swstg_node"/data/DEFAULT/"$dev".pre" 62 63 # Confirmation of postprocessing 64 if [ ! -r $post_file ] 65 then 66 exit 0 67 fi 68 69 /usr/bin/rm -f $post_file 2> /dev/null 70 exit 0