Listing 4
--------------------------------------------------------------------------------
# flashdisable .sh
#
# Written	: For R3BNKORA AIX node
# Date	: December 2005
# Purpose	: Shell Script for disabling flash target drives from TSM client # node and removing all related OS information.
-----------------------------------------------------------------------

#!/bin/ksh
# Unmount all fileystems which are created during Flashcopy operation
#
 unmount /flash/oracle/data1
 unmount /flash/oracle/data2
 unmount /flash/oracle/data3
unmount /flash/oracle/data4
unmount /flash/oracle/archivelogs
  
# Varyoff all Flashcopy volume Groups
#
varyoffvg flashvg1
varyoffvg flashvg2
varyoffvg flashvg3

# Export all Flashcopy volume groups
exportvg flashvg1
exportvg flashvg2
exportvg flashvg3

# Remove all snapshot logical drives (vpaths and associated hdisks)

rmdev -dl vpath0
rmdev -dl vpath1
rmdev -dl vpath2
rmdev -dl hdisk21
rmdev –dl hdisk22
rmdev –dl hdisk23
rmdev –dl hdisk24
rmdev –dl hdisk11
rmdev –dl hdisk13
rmdev –dl hdisk17
rmdev –dl hdisk19
rmdev –dl hdisk29
rmdev –dl hdisk31
rmdev –dl hdisk33
rmdev –dl hdisk35

/opt/ibm/dscli/dscli rmflash -dev IBM.2107-7520431 -quiet 1100:1105
/opt/ibm/dscli/dscli rmflash -dev IBM.2107-7520431 -quiet 1101:1106
/opt/ibm/dscli/dscli rmflash -dev IBM.2107-7520431 -quiet 1102:1104

cd /scripts
touch lockfile
exit 0


