Home Page‎ > ‎

VIOS Load Balancing

VIO Client IO Load Balancing  across Dual-VIOS servers


VIO Servers are the basis for Virtualization in IBM P Series servers. Most of the implementions have dual-vio server implementation, to allow for concurrent upgrade/patching of VIOs without requiring downtime on VIO Clients. It also allows redundancy in case of very rare VIO server failures, adapter failures and if setup correctly against network switch port and SAN switch port failures.

The following scripts can take full advantage of Dual-VIO Server by load balancing IO from VIO Clients across the dual-VIO server implementation. The default settings do not make proper use of IO load balancing for VIO clients. With the default setup, the VIO client will work seamless in case of VIO server failure or planned upgrades, but will not effectively utilize IO adapters available on Dual-VIO server setup.

This simple script when run on each VIO client will distribute the IO across both VIO servers. It does not require any downtime and changes are dynamic.


###################

#!/usr/bin/ksh


if [ `lspath|grep vscsi|egrep -i "failed|missing|disable"` -gt 0 ]
then

if [ `lspath|grep Enabled|awk '{ print $3 }'|sort -u|wc -l|awk '{ print $1 }'` -eq 2 ]
then
for vscsi in `lspath|grep Enabled|awk '{ print $3 }'|sort -u|head -1`
do
echo "Executing Commands"
lspath|grep -w $vscsi|egrep "0 |2 |4 |6 |8 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=1" }'
lspath|grep -w $vscsi|egrep "1 |3 |5 |7 |9 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=2" }'
lspath|grep -w $vscsi|egrep "0 |2 |4 |6 |8 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=1" }'|ksh
lspath|grep -w $vscsi|egrep "1 |3 |5 |7 |9 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=2" }'|ksh
done
for vscsi in `lspath|grep Enabled|awk '{ print $3 }'|sort -u|tail -1`
do
echo "Executing Commands"
lspath|grep -w $vscsi|egrep "1 |3 |5 |7 |9 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=1" }'
lspath|grep -w $vscsi|egrep "0 |2 |4 |6 |8 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=2" }'
lspath|grep -w $vscsi|egrep "1 |3 |5 |7 |9 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=1" }'|ksh
lspath|grep -w $vscsi|egrep "0 |2 |4 |6 |8 "|awk '{ print "chpath -l "$2" -p "$3" -a priority=2" }'|ksh
done
fi
else

lspath|grep vscsi|egrep -i "missing|failed|disabled"
echo "\n\nPlease fix some path issues on vscsi\n\n"
fi