Hereby i post the new version of the HBA auto lunbalancing script version 2.1
It doesn't matter if you have 2 4 6 or 8 storage paths to your LUNs this will balance it automaticly for you to spread the load.
Happy MPIO
It doesn't matter if you have 2 4 6 or 8 storage paths to your LUNs this will balance it automaticly for you to spread the load.
for PATHS in 2 4 6 8
do
STPATHS=${PATHS}
COUNTER="1"
for LUN in $(esxcfg-mpath -l | grep "has ${STPATHS} paths" | awk '{print $2}')
do
esxcfg-mpath --lun=${LUN} --path=$(esxcfg-mpath -q --lun=${LUN} | grep FC | awk '{print $4}' | awk '{print NR "S\t " $0}' | grep ${COUNTER}S | awk '{print $2}') --preferred
COUNT=`expr ${COUNTER} + 1`
COUNTER=${COUNT}
if [[ ${COUNTER} -gt ${STPATHS} ]]
then
COUNTER="1"
fi
done
done
Happy MPIO
Tags:
network,
networking,
path,
san,
storage,
luns,
lun,
hba,
configuration