1824065 Members
2738 Online
109668 Solutions
New Discussion юеВ

pvlink multipathing

 
SOLVED
Go to solution
dasn
Advisor

pvlink multipathing

Hi Folks,
I am new to this pvlink arena and after a few posts i gathered some knowledge about it.

Could any please tell, how would i set preferred path from two available paths ? After adding the link to my existing volume group it shows the additional link. Also, does pvlink supports any load balancing feature for IO ?? With other multipathing application i have seen, Round Robin; Failover; etc different IO policy. Also, there are features like, turning on and off load balancing. Does pvlink provides such features ?? Any docs, guide to pvlink will be help full. I am using HP-UX 11.23

Thanks for the reply,
NKD
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: pvlink multipathing

PV Links really only do failover. You can do some load-balancing by choosing alternate SCSI buses for different PV's within a VG.

For example, consider the case of a single 200GiB LUN that makes up a VG. You would have a primary path (A) to the LUN and an alternate path (B). Pvlink B would come into play only if A failed.

Now, instead lets' create the same 200GiB VG but use 2 100 GiB LUN's. LUN0 might use primary path A (alternate B) and LUN1 might use primary path B (alternate A). If you then stripe your LVOL's within the VG over both PV's then you achieve I/O distribution and failover.

Of course this same scheme could be extended over as many LUN's as you have separate paths to the array. How much this actually benefits you in terms of performance depends greatly upon the underlying hardware.
If it ain't broke, I can fix that.
spex
Honored Contributor

Re: pvlink multipathing

Hello,

From vgcreate(1M):

pv_path The block device path name of a physical
volume that will be assigned to the new
volume group. You can specify physical
volume links (pv-links) for a physical volume
providing different paths that reference the
same physical volume in the pv_path list.
The order in which the paths are listed is
important. The first path becomes the
primary link to the physical volume, the
second becomes an alternate link to the
physical volume. The primary link is the
default path used to access the physical
volume. If the primary link becomes
unavailable, LVM automatically switches to
the alternate link to access the physical
volume. Currently LVM supports a maximum of
8 paths to a physical volume (7 alternate and
one primary).

Until HP-UX 11iv3, pvlinks were used for failover, not load balancing. If you had controllers set up in active/active mode, you could manually load balance by creating some VGs with primary links going through controller, and other VGs with primary links going through another. Then you would spread files evenly over the corresponding filesystems.

11iv3 supports load balancing over pvlinks using persistent device files.

http://docs.hp.com/en/5991-6481/ch01s04.html

PCS
dasn
Advisor

Re: pvlink multipathing

Clay,
Thanks for the reply.

As you said in case of two LUN, LUN0 will have path A as active and LUN1 will have path B as active. How do we tell pvlink to choose one of these paths ( for ex path B in case of LUN1)? Is there a default path that pvlink will pick up for IO out of two available paths. I have one 3 Gig LUN and want to drive IO in both the paths or either of them. How do i tell pvlink to select one of them ?

Thanks,
NKD
dasn
Advisor

Re: pvlink multipathing

Clay,
Thanks for the reply.

As you said in case of two LUN, LUN0 will have path A as active and LUN1 will have path B as active. How do we tell pvlink to choose one of these paths ( for ex path B in case of LUN1)? Is there a default path that pvlink will pick up for IO out of two available paths. I have one 3 Gig LUN and want to drive IO in both the paths or either of them. How do i tell pvlink to select one of them ? Also is there any docs on pvlink ?

Thanks,
NKD
Patrick Wallek
Honored Contributor

Re: pvlink multipathing

Standard LVM PVLINKs provide **nothing** except an alternate link to a device. There is **NO** load balancing, round robin'ing, etc. The alternate link will take over if/when the primary fails. That is all.

However, there are something you do when creating a VG to get some pseudo-load balancing.

Say you have 4 devices c4t1d1, c4t1d2, c4t1d3 and c4t1d4 with alternate links of c5t1d1, c5t1d2, c5t1d3 and c5t1d4.

Now, when you create your VG, create such that the primary links for 2 devices are c4 (with c5 as alternate) and 2 devices are c5 (with c4 as alternate).

Something like this with your vgcreate command:

vgcreate /dev/vg01 /dev/dsk/c4t1d1 /dev/dsk/c5t1d2 /dev/dsk/c4t1d3 /dev/dsk/c5t1d4

Then vgextend the alternate links.

vgextend /dev/vg01 /dev/dsk/c5t1d1 /dev/dsk/c4t1d2 /dev/dsk/c5t1d3 /dev/dsk/c4t1d4.

Then when you create your LV, you could create it as a striped LV, striping over 4 devices.

lvcreate -L 10240 -i 4 -I 64 -n lvol1 /dev/vg01

The above would create a 10,240 MB LV stripes across the 4 volumes with a stripe size of 64kb.

So when you do any writes to this LV, the will be spread across both controllers, thus my "pseudo-load balancing".
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: pvlink multipathing

The first path listed for a given PV when you do a vgcreate will be the primary link. You can change an existing alternate link to a primary by doing a vgreduce and specifying the primary path. This will remove the current primary path and the alternate will become the primary. You then run vgextend and specify the old primary path and it becomes the altermate. Man vgreduce, vgextend, vgcreate for details.
If it ain't broke, I can fix that.
dasn
Advisor

Re: pvlink multipathing

Thanks for all the responses. Replies are very informative and useful.
- NKD