How to move LVM filesystem between HPUX 11.31 servers?

 

You can find steps in order to migrate the LVM filesystem between HPUX 11.31 servers.  

VG Name: vgmovetest
LV Name: lvmovetest
Mountpoint: /mnt

Check files in filesystem.

# ll /mnt/
-rw-------   1 root       sys        100000000 Nov  1 10:29 dummyfile
-rw-------   1 root       sys        500000000 Nov  1 10:29 dummyfile2
-rw-------   1 root       sys             14 Nov  1 10:30 testfile1
-rw-------   1 root       sys            205 Nov  1 10:28 testfile2

Create vg map

Create  vgmap file from the source server. In this command "-p" parameter supply just create the map file, vg does not export really.

# vgexport -v -s -p -m /tmp/vgmovetest.map vgmovetest

Copy the map file to  targets.

# scp /tmp/vgmovetest.map  root@targetsrv:/tmp/

Map the LUN from storage to targets.

Scan new disks in targets

# ioscan

Check the LUN presented to targets.

# ioscan -funNC disk

In targets, you can import the map file. 

#vgimport -m vgmovetest.map -N -v -s vgmovetest

Activate vg in targets.

# vgchange -a y vgmovetest

Mount filesystem.

# mount /dev/vgmovetest/lvmovetest /mnt

Check and compare  with source

# ll /mnt/
-rw-------   1 root       sys        100000000 Nov  1 10:29 dummyfile
-rw-------   1 root       sys        500000000 Nov  1 10:29 dummyfile2
-rw-------   1 root       sys             14 Nov  1 10:30 testfile1
-rw-------   1 root       sys            205 Nov  1 10:28 testfile2

The filesystem can be used in targets. 

 

 

1 Total Posts