Operating System - HP-UX
1844080 Members
4224 Online
110227 Solutions
New Discussion

Reverse Primary/Alternate disk links

 
SOLVED
Go to solution
jerry1
Super Advisor

Reverse Primary/Alternate disk links

I would like to reverse the order of the
primary and alternate link physical disks
listed below. How can this be done easily
or does the vg have to be destroyed and
re-created all over again along with the lv's?

--- Physical volumes ---
PV Name /dev/dsk/c46t2d1
PV Name /dev/dsk/c48t2d1 Alternate Link

PV Name /dev/dsk/c48t2d2
PV Name /dev/dsk/c46t2d2 Alternate Link
4 REPLIES 4
Torsten.
Acclaimed Contributor
Solution

Re: Reverse Primary/Alternate disk links

vgreduce the primary, LVM will switch to the alternate. vgextend the removed one and it becomes alternate.

vgreduce vgxx /dev/dsk/c46t2d1
vgextend vgxx /dev/dsk/c46t2d1

you can also use

pvchange -s

to make it the primary, but only until next reboot, not permanent.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
A. Clay Stephenson
Acclaimed Contributor

Re: Reverse Primary/Alternate disk links

There are two approaches. You can vgexport the VG and then vgimport reversing the order of the PV paths or you can do a vgreduce followed by a vgextend.

e.g.
vgreduce /dev/vgXX /dev/dsk/c46t2d1
vgextend /dev/vgXX /dev/dsk/c46t2d1

Man vgreduce, vgextend, vgexport, vgimport for details.
If it ain't broke, I can fix that.
jerry1
Super Advisor

Re: Reverse Primary/Alternate disk links

Cool. It works.

Many Thanks.
Torsten.
Acclaimed Contributor

Re: Reverse Primary/Alternate disk links

You are always welcome!

Thank you for the assigned points.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!