LVM and VxVM

Why do I need to vgexport after split off BCV's, and vgimport before mount them

 
Hanry Zhou
Super Advisor

Why do I need to vgexport after split off BCV's, and vgimport before mount them

Is there any device names change here? and why?

I thought the device files for BCV should be always the same on the backup server.
none
6 REPLIES 6
Geoff Wild
Honored Contributor

Re: Why do I need to vgexport after split off BCV's, and vgimport before mount them

You don't need to vgexport/vgimport - unless the vg has changed (IE added more disks).

We do the same here - backup server splits the bcv's and mounts them locally.

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.
Hanry Zhou
Super Advisor

Re: Why do I need to vgexport after split off BCV's, and vgimport before mount them

I know what you are saying.

But, in reality, not only here, also I saw a lot of cases people would do vgexport and vgimport, there got to be some reasons behind?

Please check out this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=540089
none
Geoff Wild
Honored Contributor

Re: Why do I need to vgexport after split off BCV's, and vgimport before mount them

Yeah - I read and remember that one...

Like I said - you only need to do the vgexport (from server with standards) and vgimport (on the backup server) the first time.

After that, you only need to do the split, vgchange -a y, and mount - then reverse after you are done (unmount, vgchange -a n, sync (or sync at a predetermined time).

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.
Chan 007
Honored Contributor

Re: Why do I need to vgexport after split off BCV's, and vgimport before mount them

Hi,

Best reason for doing that is to ensure that you have the very best copy of the data.

e.g if you export your vg means all your old data is flushed and import it makes a very fresh copy of the data.

Which is highly recomended by many DR/BC consultants. Thats is the reason.

Also by doing that you can ensure that the system level problems are NIL in the event of real time DR/BC

I got this from one book on DR I don't remember, as that was my project...

Cheers ...007
Gary L. Paveza, Jr.
Trusted Contributor

Re: Why do I need to vgexport after split off BCV's, and vgimport before mount them

When I faced this issue, it was told to me that the main reason to vgexport and vgimport at each split is that it eliminates the need to manually make sure the volume group configuration is correct on the alternate host. You basically have two options:

1). Manually ensure that everytime you modify the volume group, you do a vgexport and vgimport.

2). Automatically vgexport/vgimport at each split.

Which you do is up to you. #1 takes more disipline as you need to make sure it's done when needed.
Jim Mallett
Honored Contributor

Re: Why do I need to vgexport after split off BCV's, and vgimport before mount them

We're doing the same thing here. I didn't write our sync and split/mount scripts but I have been over them in detail. My "assumption" all along has been that the integral part in the split/mount was the vgchgid, because when the BCVs were established they would take on the VGID of the STD device.

Or so I thought until I read Geoff's response, which I'm sure works.

I guess I didn't add much to this, I just really thought the vgchgid was critical before the mount.

Jim
Hindsight is 20/20