Alternate link...

 
Jonathan Caplette_1
Super Advisor

Alternate link...

Hi guys,

I had to extend a VG that use Service Guard with a new drive allocated on a SAN, I did the "pvcreate /dev/rdsk/cXtXdX" and I also did a "pvcreate /dev/rdsk/cX1tX1dX1" of the "alternate path", that was my mistake... So when I did my "vgextend vgname /dev/dsk/cXtXdX" it worked fine and showed me a disk added in my VG. But when I did my "vgextend vgname /dev/dsk/cX1tX1dX1" to do my "alternate link", because I've did a pvcreate of that device before, it added a new disk instead of an "Alternate link". So I reduce the VG of the last disk (the one that suppose to be the alternate link)...

My question is how can I give back to /dev/dsk/cX1tX1dX1 the state to be the alternate link to /dev/dsk/cXtXdX instead of a new disk???

Regards
Jonathan
12 REPLIES 12
A. Clay Stephenson
Acclaimed Contributor

Re: Alternate link...

Vgextend is your boy. Man vgextend and note the section that mentions "When a pv_path refers to a physical volume already in the volume group".
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: Alternate link...

Are you ABSOLUTELY sure that the 2nd disk is the alternate link of the first? It really should not matter that you did the pvcreate on the primary and alternate paths. If the disk is an alternate path then vgextend should pick up on that automatically.

Jonathan Caplette_1
Super Advisor

Re: Alternate link...

I'm gonna check vgextend man page...

I've double checked and I'm sure that it's supposed to be the alternate path... But I'll check with the SAN team here to be pretty sure!! I'll let you know!!! any other idea will be welcome too ;)

ciao!
RolandH
Honored Contributor

Re: Alternate link...

I agree with Patrick "ARE YOU SURE THIS IS A ALTERNATE PATH"

In the moment you do a pvcreate on disk (Your alternate disk) you had just short before initialized with a pvcreate you should have received a warning.
Because it was already initialized before. So you must use the "-f" option of the pvcreate command. I can't see this in your post. So I think the second disk was uninitialized disk and not the alternate path.

Roland
Sometimes you lose and sometimes the others win
Ashwani Kashyap
Honored Contributor

Re: Alternate link...

It doesn't really matter whether you do a pvcreate on the primary or the alternate disk .
When you do a vgextend on the same physical using anither path , it should be added as an alternate link .

Most probably your second physical volume was not the same as the first one .
Mark Grant
Honored Contributor

Re: Alternate link...

I'd like to confirm whats said before. When you have an alternate path, it is exactly that i.e another path to same disk. Doing the pvcreate on the "alternate" path is exactly the same as dong it twice on the first path. It doesn't matter. These are not the same disks. Check the hardware paths. The last parts of the hardware path are probably the same if they are te same disk.
Never preceed any demonstration with anything more predictive than "watch this"
Jonathan Caplette_1
Super Advisor

Re: Alternate link...

To confirm, the last part of the hardware path is the same...

And when I did a pvcreate a the secondary path, I did it with the -f option.

Idea?
Geoff Wild
Honored Contributor

Re: Alternate link...

I agree with the rest - you pvcreated 2 different disks - alternate disk is the same as primary - you can have 4 paths to the disks - pvcreate them all - doesn't hurt - bit of a waste....

On EMC? do a syminq and verify the /dev/rdsk/cX1tX1dX1 is the same EMC Device as the other one....

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sridhar Bhaskarla
Honored Contributor

Re: Alternate link...

Hi Jonathan,

It depends on when you ran 'pvcreate' on the alternate link. Before creating the VG or after?.

If it was done before creating the VG, then you are fine. It's not going to hurt. If it still added it as a different device, then you will need to check if it is infact the alternate path.

If it was done after creating the VG, then you deleted the LVM headers of the same disk. You will need to restore them back. Take out the alternate path with vgreduce. Then do

vgcfgrestore -n vgxx /dev/rdsk/cxtxdx
vgchange -a y vgxx
vgextend vgxx /dev/dsk/cx1tx1dx1

That should get you back. If you already have the data in the VG, then back it up before you proceed.

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