Operating System - HP-UX
1834604 Members
4346 Online
110069 Solutions
New Discussion

Alternate link for disk: I want to switch this config

 
malki_3
Frequent Advisor

Alternate link for disk: I want to switch this config

Hello everybody
I have a special configuration on one volum group that I want to improve
vgdisplay vg01
--- Volumes physiques ---
PV name /dev/dsk/c5t0d0
PV name /dev/dsk/c6t0d0 Alternate link
VG name /dev/vg01
..etc
With this configuration I have the second controller not used. It will be actived only when I have a problem with my first link (principal) (correct me if i said mistak)
What I need to do : changing the configuration for this link for possibiliy of load balancing
over two links

--- Volumes physiques ---
PV name /dev/dsk/c6t0d0 Alternate link
PV name /dev/dsk/c5t0d0
VG name /dev/vg01
thinks for yours requests
5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor

Re: Alternate link for disk: I want to switch this config

Hi Malki,

You can use pvchange to change the behaviour temporarily. To make it permanent do a sequence of vgreduce and vgextend on each primary disk that you want to convert to alternate. In your case, you would do

#vgreduce vg01 /dev/dsk/c5t0d0
#vgextend vg01 /dev/dsk/c5t0d0

This will make c6t0d0 as the primary.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: Alternate link for disk: I want to switch this config

Hi malki,

What you should first do is back it up to be safe - twice would be better
Then what you should do is create the map file - again to be safe
vgexport -m vg01.map /dev/vg01
Then reduce out the current primary vgreduce /dev/vg01 /dev/dsk/c5....
Then re-add the primary - it will now be the alt
vgextend /dev/vg01 /dev/dsk/c5....
Then recreate the map file to reflect the new config
vgexport -m vg01.mapfile vg01

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James R. Ferguson
Acclaimed Contributor

Re: Alternate link for disk: I want to switch this config

Hi:

Switching alternate (pv) links can be done quite quickly. Simply 'vgreduce' the primary link. This will promote the secondary link to a primary. Then, 'vgextend' (back) the original primary link. It will become the secondary.

# vgreduce /dev/vg01 /dev/dsk/c5t0d0
# vgextend /dev/vg01 /dev/dsk/c560d0

Regards!

...JRF...
Dan Yeatman
Advisor

Re: Alternate link for disk: I want to switch this config

You can use this method

# vgreduce /dev/vg01 /dev/dsk/c5t0d0
# vgextend /dev/vg01 /dev/dsk/c5t0d0

LVM determines the order - which device file is the primary path and which are the alternate(s) - based on the order the device files are listed in the /etc/lvmtab file. This is a binary file, however the file can be viewed using the "strings /etc/lvmtab" command.

OR using pvchange to temporarily change it

Manually switch a physical volume to use another controller path:

pvchange -s /dev/dsk/c6t0d0

To avoid the possibility of LVM switching back to the primary path, an additional command (called the "autoswitch" flag) can be executed:

pvchange -S n /dev/dsk/c6t0d0

When set to "n" (meaning "no"), LVM will NOT switch back to the primary path

Once the problem is resolved, a "pvchange -S y" will need to be executed to enable "autoswitch" feature for each device that had the autoswitch disabled.

Use "pvdisplay " to view the status of the autoswitch flag as well as other information about the physical volume status.


pvdisplay /dev/dsk/c6t0d0
--- Physical volumes ---
PV Name /dev/dsk/c6t0d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 8
PE Size (Mbytes) 4
Total PE 4340
Free PE 3022
Allocated PE 1318
Stale PE 0
IO Timeout (Seconds) default
>>>>>>Autoswitch On


Sanjay_6
Honored Contributor

Re: Alternate link for disk: I want to switch this config

Hi Malki,

There is no benefit. LVM does not do load balancing using alternate links. There would be no benefit. you can still change the links from primary to alternate by doing a vgreduce and then a vgextend.

http://us-support.external.hp.com/cki/bin/doc.pl/sid=9f9738c915f1e3167a/screen=ckiDisplayDocument?docId=200000058669314

Hope this helps.

Regds