Operating System - HP-UX
1834800 Members
2515 Online
110070 Solutions
New Discussion

VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

 
SOLVED
Go to solution

VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

Hi,
I'm having some problems with vgexport/vgimport
utilities. I'm actually export somes VG from one node to an another one (for MCSG). It works fine the first time. But if I make some changes on one VG in the first node and try to do the vgexport/vgimport again, the vgimport returns the error on the second node "VG already exists in lvmtab".
how can I force the update of the VG on the second node ?
Anyone gots an idea ?
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

Hi:

You indicate that this is an MC/ServiceGuard configuration. Make *sure* that your 'vgimport' and 'vgexport' specifies the '-s' (shared) option.

Regards!

...JRF...

Re: VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

Thank you for your fast! reply

Actually i launched this commands on node 1 :

vgexport -p -s -m /tmp/vgdatabase.map /dev/vgdatabase
rcp /tmp/vgdatabase.map node2:/tmp

And on node 2 :
mkdir /dev/vgdatabase
mknod /dev/vgdatabase/group c 64 0x060000
vgimport -s -m /tmp/vgdatabase.map /dev/vgdatabase

It worked fine the first time but when I did some modifications on node 1 about this VG and did the same script, comes the error

In case of any modification on a VG, am I doing the right thing ?
Helen French
Honored Contributor
Solution

Re: VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

Hi,

Just a thought:

When you are running the 'vgimport' command the second time, it will give you error because it was already imported the first time.

Before importing it again, you need to export it.

HTH,
Shiju
Life is a promise, fulfill it!
A. Clay Stephenson
Acclaimed Contributor

Re: VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

Before vgimporting to the target system, you must do a vgexport first or you wiull see exactly this problem. Do a vgexport (not -p) on the second system and then do a strings /etc/lvmtab to make sure your VG is gone. You should then be able to vgimport without difficulty.

Regards, Clay
If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

Hi,

Try this,

make changes to the vg on one node and do a vgexport

vgexport -p -s -m /tmp/vm_name.map /dev/vg_name

copy this file to the other node,

rcp /tmp/vg_name.map node2:/tmp/vg_name.map

On the other node.

do a vgexport without any map option,

vgexport /dev/vg_name

Create the new directory and device files,

mkdir /dev/vg_name
mknod /dev/vg_name/group c 64 0x0n0000

Here n is the same as it is on the other node or the one it was earlier.

Now import the new map file,

vgimport -s -m /tmp/vg_name.map /dev/vg_name

activate the vg in exclusive mode and see if it works,

vgchange -a e /dev/vg_name

Your cluster serivices should be running on the node.

Hope this helps.

Regds

Re: VGIMPORT returns the error "VG xx already exists in the /etc/lvmtab"

Yes, the command on node 2 vgexport VGxx clears the /etc/lvmtab. Vgimport can be used after and it works.

Thank you very much !