Operating System - HP-UX
1825766 Members
2007 Online
109687 Solutions
New Discussion

Re: Exporting volume groups with mirrored logical volumes.

 
SOLVED
Go to solution
pap
Respected Contributor

Exporting volume groups with mirrored logical volumes.

I want to export two volume groups from one system to another. There are total approx. 14 logical volumes in both the volume groups including root vg. All the logical volumes are mirrored.
My question is if I do vgexport and then vgimport, ho can I establish mirroring on new system? Immean do I have to do mirror all the logical volumes manually or any other method???

/dev/vg00 - logical volumes lvol1 to lvol6
/dev/vg01 - logical volumes lvol1 to lvol8
all are mirrored.

Your response is highly appreciated.
-Piyush.
"Winners don't do different things , they do things differently"
8 REPLIES 8
Sanjay_6
Honored Contributor

Re: Exporting volume groups with mirrored logical volumes.

Hi Piyush,

If the disk paths are maintained as same on both the system, i.e if diskA is at path cxtydz on one system and same on the other system, your vgimport on the other system should work without any problem.

Hope this helps.

Regds
Sanjay_6
Honored Contributor
Helen French
Honored Contributor

Re: Exporting volume groups with mirrored logical volumes.

Hi,

You don't need to re-mirror it manually After vgexport and vgimport, if you have Mirror/UX installed on the new system and if the disk paths are same.

HTH,
Shiju
Life is a promise, fulfill it!
S.K. Chan
Honored Contributor
Solution

Re: Exporting volume groups with mirrored logical volumes.

Hope this helps ..

This process can be used for both scenario.
==========================================
a) Moving VG to another hardware path (within the same server).
b) Moving VG to another server.

Example you want to move vg02.
1) Umount all filesystem associate with vg02.

2) Deactivate vg02

# vgchange -a n /dev/v02

3) Remove the VG entry from /etc/lvmtab & the associated device files from the system.

# vgexport -m /tmp/mapfile /dev/vg02

Make sure you transfer a copy of /tmp/mapfile to the 2nd server (for scenario b)

4) Shutdown the systems. Move the hardware to the new server (or move hardware to a new path for scenario a). Power up system.

5) Recreate the VG (you don't have to call it vg02, it can be vg08, etc)

# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x0X0000

Note: The minor number (0x0X0000) must be unique for each volume group. Substitute X for a number not in use on the system. Use: ll /dev/*/group to see existing group files on the system. (Ex: # mknod /dev/vg02/group c 64 0x020000)

6) Import the VG info for all disks that are associated with it as follows:

# vgimport -m /tmp/mapfile /dev/vg02 /dev/dsk/pv_name1 /dev/dsk/pv_name2 ......

Note: The "pv_name" is a list each of the block device(s) corresponding to the new hardware path(s). The new device files should have been created during system start up. Use: ioscan -fn to get the new device file names if needed.

7) Activate the VG.

# vgchange -a y /dev/vg02

8) Backup the VG configuration.

# vgcfgbackup /dev/vg02
Vijeesh CTK
Trusted Contributor

Re: Exporting volume groups with mirrored logical volumes.


Hi,

what u do is u export the volume group with amap file..is ur disks in a shared array..if it is in a shared array..u can do this without any problem.

1. vgexport -p -v -m vgXX.map

and rcp the map file to the other system..deactivate the VG from this system..then
in the other system do a vg import

vgimport -m vgXX.map

then check all the things are working..

Vijeesh CTK
pap
Respected Contributor

Re: Exporting volume groups with mirrored logical volumes.

tHANKS FOR YOUR QUICK RESPONSES.
Still one question im my mind.
Will it be good to use "-s" option while exporting the volume groups?
Or Just exporting without "-s" option willl do fine?

Thanks,

-Piyush

"Winners don't do different things , they do things differently"
Sanjay_6
Honored Contributor

Re: Exporting volume groups with mirrored logical volumes.

Hi Piyush,

suggest use -s when exporting the vg. No harm in using -s option.

hope this helps.

regds
Helen French
Honored Contributor

Re: Exporting volume groups with mirrored logical volumes.

Hi,

Using '-s' is the good selection.

HTH,
Shiju
Life is a promise, fulfill it!