Operating System - HP-UX
1832901 Members
2919 Online
110048 Solutions
New Discussion

vgexport on active volume group

 
SOLVED
Go to solution
Coolmar
Esteemed Contributor

vgexport on active volume group

Hi,

Is it possible to do a vgexport on an active volume group, or do you have to vgchange -a n ; then vgexport; and then vgchange -a y to make it active again? I thought it could be done on the fly but am not sure.

Thanks
8 REPLIES 8
RAC_1
Honored Contributor

Re: vgexport on active volume group

You will have to deactivate it first.
But activate it again after vgexport?? (Unless you do with -p option.)

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: vgexport on active volume group

It depends. If you want to do a "real" vgexport then the vg must not be active; however, if you want to do a preview to create a mapfile then that can be done.

For example,
vgexport -p -m /tmp/vg02.map /dev/vg02 will
create the mapfile for possible transfer to another system but the vg will not actually be exported.
If it ain't broke, I can fix that.
Coolmar
Esteemed Contributor

Re: vgexport on active volume group

Yes, I just want to create a map file. We have some systems with JBODS that are old and starting to die. I want to be able to move the JBODS to another machine and then just do a vgimport with the map file that I am exporting every once in a while (to another system).

Thanks
Rick Garland
Honored Contributor

Re: vgexport on active volume group

It is best if you "vgchange -a n" the volume groups in question. Always best if you have "quiet" time.
Coolmar
Esteemed Contributor

Re: vgexport on active volume group

Rick - I plan on doing it in the wee hours, where there is virtually no activity anyway. Is that what you mean?
A. Clay Stephenson
Acclaimed Contributor

Re: vgexport on active volume group

Bear in mind for your purposes, nothing more than a vgdisplay -v /dev/vg02 > myfile will suffice. It should be part of your standard cronjobs coupled possibly with an lp command of your file so that you have a hardcopy for files or offsite storage. Given that data, it's then trivially easy to vgimport your disks. Bear in mind, all of the metadata resides on the disks themselves. It's always a good idea to physically label each disk
with something like:
myhost vg02-disk1mirror c1t4d0 SN SGS10R1456
so that it is very difficult to mix up the disks when moved.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: vgexport on active volume group

You can do a 'vgexport -m mapfilename.map -v -s -p vg??' while the VG's are active with absolutely no problem whatsoever.

I wouldn't worry about waiting until the wee hours to do it.
Kevin Wright
Honored Contributor

Re: vgexport on active volume group

yes, ensure you use -s, as this will keep put the PVID in the map file, import with -s and the system will scan the disks looking for a match.

there is no reason to be concerned about system activity to export a VG, it makes no difference.