ETERNUS SF AdvancedCopy Manager 運用手引書 テープバックアップ連携編 13.3 -Microsoft(R) Windows(R) 2000/Microsoft(R) Windows Server(R) 2003/Microsoft(R) Windows Server(R) 2008-, -Solaris-, -HP-UX-, -Linux-, -AIX- |
目次 索引 |
付録A バックアップ/リストア/テープコピーの前後処理 | > A.4 テープコピーの前後処理 |
テープコピー実行時の前処理のシェルスクリプト名は、以下のとおりです。
非クラスタ運用の場合
/etc/opt/FJSVswsts/sh/TapeCopy.pre |
クラスタ運用の場合
/etc/opt/FJSVswsts/<論理ノード名>/sh/TapeCopy.pre |
シェルスクリプトの内容は、以下のとおりです。
1: #!/bin/sh 2: 3: # AdvancedCopy Manager 4: # All Rights Reserved, Copyright FUJITSU LIMITED, 2005-2007 5: 6: # 7: # Preprocessing 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: # 10: umount 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: # When the backup disk is a volume group ##################################### 65: if [ "$dev_type" = "lvm_vg" ] 66: then 67: 68: # Devices is volume group and script not customize 69: exit 99 70: 71: # When devices of volume group was mounted 72: # # Specify the name of volume group to unmount 73: # if [ "$device" = "/dev/vgXX" ] 74: # then 75: # 76: # # Unmount all logical volumes of the volume group 77: # mount_point="/XX" 78: # /usr/sbin/umount $mount_point 2>/dev/null 79: # if [ $? != 0 ] 80: # then 81: # retry_count=3 82: # sleep_time=1 83: # result_flag=1 84: # 85: # while [ $retry_count -gt 0 ] 86: # do 87: # /usr/sbin/umount $mount_point > $err_log_path/$dev.umount 2>&1 88: # if [ $? != 0 ] 89: # then 90: # retry_count=`expr $retry_count - 1` 91: # /usr/bin/sleep $sleep_time 92: # else 93: # /usr/bin/rm -f $err_log_path/$dev.umount 94: # result_flag=0 95: # break 96: # fi 97: # done 98: # 99: # if [ $result_flag != 0 ] 100: # then 101: # /usr/sbin/fuser -cu $mount_point> $err_log_path/$dev.fuser 2>&1 102: # /usr/bin/ps -ef > $err_log_path/$dev.ps 2>&1 103: # 104: # exit 10 105: # fi 106: # fi 107: # echo "mount" > $post_file 108: # fi 109: 110: # When the backup disk is a VxVM physical volume ############################# 111: elif [ "$dev_type" = "vxvm_pv" ] 112: then 113: # Nothing is done to VxVM physical volume. 114: echo "none" > $post_file 115: 116: # When the backup disk is a LVM physical volume ############################## 117: elif [ "$dev_type" = "lvm_pv" ] 118: then 119: # Nothing is done to LVM physical volume. 120: echo "none" > $post_file 121: 122: fi 123: exit 0 |
ボリュームグループがテープコピー対象の場合は、前処理スクリプト(TapeCopy.pre)の69行目を以下のように変更してください。
(変更前) |
exit 99 |
(変更後) |
echo "none" > $post_file |
目次 索引 |