Operating System - HP-UX
1834017 Members
2544 Online
110063 Solutions
New Discussion

Re: Primary and alternate link ids

 
SOLVED
Go to solution
Vincent Farrugia
Honored Contributor

Primary and alternate link ids

Hello,

When we have a pvlink situation, if the primary link id is lower than the alternate link id, will there be any issues involved?

Also, if the primary link fails and it switches to the alternate link, when the primary link is available again, does it switch back to the original primary link? Or the once alternate link becomes primary and the once primary link becomes alternate?

Vince
Tape Drives RULE!!!
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: Primary and alternate link ids

Hi Vincent:

It matters not which device represents the primary link.

On 11.x, the value of 'autoswitch' determines whether or not pvlinks will switch from the alternate (when used) back to the primary (when it becomes available again).

You can set or reset this behavior with:

# pvchange -S y|n

See the man pages for 'pvchange' for more information.

Regards!

...JRF...
Steve Faidley
Valued Contributor

Re: Primary and alternate link ids

While Alt-Pri links do not matter to LVM, they can matter to your performance and throughput.
If you have a VG vg01 with 4 PV's (EMC numbering shown);
c1t1d0,c1t1d2,c1t1d3,c1t1d4
and 4 Alt links;
c2t1d0,c2t1d1,c2t1d2,c2t1d3

If all the c1 PV's are the primaries then all your disk I/O traffic will flow through only one controller (c1). You can spread out controller I/O by setting half of the PV's to be primary on the other controller.

Short term solution is to use;
pvchange -s /dev/dsk/c2t1d1
pvchange -s /dev/dsk/c2t1d3

The small "s" will move I/O to the c2 controller until;
1. Controller 2 fails, and I/O is redirected to Controller 1
2. Next reboot

To keep I/O on the c2 controller after a reboot you need to take additional steps.
At boot Pri/Alt paths are determined by the order that they are found in /etc/lvmtab.
In order to change the order they are in you need to remove them and add them back in.
In this example above, once you have moved Primary I/O to the secondary controller for d1 & d3 you can safly remove and add the "c1" PV's like;
vgreduce /dev/v01 /dev/dsk/c1t1d1
vgextend /dev/vg01 /dev/dsk/c1t1d1
vgreduce /dev/vg01 /dev/dsk/c1t1d3
vgextend /dev/vg01 /dev/dsk/c1t1d3

Now if you do a strings on /etc/lvmtab you will see that c2t1d1 comes before c1t1d1 so at reboot c2t1d1 will be primary.



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