1854706 Members
10740 Online
104102 Solutions
New Discussion

Re: 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
A. Clay Stephenson
Acclaimed Contributor

Re: Alternate link...

I read your question to mean that you did two pvcreate operations; the 2nd unnecessary one was done on what you thought was an alternate link but was, in fact, a different disk/LUN. You then did a vgreduce to remove the "alternate path" which was really a 2nd disk. You can now do a vgextend using the correct alternate path and all will be well.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: Alternate link...

When you vgcreate, do you do something like this?

mkdir /dev/vg36
mknod /dev/vg36/group c 64 0x240000
vgcreate -s 8 -p 128 /dev/vg36 /dev/dsk/c5t3d4 /dev/dsk/c9t3d4 /dev/dsk/c4t3d4 /dev/dsk/c7t3d4 /dev/dsk/c5t3d5 /dev/dsk/c9t3d5 /dev/dsk/c4t3d5 /dev/dsk/c7t3d5

vgchange -a y vg36

# vgdisplay -v vg36
--- Volume groups ---
VG Name /dev/vg36
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 128
Cur PV 2
Act PV 2
Max PE per PV 4315
VGDA 4
PE Size (Mbytes) 8
Total PE 8628
Alloc PE 0
Free PE 8628
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


PV Name /dev/dsk/c5t3d4
PV Name /dev/dsk/c9t3d4 Alternate Link
PV Name /dev/dsk/c4t3d4 Alternate Link
PV Name /dev/dsk/c7t3d4 Alternate Link
PV Status available
Total PE 4314
Free PE 0
Autoswitch On

PV Name /dev/dsk/c5t3d5
PV Name /dev/dsk/c9t3d5 Alternate Link
PV Name /dev/dsk/c4t3d5 Alternate Link
PV Name /dev/dsk/c7t3d5 Alternate Link
PV Status available
Total PE 4314
Free PE 0
Autoswitch On
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.
Sundar_7
Honored Contributor

Re: Alternate link...

Hi Jonathan,

are your disks in an EMC enclosure ? do u have inq command in ur system ?

If you have inq, try running the command and if both the device files u r interested refer to the same EMC volume then you can be sure that they are just alternate paths to the same LUN.

As Sri rightly pointed out, if both the device files are pointing to the same LUN and u did pvcreate after adding the PV to the VG then u effectively wiped off the LVM header from the PV. You need to restore the LVM headers to the PV.

If the PVID of any of the PV that is already part of the VG matches with the PVID of the PV you are trying to add (using vgextend) then this PV will be added as an alternate link.

# vgcfgrestore -n vgname /dev/dsk/c#t#d#

# vgchange -a y /dev/vgname

now try a pvcreate on the alternate link

# pvcreate /dev/dsk/c#1t#1d#1

If it says the PV is already part of some VG then execute the follwing commands to extract the PVID from both the disks to confirm both are referring to the same LUN

# echo "0x2008?4D" | adb /dev/dsk/c#t#d#

# echo "0x2008?4D" | adb /dev/dsk/c#1t#1d#1

if the above output is similar for both the device files then try a vgextend.

# vgextend /dev/vgname /dev/dsk/c#1t#1d#1

Sundar.
Learn What to do ,How to do and more importantly When to do ?