Friday, April 24, 2020

how to enable the failed path in aix?

How to enable the failed path in aix?



The below script (For Loop) will be used to Enabled the failed disk path in aix. 
You no need to worry about the disk name/number and then fscsi/vscsi details. You can simply execute the below script and the script itself can able to fetch the failed disks and its fscsi/vscsi details on the server and then enabled it smoothly.


for s in `lspath|grep -i failed|awk '{print $2'}`
do
chpath -l $s -p `lspath -l $s|grep -i failed|awk '{print $3'}` -s Enabled
done

(or)

for s in `lspath|grep -i failed|awk '{print $2'}`; do chpath -l $s -p `lspath -l $s|grep -i failed|awk '{print $3'}` -s Enabled; done