Wednesday, January 6, 2016

Migrating Volume Groups (VGs) from one system to another system


The storage (LUNs) are published commonly on both servers.
These LUNs and VGs will be visible on both servers but will be activated on one server at a time.

Make sure that the VGs are not mounted on both servers at a time which will likely to lead to the data corruption.

Assuming that the LUNs have been detected on both servers and PV, VG and LVs have been created initially on one server.
Also the LVs are mounted on one server.

Process:
Unmount all Logical Volumes on Volume Group with umount command.
# umount /mount/point

Deactivate Volume group
# vgchange –an <VGname>

Export Volume group
# vgexport <VGname>

Now disk is ready to be removed from system.
Run following command to check the exported status:
# vgs

The command output will show "x" under the ATTRIB column.

Now, on other server, check the exported VG:

Scan Volume Group
# vgscan

The above command will show the exported Volume Group.

Import Volume Group on another system
# vgimport <VGname>

Activate imported Volume Group
# vgchange –ay <VGname>

Scan Logical volume
#lvscan

Mount Logical Volume.

No comments:

Post a Comment