Many sites still only utilize HP’s PV-Links/Alternate-Links product to provide a simple failover for SAN connected disks. This product doesn’t do load balancing to spread out load, and is simply a failover if one of your SAN paths goes away.
This works great for redundancy, but with a little planning, you can accomplish simple load-balancing too.
Let’s consider a HPUX system which has two paths to the SAN, and two 50GB LUNS present to the server. The controllers are c17 and c19 and the two disks are t0d0 and t0d1. With PV-Links, you will thus have the following disks detected by the operating system:
/dev/dsk/c17t0d0
/dev/dsk/c17t0d1
/dev/dsk/c19t0d0
/dev/dsk/c19t0d1
Both c17t0d0 and c19t0d0 are the same LUN on the SAN, and also c17t0d1 and c19t0d1. With me so far?
The trick is, when adding these to a new volume group, you want to stagger them so that every disk you add, alternates between using the two controllers.
Therefore, I add them like this:
vgcreate vgTESTVG /dev/dsk/c17t0d0 /dev/dsk/c19t0d0
vgextend vgTESTVG /dev/dsk/c19t0d1 /dev/dsk/c17t0d1
You will end up with a vgdisplay -v /dev/vgTESTVG that looks like:
.
.
.
— Physical volumes —
PV Name /dev/dsk/c17t0d0
PV Name /dev/dsk/c19t0d0 Alternate Link
PV Status available
Total PE 12797
Free PE 12797
Autoswitch On
Proactive Polling OnPV Name /dev/dsk/c19t0d1
PV Name /dev/dsk/c17t0d1 Alternate Link
PV Status available
Total PE 12797
Free PE 12797
Autoswitch On
Proactive Polling On
Therefore, all disk access to the first disk will go down the c17 controller, and all access to the second disk will go down the c19 controller. You would then continue the pattern to add additional disks.
Keep in mind, that this is very basic load-balancing, and might not even qualify as true load-balancing. There are much better products out there that do a much better job (Powerpath, Veritias Storage Foundation, etc.).
However, if you only need very basic load balancing, and want to save a few dimes, this might work for you.
![[del.icio.us]](http://www.theunixzone.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.theunixzone.com/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.theunixzone.com/wp-content/plugins/bookmarkify/facebook.png)
![[Twitter]](http://www.theunixzone.com/wp-content/plugins/bookmarkify/twitter.png)