Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
cancel
Showing results for 
Search instead for 
Did you mean: 

vgexport

SOLVED
Go to solution
himacs
Super Advisor

vgexport

Hi Admins,

Before doing vgexport,is it required to unmount all LVs and deactive the VG using vgchange -a n VG



regards
himacs



7 REPLIES
Robert-Jan Goossens
Honored Contributor

Re: vgexport

Hi Himacs,

Yes you need to umount your filesystems and deactivate your volume group before yuo can export it.

Regards,
Robert-Jan
johnsonpk
Honored Contributor

Re: vgexport

Hello,

There is two situation where we use vgexport

A)exporting the VG from system (vg will not be available on that node until you import)##

1)You need to unmount all filesytem pertaining to that vg
#umount lvname
2) deactivate the VG
3)export vg using vgexport

B)You need the VG to be available on the node and need to import the vg in some other system by using the map file (eg:in cluster environment)

in this case You can export the VG in preview mode and you need not to unmount or deactivate the vg

vgexport -p -v -s -m

Rgds
Johnson


avizen9
Esteemed Contributor

Re: vgexport

Patrick Wallek
Honored Contributor

Re: vgexport

It depends.

Are you doing a vgexport to create a map file, or are you doing a vgexport to blow away the VG?

If you need to create a map file only, then make sure you use the '-p' switch (vgexport -vpm mapfile.vg vgname).

If you are blowing away the VG, then you definitely need to unmount all filesystems and deactivate the VG before issuing the command.
Sajjad Sahir
Honored Contributor

Re: vgexport


Dear Himacs

1.unmoun the file system
2. deactivate the volume group
vgchange -a n /dev/vgname
3. export the volume group by using vgexport

thanks and regards

Sajjad Sahir
Rahul Rai_1
Frequent Advisor
Solution

Re: vgexport

Hello Himacs,

You are absolutly wright!

we are using vgexport in two case if I am not wrong.

1)when we have to remove our vg we use vgexport to have initial configuration to reimport vg later.

2)when we have to configure same vg with same configuration on another node.

in 1st case:- umount all the LV of this VG, then deactivate and export it:

# umount /dev/vg01/lvol1
# umount /dev/vg01/lvol2
...
# vgchange -a n vg01
# vgexport vg01

in 2nd case:- just create a map file and import it on another node:

from one node:-
# vgexport -p -s -m /tmp/vgXX.map vgXX

on second node:-
# mknod /dev/vgXX/group c 64 0xXX0000
# vgimport -s -m /tmp/vgXX.map vgXX

Plz correct me if I am wrong :)

Regards,
Rahul Rai.
Basheer_2
Trusted Contributor

Re: vgexport

Hello,

I have 11.23

you DONT have to umount or vgchange

just do

vgexport -v -p -s -m /tmp/vgname.map vgname

here p is non-destructive or preserve (that means no changes are done to the vg)