Monday, June 25, 2012

How to mount logical volume from another node in the cluster

Stop using the logical volume in the first node.

# umount 
# varyoffvg


Import the disk at node 2


# importvg -L
# varyonvg

Pls Note

The 'L' option takes a volume group and learns about possible changes performed to that volume group. Any new logical volumes created as a result of this command emulate the ownership, group identification, and permissions of the /dev special file for the volume group listed in the -y flag. The -L flag performs the functional equivalent of the -F and -n flags during execution.

Restrictions:

    * The volume group must not be in an active state on the system executing the -L flag.
    * The volume group's disks must be unlocked on all systems that have the volume group varied on and operational. Volume groups and their disks may be unlocked, remain active and used via the varyonvg -b -u command.
    * The physical volume name provided must be of a good and known state, the disk named may not be in the missing or removed state.
    * If a logical volume name clash is detected, the command will fail. Unlike the basic importvg actions, clashing logical volume names will not be renamed.





 

Extra Info:

The steps also assume that the Major number on both nodes are the same. Otherwise, please watch potential issue when importing the VG into the node 2. You can check for next available major number using 'lvlstmajor' command.
h4. Now the LVs can be mounted and use.

# mount

If you have configured powerHA, this should be taken care of and transparent when doing a switch over. The steps above is the crude and manual way of doing what powerHA can do.

No comments: