Date: Fri, 9 Mar 2007 14:30:15 -0800 (PST) From: mjacob@freebsd.org To: Joao Barros <joao.barros@gmail.com> Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org, Matt Jacob <mjacob@freebsd.org>, Ivan Voras <ivoras@fer.hr> Subject: Re: MFC request: QLogic 24xx FibreChannel controller Message-ID: <20070309142918.V61513@ns1.feral.com> In-Reply-To: <70e8236f0703091413o473db67fr451e3be49c44b025@mail.gmail.com> References: <esruhl$8s9$1@sea.gmane.org> <45F18183.7050405@FreeBSD.org> <45F182F2.10604@fer.hr> <ess83u$j2c$1@sea.gmane.org> <70e8236f0703091240q65d45300u836121454d799c64@mail.gmail.com> <45F1C77C.8010103@fer.hr> <70e8236f0703091413o473db67fr451e3be49c44b025@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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 #
[-- Attachment #2 --]
#!/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$$
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070309142918.V61513>
