Removing Failed or Missing Paths

0
1586
rmpath –dl <hdiskX> -p <fscsiX> -w <connection>
# lspath |grep –i missing
Missing  hdisk20 fscsi0
Missing  hdisk20 fscsi0
Missing  hdisk20 fscsi1
Missing  hdisk20 fscsi1

# lspath -l hdisk20 -H -F "name:parent:connection:status" 
hdisk20:fscsi0:5001738065920143,6000000000000:Missing
hdisk20:fscsi0:5001738065920151,6000000000000:Missing
hdisk20:fscsi1:5001738065920183,6000000000000:Missing
hdisk20:fscsi1:5001738065920171,6000000000000:Missing

#!/bin/sh
# rmpaths
>xrmpaths
echo "#!/bin/sh" >>xrmpaths
disks=$(lspv | awk '{print $1}')
for loop in $disks
do
lspath -l $loop -H -F "name:parent:connection:status" |grep Missing| awk -F: '{print "rmpath -dl",$1,"-p", $2, "-w", $3}'>>xrmpaths
done

#!/bin/sh
rmpath –dl hdisk20 –p fscsi0 –w 5001738065920143,6000000000000
rmpath –dl hdisk20 –p fscsi0 –w 5001738065920151,6000000000000
rmpath –dl hdisk20 –p fscsi1 –w 5001738065920183,6000000000000
rmpath –dl hdisk20 –p fscsi1 –w 5001738065920171,6000000000000

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.