Operating System - HP-UX
1847070 Members
5590 Online
110262 Solutions
New Discussion

Should I vgexport / vgimport my BCVs or just deactivate / activate ?

 
SOLVED
Go to solution
Stuart Abramson
Trusted Contributor

Should I vgexport / vgimport my BCVs or just deactivate / activate ?

I'm working at a new location. I'm looking at their BCV scripts.

I have always vgexported (on HP-UX) the BCV Volume Groups from the BCV host before I started synching, and then vgimported them after the split.

The client here only "deactivates" the BCV volume groups (vgchange -a n) before the synch and then "activates" them after the split (vgchange -a y ).

It apparently works! It's been working for some two years...

What do we think of that?
9 REPLIES 9
John Poff
Honored Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

Hi Stuart,

We've always exported/imported our BCV VGs too, but I guess it must work. Are they doing a vgchgid in there somewhere?

JP
Solution

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

This will work fine until someone adds a new lvol to the volume group... but of course a new lvol likely implies a new filesystem, so scripts would need updating anyway to handle the mounts/umounts of the new filesystems.

So I guess its horses for courses...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Steven E. Protter
Exalted Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

If it is not broke don't fix it.

It would appear that the forth response indicates its possible to break things.

So the right plan for the right situation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

That's what we do as well - only vgexport/vgimport when change to vg is made.

deactivate/activate works fine (over 3 years now for us).

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.
Devender Khatana
Honored Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

Hi,

We are using Veritas Volume Manager and do need to deport all disk groups before syncing.
Again no problems for us as well for past 3 years now.(Deporting is done through Script for all disk groups)

HTH,
Devender
Impossible itself mentions "I m possible"
Stuart Abramson
Trusted Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

Are there any PROBLEMS with doing it this way (deactivate / activate)?

For example, in the vgexport method if you reboot while the volumes are exported, HP-UX won't try to activate the VG, mount the LVs, etc. In the deactivated case, he will try to activate them, but they might be "corrupt" because who knows where they will be in the synch cycle, and you'll get an error.

If you add LVs/PVs/mount points, etc, you have to update scripts or tables in all cases.

You only need "vgchgid" if you are mounting BCVs on the same host as STDs or in a cluster connected to STDs. We're not.
Geoff Wild
Honored Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

Setup /etc/lvmrc to NOT activate...

AUTO_VG_ACTIVATE=0

Then - for any vg's you want to activate on boot - set them in

custom_vg_activation()
{
# e.g. /sbin/vgchange -a y -s
# parallel_vg_sync "/dev/vg00 /dev/vg01"
# parallel_vg_sync "/dev/vg02 /dev/vg03"
/sbin/vgchange -a y -s /dev/vg01

}

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.
Devender Khatana
Honored Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

Hi,

Yes, it is not advisable to have the
BCV to be set for auto activation.As you do not know when you server reboot(Due to any reason). If it happens during resyning then the second hosts can not open these VG's. It will through many EMS notifications showing hardware failures in accessing devices.

These should be controlled by some manual script or should be done during application start like package run in cmcluster.

HTH,
Devender
Impossible itself mentions "I m possible"
Stuart Abramson
Trusted Contributor

Re: Should I vgexport / vgimport my BCVs or just deactivate / activate ?

Thanks all. Since it seems to be working just fine every night, I'm not going to mess with it...