cancel
Showing results for 
Search instead for 
Did you mean: 

Command to check Primary Node in 4 node CFS Cluster

Rajan_Iyer
Level 4
Certified

Hi,

In my environment we have 4 node  CFS Cluster.

In the same ref. I would like to know primary one, plese let me know the same.

In the same ref. I have checked below commands.

fsclustadm -v showprimary [Mount Point] --------------------It says node 1 is primary.

While checking fsclustadm -v getpolicy [Mount Point]----------------------It shows nothing.

Please let me know is there any other way to check the Primary Node.

 

Please suggest.

 

Thanks

Rajan

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

mikebounds
Level 6
Partner Accredited

If you shutdown VCS on a node it is all sorted out for you - i.e any filesystems that are primary will have the primary role switched to another node in the cluster (when they are umounted) and the node will leave CVM membership when the cvm service group is offlined, meaning another node will take on the master role.

Mike

View solution in original post

9 REPLIES 9

mikebounds
Level 6
Partner Accredited

fsclustadm -v showprimary [Mount Point] is the correct syntax for finding out the primary for a filesystem, however this is per filesystem, so different filesystems could have different primaries.

So above is command for CFS (filesystem) so if one node writes more than the others to a particular filesystem then you should make that the primary for that filesystem.  So for instance, if you have a failover application as oppose to a parallel application, then when the application fails over in VCS you should set the primaries for the filesystems when it failovers, for example by using a postonline trigger.

There is also Master and Slaves for CVM (volume manager) and this is per cluster, not per filesystem, so one node will be primary for ALL volumes and this is the node where you need to create and modify volumes.  Command "vxdctl -c mode", will show you which node is the master.

Mike

Rajan_Iyer
Level 4
Certified

Hi Mike,

 

Thanks for your help.

In my case I would like to know below points.

In our environment we are using CFS for ParalleApplication.

We are going to upgrade firmware activity in two of the servers, so I would like to know

 

1. What command I have to use to check Master Node in current situation, as below command does not shows any error or result.

fsclustadm -v getpolicy [Mount Point]

2. Do I need to change the primary node manually in case activity will going to be performed on current Master Node. with below command

 

fsclustadm -v setpolicy

 

3. After changing the Master role how to ensure whether which is Master One.

 

Thanks

Rajan

 

 

 

DMadhavan
Level 3
Try vxdctl -c mode

Rajan_Iyer
Level 4
Certified

Hi Madhavan,

I have tried the same command in all nodes but it displays its own name in respective node, which is bit confusing.

i.e. in Node 1 - command returns value node1

         Node 2 - command returns value node2

 

 

Thanks

Rajan

DMadhavan
Level 3
/usr/lib/vxvm/bin/vxclustadm -v nodestate Then fsclustadm -v idtoname :- for id to name output Pls share the cluster info as well. Output of hastatus -sum if cvm under VCS/gab.

Rajan_Iyer
Level 4
Certified

Hi Madhavan,

 

Thanks for your reply.

Now I got the Master Node.

 

Would you please suggest what is the command to change the role of master to another node.

 

Thanks

Rajan

 

Rajan_Iyer
Level 4
Certified

Hi

Also please let me know in case of we are doing patch upgrade on Master server is there any command to execute so that we can change the role of the master to other server.

 

Else CFS will take care of the same.

 

Please suggest.

 

Thanks

Rajan

 

mikebounds
Level 6
Partner Accredited

If you shutdown VCS on a node it is all sorted out for you - i.e any filesystems that are primary will have the primary role switched to another node in the cluster (when they are umounted) and the node will leave CVM membership when the cvm service group is offlined, meaning another node will take on the master role.

Mike

Rajan_Iyer
Level 4
Certified

Hi Mike

Thanks

 Rajan