Wise people learn when they can; fools learn when they must - Arthur Wellesley

Sunday, 19 March 2017

VCS ON RHEL6–CONFIGURE & OPERATION-P8 (CLUSTER OPERATIONS)


VCS ON RHEL6–CONFIGURE & OPERATION-P8


CLUSTER OPERATIONS:

How to display info about cluster…?
How to check the state of cluster…?
How to list the existing cluster(s)…?
How to display the attribute value…?
How to check the status of cluster…?
How to add a cluster…?
How to delete a cluster…?
How to modify a cluster attribute…?
How to start a cluster…?
How to stop a cluster…?
How to know the status summary of cluster(s)…?
How to know the vcs version…?

How to display info about cluster…?

[root@pr01 ~]# haclus -display
#Attribute             Value
AdministratorGroups
Administrators         admin
AutoAddSystemToCSG     1
AutoStartTimeout       150
BackupInterval         5
CID                    {9935f2d4-1dd1-11b2-b6a0-277963518953}
ClusState              RUNNING
ClusterAddress
ClusterLocation
ClusterName            cluster1
ClusterOwner
=====================O/P Removed==========================

How to check the state of cluster…?

[root@pr01 ~]# haclus -state
#Cluster     Attribute              Value
cluster1     ClusState              RUNNING

How to list the existing cluster(s)…?

[root@pr01 ~]# haclus -list
cluster1

How to display the attribute value…?

[root@pr01 ~]# haclus -value ProcessClass
TS
[root@pr01 ~]# haclus -value UseFence
NONE
[root@pr01 ~]# haclus -value UserNames
admin
[root@pr01 ~]# haclus -value BackupInterval
5

How to check the status of cluster…?

[root@pr01 ~]# haclus -status
VCS INFO V-16-1-50410 No cluster is in the faulted state or no group in the faul          ted cluster needs any corrective action.

How to modify a cluster attribute…?

[root@pr01 ~]# haclus -modify LogClusterUUID 1
VCS WARNING V-16-1-11335 Configuration must be ReadWrite : Use haconf –makerw


How to add/delete a cluster…?

[root@pr01 ~]# haclus -add testclus 192.168.234.201
VCS WARNING V-16-1-11335 Configuration must be ReadWrite : Use haconf –makerw

[root@pr01 ~]# haclus -delete testclus
VCS WARNING V-16-1-11335 Configuration must be ReadWrite : Use haconf –makerw

[root@pr01 ~]# haconf -makerw
[root@pr01 ~]# haclus -add testclus 192.168.234.201
[root@pr01 ~]# haclus -list
cluster1
testclus

[root@pr01 ~]# haclus -delete testclus
[root@pr01 ~]# haclus -list
cluster1

How to start a cluster…?

[root@pr01 ~]# hastart
[root@pr01 ~]# hastart –onenode

<-onenode>
Use this option only to run VCS on a single system on which LLT and GAB are not installed. Do not use this option on a multisystem cluster.
If this option is specified, hastart forks off a process called GABSIM, and the VCS server connects to GABSIM instead of GAB.

-onenode option is meant to be used for starting VCS only on a single system on which LLT and GAB are not *instaled/configured*. If you use hastart -onenode on both nodes, each remote partition (node) will be unaware of the the status of the other, and the remote system would show up in UNKNOWN state. [Please see http://www.symantec.com/business/support/index?page=content&id=TECH71388]. Resources in the remote node will not be probed when you use this option.

hastart -onenode is meant for clusters with one node in the main.cf as you don't need gab and llt if no other nodes, so this means "had" daemon will start without GAB and LLT, but as you have found out, you can run "hastart -onenode" even when there is more than 1 system defined in main.cf.

In this case, as you say, VCS can't see other node and so doesn't know state so VCS should AutoDisable the group (which is normal, even with GAB and LLT if second node is not started).  You can AutoEnable service group and then you will be able to online SG and if you do this on both nodes, then yes you will have split brain.

Good Read,

[root@pr01 ~]# hastart –stale

<-stale>
This option instructs the engine to treat the local configuration as stale even if it is valid.

How to stop a cluster…?

[root@pr01 ~]# hastop -all
VCS WARNING V-16-1-10028 Cluster configuration is writable.  Must do 'haconf -dump -makero' or 'hastop -all -force'

[root@pr01 ~]# hastop -all –force

<-all>
Stops HAD on all systems in the cluster and takes all service groups offline.
<-help>
Displays the command usage.
<-local>
Stops HAD on the system on which you typed the command
<-force>
Allows HAD to be stopped without taking service groups offline on the system. The value of the EngineShutdown attribute does not influence the behavior of the -force option.
<-evacuate>
When combined with -local or -sys, migrates the system's active service groups to another system in the cluster, before the system is stopped.
If you use the -evacuate option, evacuation occurs before VCS is brought down. But when there are dependencies between the service groups while -evacuate command is issued, VCS rejects the command
<-noautodisable>
Ensures the service groups that can run on the node where the hastop command was issued are not autodisabled. This option can be used with -evacuate but not with -force.
<-sys>
Stops HAD on the specified system.

How to know the status summary of cluster(s)…?

[root@pr01 ~]# hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen

A  dr01                 RUNNING              0
A  pr01                 RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled    State

B  NFS_APP1        dr01                 Y          N               OFFLINE
B  NFS_APP1        pr01                 Y          N               ONLINE
B  Web-App         dr01                 Y          N               OFFLINE
B  Web-App         pr01                 Y          N               ONLINE

How to know the vcs version…?

[root@pr01 ~]# hastart -version
Engine Version    6.0
Join Version      6.0.00.0
Build Date        Mon 14 Nov 2011 10:30:00 PM IST
PSTAMP            6.0.000.000-6.0-2011-11-14-09.00.00


Reference & Good read:






No comments:

Post a Comment