1832455 Members
3314 Online
110043 Solutions
New Discussion

vgchgid command

 
John Jimenez
Super Advisor

vgchgid command

I have an RP7420 on a EMC CLARiiON. I am trying to utilize snap clone on a 200 gig Volume group that is on two 100 gig LUNS. The tricky part is that I am doing the snap clone from and to the same host

Here is my procedure so far, that is not working. I am trying to snap clone source vg02 to vg20.

1) I unmount and deactivate vg20
2) I snap clone vg02 to vg20 (took about 4.5 hours, which seems like a long time). LUN 0 (raidgroup3) to LUN 200 (raidgroup5). LUN 1 (raidgroup4) to LUN 201 (raidgroup6).
3) I tried to vgchgid but it will not take. It was mentioned that I need to vgexport, but I do not see any mention of this on the man pages. Also, if I do need to vgexport, does anyone know what options I need to use?

Any input is greatly appreciated.
Hustle Makes things happen
11 REPLIES 11
skt_skt
Honored Contributor

Re: vgchgid command

could u mention the exact command?Looks like your commands picks the source disks too which is part of the vg02 now
Kevin Wright
Honored Contributor

Re: vgchgid command

yes, vgexport. No specific options required.
John Jimenez
Super Advisor

Re: vgchgid command

Santhosh,
Here is the message I get when I vgchgid one of the disks with vg20 unmounted and deactivated, without vgexporting it. what is funny is that when I do the other LUN I just get the prompt back. Does it look like it worked for one and not the other?

=> #vgchgid /dev/rdsk/c43t9d4
vgchgid: disk "/dev/rdsk/c43t9d4" is already in vg "/dev/vg20".
RP7410:root /
=> #vgchgid /dev/rdsk/c44t9d3
RP7410:root /
Hustle Makes things happen
John Jimenez
Super Advisor

Re: vgchgid command

Kevin,
The only time I use vgexport in the past, is to get rid of volume groups. But in this case won't I need to gvimport it after the vgchgid? If I use no optiond isn't it gone?
Hustle Makes things happen
skt_skt
Honored Contributor

Re: vgchgid command

vgexport vg20
vgchgid disklist
vgimport vg20
John Jimenez
Super Advisor

Re: vgchgid command

Something funky going on here. It thinks that they are in seperate volume groups when they are not. something must be corrupted in one of them. I typoed at the beginning. I am using LUN 203 and LUN 204 for the clone. I just double checked and we are using LUN 203 c44t9d3 and LUN 204 C43t9d4. but this is what I get after vgexporting it. Maybe I should start all over with new LUN numbers and a different volume group besides vg20?

=> #vgchgid /dev/rdsk/c44t9d3 /dev/rdsk/c43t9d4
vgchgid: physical volume "/dev/rdsk/c44t9d3" and "/dev/rdsk/c43t9d4" do not belong to the same volume group.
Hustle Makes things happen
Mridul Shrivastava
Honored Contributor

Re: vgchgid command

When u executed vgchgid on #vgchgid /dev/rdsk/c44t9d3 it was successful , hence the ID got changed, however on the other disk it failed..

So now it is behacing the way it should since both the disk contain different vgid hence system see them as part of two difference VGs.
Time has a wonderful way of weeding out the trivial
John Jimenez
Super Advisor

Re: vgchgid command

So the command always has to be done at the exact same time. But even if I include both raw disks in the same command, is'nt there a chance that it will be off by a second and mess it up. In the meantime, I have removed the LUN alltogether, rebooted the server, and starting the procedure over. I will let you know how it goes this time when it is done.
Hustle Makes things happen
skt_skt
Honored Contributor

Re: vgchgid command

make sure to execute the vgchgid in a single shot for all the disk from vg20.there should not be any issue if your LUN list(source & dest) is perfect
A. Clay Stephenson
Acclaimed Contributor

Re: vgchgid command

>>> So the command always has to be done at the exact same time. But even if I include both raw disks in the same command, is'nt there a chance that it will be off by a second and mess it up. In the meantime, I have removed the LUN alltogether, rebooted the server, and starting the procedure over. I will let you know how it goes this time when it is done.

It would, of course, be all but impossible to actually write the data to multiple disks at the same time but that is not necessary. What is necessary is that all the PV's that are to form a volume group be included in the same vgchgid command. Vgchgid generates a new unique VGID each time it is run so if you run the command separately for each PV then each will get a different VGID and vgimport will tell you that "that dog won't hunt" --- or a similar error message,
If it ain't broke, I can fix that.
tkc
Esteemed Contributor

Re: vgchgid command

i was wondering if you will need to run vgcfgbackup after snap cloning the vg02 to vg20. this will make sure your vg20 which has been changed after the snap clone its configuration is being updated in the system.