Operating System - HP-UX
1833782 Members
2378 Online
110063 Solutions
New Discussion

Re: Alternate Paths to a logical volume.

 
SOLVED
Go to solution
Brad Marks
Super Advisor

Alternate Paths to a logical volume.

When running glance and looking at Top Disks By Utilization, I find that only the primary path to the lvol is being used; the alternate path shows NO activity.

In SAM I verified that each lvol has differing primary and alternate paths.

This is a 12H Disk Array with 4 16gb. drives.

Is there a way to spread the I/O out over the pri and alt paths?

Any help would be greatly appreciated.
Thanks in advance,
Brad
It's not impossible -- it'll just cost more...
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: Alternate Paths to a logical volume.

Hi Brad:

LVM does *not* use alternate paths (pvlinks) for load-balancing. Alternate links are only for fail-over.

However, if you have two controllers servicing a pool (array) of disks, then the ideal configuration is to make the primary link for controller-1 service half the disks and the secondary linke for controller-1 service the other half. On controller-2, the primary link is assigned to the same set of disks serviced by the alternate link on controller-1. Similarly, on controller-2, the alternate link is assigned to the same set of disks serviced bye the primary link on controller-1.

This scheme provided access to *any* disk in the array (pool) should *either* controller fail, *and* spreads the load between controllers (paths).

Please note that with VxVM, dynamic load-balancing *does* occur.

Regards!

...JRF...
Craig Rants
Honored Contributor

Re: Alternate Paths to a logical volume.

Here are my notes for creating an autoraid with the proper sizes and alternate links.

GL,
C

To build an Autoraid optimized for performance.

Requirements: 2 Autoraid Controllers and 2 SCSI connections to the server

1) Bind a LUN ??? create 2 LUN???s of equal size (Basically your are creating two ???logical??? physical volumes)
sam => disks and file systems => disk devices => HP autoraid => actions => disk array maintainance => View more information
Take unallocated capacity as indicated in the right side of the window and divide by 2. Then go back one window in SAM and make 2 LUN???s of equal size.
Select the Autoraid Controller with the space bar the => actions => disk array maintainance => bind LUN
(pay attention to hardware path for newly created LUN???s)

2) Install special/device files
# insf ???e

3) determine the device files for the autoraids
# ioscan ???fnC disk | more
note the 2 device files for each disk. i.e.. /dev/dsk/c0t1d0 and /dev/dskc0t1d1 you should have two sets of these types of device files, refer to the hardware paths you noted before if you have trouble determining

4) perform the LVM work
# cd /dev
# mkdir vg0# (where # is the number of the volume group such as vg03)
# cd vg0#
# mknod group c 64 0x0#0000 ( # must be the same as the volume group number)
# pvcreate /dev/rdsk/c0t1d0 (do this for all 4 disks that are being added to the volume group)
# vgcreate /dev/vg0# /dev/dsk/c1t0d0 /dev/dsk/c2t1d0 /dev/dsk/c2t1d1
/dev/dsk/c1t0d1 (you must follow this format when adding disks into the volume group)
# vgdisplay ???v vg0# ( see if the volume group was created successfully, make sure controller cards alternate. It should look like the example below)
--- Physical volumes ---
PV Name /dev/dsk/c1t0d0
PV Name /dev/dsk/c0t1d0 Alternate Link
PV Status available
Total PE 4499
Free PE 1311
Autoswitch On

PV Name /dev/dsk/c0t1d1
PV Name /dev/dsk/c1t0d1 Alternate Link
PV Status available
Total PE 4499
Free PE 1311
Autoswitch On

if not correct
# vgreduce vg0# /dev/dsk/c#t#d#
# vgextend vg0# /dev/dsk/c#t#d#
then continue
if correct next step is to make the required mount points for a striped logical volume on autoRAID
# lvcreate ???l ???SIZE??? ???i 2 ???I 64 ???s y (???n lvol#) /dev/vg0# (repeat this for all logical volumes needed ??? The SIZE represents lvol size, the ???l is for extents, ???L for Mbytes default Physical Extent size is 4MB) ( the format above for stripping is lower case -i 2 upper case -i 64, Word distorts the true representation of the letters) don???t use the ???n option in most cases and pay attention to make sure that the you see what lvol it has assigned.
# newfs ???F vxfs /dev/vg0#/rlvol# (repeat this for all rvol???s needed)
# cd /etc
# vi fstab (Add new volume group with files as needed create needed directories)
ie.. /dev/vg0#/lvol# /opt/oracle vxfs delaylog 0 2
mount ???a (tests fstab entries while it mounts new lvol???s)
bdf (to show that they are mounted)
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Hai Nguyen_1
Honored Contributor

Re: Alternate Paths to a logical volume.

Brad,

I believe that the alt. path is there only in case the primary path fails for any reason. Therefore, it is not for load balancing.

Hai
MANOJ SRIVASTAVA
Honored Contributor

Re: Alternate Paths to a logical volume.

Hi Brad

If you can adress the disk seprately than may be you can vgcreate using primary alternate and then alterante primary ie balance the load . ie the 2nd controller as the primary contrioller so that the wheneve the system want to use the 2nd PV it uses the 2nd controller as its primary . I dont hink this is possible in a autoraid unless you can adress each PV seprately with 2 distinct paths.


Manoj Srivastava
Steve Faidley
Valued Contributor

Re: Alternate Paths to a logical volume.

I assume you already have your file systems created and in use.
To switch some of your I/O to an alternate controller you can use pvchange.

Example data;
Vgdisplay ???v vg10
~~~~~~~
/dev/dsk/c1t2d3
/dev/dsk/c2t2d3 Alternate Link

# pvchange -s /dev/dsk/c2t2d3
# vgdisplay ???v vg10
~~~~~~
/dev/dsk/c2t2d3
/dev/dsk/c1t2d3 Alternate Link

Now c2t2d3 will show as primary link. This will only stay until you reboot.
You can check the order by doing;
# strings /etc/lvmtab|grep -e"c1t2d3" -e"c2t2d3"
/dev/dsk/c1t2d3
/dev/dsk/c2t2d3

The order they return in is the order they will configure next reboot.

In order to make the change permanent you need to do a vgreduce and a vgextend.

# vgreduce vg10 /dev/dsk/c1t2d3
# vgextend vg10 /dev/dsk/c1t2d3

Now doing a strings on lvmtab returns;
# strings /etc/lvmtab|grep -e"c1t2d3" -e"c2t2d3"
/dev/dsk/c2t2d3
/dev/dsk/c1t2d3

Next reboot c2t2d3 will stay primary and c1t2d3 will stay Alternate.



If it ain't broke, let me have a look at it.