Emulex Utilities for administration and configuration
I've started rolling scripts around most of the administrative tasks here, mainly so I'm not always the guy who has to pull the trigger on things. It also helps with consistency and makes integrating the changes into an automated build easier.Here's a set of scripts I recently created to help me with managing and updating my Emulex HBA's with ESX 3.0.2. Specifically I use the HP Emulex LPe1105 (403621-B21) with BL460c blades.
First, get the bits from Emulex & HP. I use 2 components:
- Lpfc Utility tarball:
http://www-dl.emulex.com/support/vmware/lputil/20a14/lpfcutil-7.3.2-3.tgz - Model specific firmware (2.72 Nov. 07) :
ftp://ftp.hp.com/pub/softlib/software9/COL11981/co-55809-1/fw_lpe11002_lpe1105_zf272a2.all
I'm still a little old school with my systems and I have a NFS mount made in the COS. It's a little more complicated and unsupported, but it works great. You can put the files anywhere that's accessibile to all systems or just copy them locally using scp or sftp.
Installation script (installEmulex.sh):
#!/bin/sh
SOURCE=#your source dir hereTARGET=/tmp/emulex
LFCUTIL=lpfcutil-7.3.2-3.tgz
LPBIN=/usr/sbin/lpfc
if [ -d $SOURCE ] ; thenif [ ! -d $TARGET ] ; then
mkdir -p $TARGET
fi
cd $TARGET
cp $SOURCE/$LFCUTIL $TARGET
if [ -f $LFCUTIL ] ; then
tar xvzf $LFCUTIL
./Install.sh
cp Remove.sh $LPBIN
cp README $LPBIN
else
echo "$LFCUTIL not found"
exit 1
fi
else echo "Source directory $SOURCE cannot be accessed"
rm -rf $TARGET
exit 1
fi
I also like to make sure the topology is set to only allow point-to-point mode. Here's the code to do that globally on the system for all cards using the lpfcdd_732 driver.
setting emulex topology (setEmulexTopology.sh)
#!/bin/sh
esxcfg-module -s "lpfc_topology=0x2" lpfcdd_732esxcfg-boot -b
Here's how I update the firmware versions on the dual-channel HBA
update firmware (updateEmulexFW.sh)
#!/bin/sh
SOURCE=#your source dir here
LPUTIL=lputil
LPBIN=/usr/sbin/lpfc
ELFW=fw_lpe11002_lpe1105_zf272a2.all
if [ -d $SOURCE ] ; thencp -f $SOURCE/$ELFW $LPBIN
if [ -f $LPBIN/$ELFW ] && [ -f $LPBIN/$LPUTIL ] ; then
$LPBIN/$LPUTIL download 0 $LPBIN/$ELFW
$LPBIN/$LPUTIL download 1 $LPBIN/$ELFW
else
echo "$LPUTIL or $ELFW not found"
exit 1
fi
elseecho "Source directory $SOURCE cannot be accessed"
exit 1
fi
finally let's drop these into a script that runs everything:
Emulex util installs (installEmulexUtils.sh)
#!/bin/sh
EXSOURCE=#dir where these live
$EXSOURCE/setEmulexTopology.sh
$EXSOURCE/installEmulex.sh
$EXSOURCE/updateEmulexFW.sh
echo "Reboot system for changes to take effect"
Labels: storage; fiber channel; emulex
Archives
10/01/2006 - 11/01/2006 | 03/01/2007 - 04/01/2007 | 04/01/2007 - 05/01/2007 | 05/01/2007 - 06/01/2007 | 06/01/2007 - 07/01/2007 | 07/01/2007 - 08/01/2007 | 09/01/2007 - 10/01/2007 | 10/01/2007 - 11/01/2007 | 11/01/2007 - 12/01/2007 | 12/01/2007 - 01/01/2008 | 01/01/2008 - 02/01/2008 | 02/01/2008 - 03/01/2008 | 03/01/2008 - 04/01/2008 |