1833758 Members
2438 Online
110063 Solutions
New Discussion

vgimport problem

 
Jolly Kalayil
Occasional Contributor

vgimport problem

I have system A and b. System A is having vg name vg02 and system B is also. I wanted to Import vg02 on SYSTEM B but as different VG name. Is it possible ?
5 REPLIES 5
RAC_1
Honored Contributor

Re: vgimport problem

Yes, it is possible.

On system A
vgexport -pv -m /tmp/vg02.map -f /tmp/vg02.conf vg02
transfer the file /tmp/vg02.map and /tmp/vg02.conf to system B

On system B

mkdir /dev/vgxx (choose vg name as you want)
mkdir /dev/vgxx/group c 64 0x0y0000
oy-uniq minor id for your vg. Make sure it is not used anywhere in you configuration.

vgimport -pv -m /tmp/vg02.map -f /tmp/vg01.conf vgxx
If everything is OK, then

vgimport -pv -m /tmp/vg02.map -f /tmp/vg01.conf vgxx
There is no substitute to HARDWORK
Tim Nelson
Honored Contributor

Re: vgimport problem

Are you physically moving the disks from system A to system B ?

If so then you will have to get them out of system A's configs or system A will start complaining about the remove disk.
On system A.
dismount all lvols
vgchange -a n /dev/vg02
vgexport -m /tmp/vg02.map

copy /tmp/vg02.map to system B

On system B
mkdir /dev/vgabc
mkdnod /dev/vgabc/group c 64 0x##0000 ( ## some unique number lower than maxvgs setting in kernel, i.e. 0x050000)
vgimport -m /tmp/vg02.map /dev/vgabc /dev/dsk/cxtxdx /dev/dsk/cxtxdx

The example mentioned by RAC assumes that the device files are the same for the storage on system A and system B.


Also the -p switch on the vgimport will only execute in preview mode. Drop the -p in order to actually execute.

Tim Nelson
Honored Contributor

Re: vgimport problem

and the last couple steps so you can use the new vg

vgchange -a y /dev/vgabc

vgdisplay /dev/vgabc to check on everything.

then mount your filesystems as you wish.
Torsten.
Acclaimed Contributor

Re: vgimport problem

Hi Jolly,

you can do this using the steps from above posting.
The argument "-p" is the preview option for both commands, in combination with vgexport it prevents the remove of that vg from this system. I guess you have to leave out this with vgimport.

Make sure that this vg is NOT activated by 2 hosts at the same time for write access.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: vgimport problem

PS: the "above posting" in my last reply refers to the first posting

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!