1834518 Members
2126 Online
110068 Solutions
New Discussion

Re: vgexport and import

 
SOLVED
Go to solution
Andrea Carpani
Occasional Contributor

vgexport and import

Hi everybody: here's something quick for you.
I had a vg with 2 lv shared in exclusive mode in a 2 servers clustered environment.
I've removed one of the lv and I've created a new vg with this lv in it. All looks good on server1. What should I do on server2? Do I have to vgexport and vgimport both vg?
6 REPLIES 6
Fred.Wu
Frequent Advisor

Re: vgexport and import

sure,you should do that
fred
Armin Feller
Honored Contributor
Solution

Re: vgexport and import

Hi,

yes you have to do this.

current node:
# vgexport -m /tmp/vgXY.map -s /dev/vgXY

(for both VGs)

other node:
# vgexport vgXY
# mkdir /dev/vgXY
# mknod /dev/vgXY/group c 64 0x??0000
keep in mind the minor number, it must be unigue

# rcp :/tmp/vgXY.map /tmp/
# vgimport -m /tmp/vgXY.map vgXY

(for both VGs)

That should update the LVM config on the other node and all shoud be fine again.

Regards ...
Armin
Andrea Carpani
Occasional Contributor

Re: vgexport and import

Ok, here's a followup...
on server2 I get a warning about the first vg being already there.... what should I do?
Fred.Wu
Frequent Advisor

Re: vgexport and import

you should run
vgexport
first on node2
fred
Armin Feller
Honored Contributor

Re: vgexport and import

Hi,

I'd made a mistake in my first discribtion. You have to use the (-p) option by vgexport on the current node ;-( sorry.

Your question now:
Please check the minor number of the group device, it has to be unique

# ll /dev/*/group

and you have first to vgexport the existing volume group on the other node befor re-importing it.

Regards ...
Armin
Fred.Wu
Frequent Advisor

Re: vgexport and import

the command is like this:
vgexort -s -p -m /tmp/vgX.map /dev/vgX

rcp to the other node

other node:
vgimport -s -m /tmp/vgX.map /dev/vgX /dev/dsk/cxtydz(the PV included in vgX)
fred