Top
ETERNUS SFAdvancedCopy Manager 14.0 Operator's Guide forTape Server Option

A.4.8 Tape copy post-processing in AIX

The names of the post-processing shell scripts used for tape copying are:

Content of shell script

 1: #!/bin/sh
 2: 
 3: # AdvancedCopy Manager
 4: # All Rights Reserved, Copyright FUJITSU LIMITED, 2005-2007
 5: 
 6: #
 7: #   Post-processing 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 post-processing 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 post-processing
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