b2b电商系统搭建的关键步骤与最佳实践解析,助力企业数字化转型
845
2022-05-28
#!/usr/bin/ksh
usage() {
echo "WARNING, use this script AT YOUR OWN RISK"
echo " Usage: `basename $*` "
}
echo "========================= echo CDP disk status =========================="
for vgname in $*
do
lsdev -Cc disk|grep Falc |awk '{print }'|sort>/tmp/lsdevname.txt
lsvg -p testvg |awk '{print }'|sort>/tmp/lspvname.txt
for cdpdisk in `sort /tmp/lsdevname.txt /tmp/lspvname.txt|uniq -d`; do
ACCOUNT_LINE01=`lsdev -l $cdpdisk |awk '{print }'`
if [ "$ACCOUNT_LINE01" = "Available" ] ; then
echo "$cdpdisk is Available!!!"
else
echo "$cdpdisk is Defined,Please check!!!"
# exit 1
fi
done
done
sleep 5
echo "========================= echo CDP PV status =========================="
for vgname in $*
do
lsdev -Cc disk|grep Falc |awk '{print }'|sort>/tmp/lsdevname.txt
lsvg -p testvg |awk '{print }'|sort>/tmp/lspvname.txt
for cdpdisk in `sort /tmp/lsdevname.txt /tmp/lspvname.txt|uniq -d`; do
ACCOUNT_LINE02=`lspv $cdpdisk |grep "PV STATE"|awk '{print }'`
if [ "$ACCOUNT_LINE02" = "active" ] ; then
echo "$cdpdisk is normal in $vgname!!!"
else
echo "$cdpdisk is non-health in $vgname,Please check!!!"
# exit 1
fi
done
done
sleep 5
echo "========================= check volume group status =========================="
for vgname in $*
do
ACCOUNT_LINE03=`lsvg $vgname |grep "STALE PPs"|awk '{print }'`
if [ "$ACCOUNT_LINE03" = "0" ] ; then
echo "$vgname is varyon with no Stale PP!!!"
else
echo "$vgname is varyon but some Stale PP,Please check!!!"
exit 1
fi
done
>/tmp/lsdevname.txt
>/tmp/lspvname.txt
>EOF
Shell
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。