獲取在oracleasmlib上emc儲存的多路徑問題

zhangsharp20發表於2017-02-14
獲取asm_lib所用磁碟所屬的emc聚合磁碟名和emc磁碟名,並獲取二者的差異
#!/bin/bash
var1="oracleasm querydisk -p "
var2="| grep emc|cut -d ':' -f 1|cut -b 6- >>/tmp/2.txt"
#oracleasm listdisks >/tmp/1.txt
oracleasm listdisks |awk '{print "oracleasm querydisk -p "$0"| grep emc|cut -d '\'':'\'' -f 1|cut -b 6- >>/tmp/2.txt"}' >/tmp/1.txt
if [ -f "/tmp/2.txt" ]; then
 > /tmp/2.txt
fi
cat /tmp/1.txt |while read line
do
 #var=`echo ${var1}${line} | grep emc |cut -d ':' -f 1|cut -b 6- >>/tmp/2.txt`
 echo ${var}
 #echo ${line}
 #echo $var1$line$var2 >> /tmp/2.txt
 #var=`echo $var1$line$var2`
 #echo $var
 #echo $var2
 var=`echo $line`
# echo ${var}
 $var
done
powermt display dev=all| grep emc |cut -d '=' -f 2 >/tmp/3.txt

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-2133491/,如需轉載,請註明出處,否則將追究法律責任。

相關文章