for disk in lsdev -Cc disk | grep 2145 | awk '{ print $1 }'
do
for path in lspath -l $disk -F "status connection" | grep Failed | awk '{ print $2 }'
do
echo $disk
rmpath -l $disk -w $path -d
done
done
lsdev -Cc disk -s fcp -Fname | sed -e ’s/hdisk//’ | xargs -i pcmpath clear device {} count error
for device in $(pcmpath query device |grep -ip 2145 |grep DEV |awk ‘{print $2}’) do echo hdisk$device pcmpath chgprefercntl device $device sleep 2 done