Friday, February 3, 2017

Changing the CVM master manually




You can change the CVM master manually from one node in the cluster to another node, while the cluster is online. CVM migrates the master node, and reconfigures the cluster.

Symantec recommends that you switch the master when the cluster is not handling VxVM configuration changes or cluster reconfiguration operations. In most cases, CVM aborts the operation to change the master, if CVM detects that any configuration changes are occurring in the VxVM or the cluster. After the master change operation starts reconfiguring the cluster, other commands that require configuration changes will fail.

See Errors during CVM master switching.

To change the master online, the cluster must be cluster protocol version 100 or greater.

To change the CVM master manually

To view the current master, use one of the following commands:

# vxclustadm nidmap
Name              CVM Nid    CM Nid    State
system01            0        0         Joined: Slave
system02            1          1         Joined: Master
# vxdctl -c mode
mode: enabled: cluster active - MASTER
master: system02
In this example, the CVM master is system02.

From any node on the cluster, run the following command to change the CVM master:

# vxclustadm setmaster nodename
where nodename specifies the name of the new CVM master.

The following example shows changing the master on a cluster from system02 to system01:

# vxclustadm setmaster system01
To monitor the master switching, use the following command:

# vxclustadm -v nodestate
 state: cluster member
        nodeId=0
        masterId=0
        neighborId=1
        members[0]=0xf
        joiners[0]=0x0
        leavers[0]=0x0
        members[1]=0x0
        joiners[1]=0x0
        leavers[1]=0x0
        reconfig_seqnum=0x9f9767
        vxfen=off
state: master switching in progress
reconfig: vxconfigd in join
In this example, the state indicates that master is being changed.

To verify whether the master has successfully changed, use one of the following commands:

# vxclustadm nidmap
Name              CVM Nid    CM Nid    State
system01            0        0         Joined: Master
system02            1         1         Joined: Slave
# vxdctl -c mode
mode: enabled: cluster active - MASTER

master: system01

No comments:

Post a Comment