Operating System - HP-UX
1833847 Members
2113 Online
110063 Solutions
New Discussion

Re: Swaping a primary and alternate link to a device???

 
Brian Ruisi
Occasional Contributor

Swaping a primary and alternate link to a device???

Hi everyone, I have a question hopefully you can help with. I set up a VA7400 RAID with 6 LUNS. I then created my volume group across the six devices. It was my intention to use the c5xxxx links for devices 1,3,5 and the c10xxxx links for devices 2,4,6 as my primary links. I wanted to share the data throughput over both storage processors.

Unfortunatly, the links were created wrong. All 6 devices list the c5xxxx as the primary links and the c10xxxx as the alternate links. This was caught too late and the system is live and part of a cluster.

My question is this...Is there a way to swap the primary links and alternate links for just the three devices that are wrong? I don't want to lose all the data on the RAID already.

Any help would be apreciated.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Swaping a primary and alternate link to a device???

Hi:

This is easy and quick to do. For every *primary* link that you want to make a *secondary* (alternate) one, do:

# vgreduce /dev/vgXX /dev/dsk/cXtYdZ # ...a primary...

# vgextend /dev/vgXX /dev/dsk/cXtYdZ #...the *same* link just 'vgreduced' !!!

This promotes the secondary (alternate) to a primary when the original primary is removed. Adding the original primary back to the volume group now makes it the secondary.

Regards!

...JRF...
Sridhar Bhaskarla
Honored Contributor

Re: Swaping a primary and alternate link to a device???

Hi,

No. It is very easy. Do a vgreduce followed by a vgextend. For ex., if you want to make c10t0d0 as the primary, you would do the following,

#vgreduce vg?? /dev/dsk/c5t0d0
#vgextend vg?? /dev/dsk/c5t0d0

This will make c10t0d0 as the primary link as it's order will move up in /etc/lvmtab.

You will need to export and import the volume groups on the failover node. One way is to export and import it with -f option (Look at vgexport|vgimport man pages). Or wait until the package fails over to the other node and do the same excersize there too.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ashwani Kashyap
Honored Contributor

Re: Swaping a primary and alternate link to a device???

You can also use
#pvchange -s /dev/dsk/cxtydz , online to to make that disk as a primary link .

If you want that to become permanent ,do
#pvchange -S n /dev/dsk/cxtydz .

Do a man on pvchange for more info .
Helen French
Honored Contributor

Re: Swaping a primary and alternate link to a device???

It's easy, but you need to be careful while selecting the vgreduce and vgextend options. After doing each command, execute the vgdisplay command and make sure that you are doing the right changes.

If you see any of the VG missing an alternate link, type this command and will create the alternate link:
# vgchange -a y /dev/vg_name

Also refer this document (TKB #KBRC00001434):
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063236043
Life is a promise, fulfill it!