Hi, Below is the script that I came up with but looking to see if there is a more appropriate way to achieve this by reducing number of "for" loops or something.
Regards,
mbak
#!/usr/bin/ksh
status=missing
for disk in `lspv | awk '{print $1}'`
do
MISSPATH=`lspath -l ${disk} -s ${status} -F "name parent path_id connection" | awk '{print $3}'`
for path in ${MISSPATH}
do
rmpath -d -l ${disk} -i ${pathid}
done
done
status=failed
for disk in `lspv | awk '{print $1}'`
do
FAILPATH=`lspath -l ${disk} -s ${status} -F "name parent path_id connection" | awk '{print $3}'`
for path in ${FAILPATH}
do
rmpath -d -l ${disk} -i ${pathid}
done
done
#!/usr/bin/ksh
for status in missing failed
do
for disk in `lspv | awk '{print $1}'`
do
for path in `lspath -l ${disk} -s ${status} -F "name parent path_id connection" | awk '{print $3}'`
do
rmpath -d -l ${disk} -i ${pathid}
done # end path
done # end disk
done # end status