MFC request: QLogic 24xx FibreChannel controller

mjacob at freebsd.org mjacob at freebsd.org
Fri Mar 9 23:03:47 UTC 2007



On Fri, 9 Mar 2007, Joao Barros wrote:

>> 
>> There are two FC switches, but AFAIK a multipath setup would have, for
>> example one disk coming from isp0 and the other from isp1, as isp0 and
>> isp1 are connected to two switches...
>> 
>> It's entirely possible that something's ill defined in the FC management
>> console (I din't do it - it's another guy's responsibility :) )
>
> You're right, I missed that detail :)
> You can always ask the "responsible" guy what he did, but right now
> I'd say you have a freebie ;)
>


Use the attached to see if the attached disks are in fact paths to the 
same device based upon serial #
-------------- next part --------------
#!/bin/sh
#
# This script gets a list of da devices and Vital Product Data Serial numbers.
#
# It checks for same devices by matching serial number *and* logical unit
#
camcontrol devl|sed -e 's/^.*lun.//' -e 's/(//' -e 's/)//' -e 's/,/ /'|grep da|\
 sed -e 's/pass.* //' -e 's/pass.*$//' | while read lun disk
do
  serno=`camcontrol inquiry ${disk} -S`
  if [ X"${serno}" != X ]
  then
    echo "${disk} ${lun} ${serno}" >>/tmp/t$$
    echo ${lun}"."${serno} >> /tmp/y$$
  fi
done
cat /tmp/y$$ | while read serno_lun_pair
do
  grep $serno_lun_pair /tmp/t$$ > /tmp/a$$
  nmatch=`cat /tmp/a$$ |wc -l|sed 's/ //g'`
  if [ $nmatch -lt 2 ]
  then
    continue
  fi
  echo "Potential Same Devices:"
  cat /tmp/a$$ | awk ' { printf "\t%s (lun %s)\t%s\n", $1, $2, $3 }'
  cat /tmp/t$$ | grep -v $serno_lun_pair > /tmp/d$$
  mv /tmp/d$$ /tmp/t$$
done
rm -f /tmp/t$$ /tmp/y$$ /tmp/a$$


More information about the freebsd-current mailing list