Operating System - HP-UX
1819915 Members
2509 Online
109607 Solutions
New Discussion юеВ

vgimport/vgexport with SAN disks

 
SOLVED
Go to solution
Inesa Clinko
Advisor

vgimport/vgexport with SAN disks

Please help me to move 1VG, consist of 2PVs /based on SAN storage/ between 2 systems
A and B. I know, that I need to vgexport/vgimport this VG between these systems. But I will see PVs on different hardware addresses on both systems. How
I could handle with this?
3 REPLIES 3
Yang Qin_1
Honored Contributor
Solution

Re: vgimport/vgexport with SAN disks

Hi, if those two servers connect to storage box via the same fibaric switch. Them the only change for those device files is "c" number, "t" number and "d" number will remain the same.

1. Before you do the vgexport on A run vgdisplay -v vg## > vg##.out and transfer vg##.out to B. You may also run "strings /etc/lvmtab" and copy the information for the VG you want to transfer, past to a file on B.

2. run "vgexport -p -m vg##.map vg##" on A and transfer vg##.map to B

3. "umount" all file systems from that VG on A. If it is possible assign the LUNs to B before remove them from A. run "ioscan -fnCdisk" and "insf -e" on B. Compare the newly created device files with the ones in vg##.out and make sure you have all device files with the same "t" and "d" numbers on B

4. run "vgchange -a n /dev/vg##" and "vgexport /dev/vg##" on A.

5. run "mkdir /dev/vg##" and "mknod /dev/vg##/group c 64 0x##0000" on B

6. run "vgimport -m vg##.map /dev/vg## /dev/dsk/c#t#d# /dev/c#t#d# ..." where c#t#d# are device files generated on B with the same "t#d#" as on A but different "c#".

7. if you have problem to mount all file systems after "vgchange -a y" on B, you can run fsck for each lvol and try to mount them again.


Yang
Luk Vandenbussche
Honored Contributor

Re: vgimport/vgexport with SAN disks

Orhan Biyiklioglu
Respected Contributor

Re: vgimport/vgexport with SAN disks

Hi,
-s option of the vgimport/vgexport commands can do the trick.

1. Run
vgexport -v -s -p -m vgname.map vgname
on host A.
This will genarate a map file which contains the "Volume Group Identifier"
on the first line.
2. Umount/ un present the virtual disks from A
3. Present The Virtual disks to B
4. Copy the map file from A to B
5. Complete preliminary vg creation tasks
mkdir /dev/vgname
mknod /dev/vgname/group c 64 0x0?0000
6. Run
vgimport -v -s -m vgname.map vgname

Since the map file contains the "Volume Group Identifier" the vgimport command will search all disk devices and import the volume group on the disks which have the same identifier.

hth.