Linux Tricks and Techniques

For Linux Experts

Use the website for easy leaning of Linux

Sunday, 5 June 2016

Redhat Cluster service Failover

Redhat Cluster Services Failover


A cluster is the group of independent servers connected through a network to work as one centralized data processing unit. Clustering improves the system’s availability to the users, it maintain the performance and overall tolerance to faults and component failures. The high availability feature of the cluster provides failover of the services from one cluster node to another in case a node becomes inoperative. We can also failover the services manually from the command prompt if required in case of any activity on the cluster node. The term failover means to shift services from one node to another node so that the there should not be any impact on the application if server goes down itself. We can add around 17 nodes in a red hat cluster, the failover of the services in these nodes depends upon the configuration of the cluster node. The three basic motivators to form a cluster are High performance Computing (HPC), Load Balancer and High Availability (HA). Some packages are also required to install on the RHEL node that will join the cluster and these packages are rgmanager, lvm, and gfs. Now let’s start with an example of the services failover in redhat cluster node. In the below image we can see that there are 4 nodes in the cluster but on one of the node no services are running on that i.e. HBFMSPROD04. So we can failover the service on this node when required, the procedure for this failover is :





            Login to one of the cluster node server as root user.


2       # clusvcadm –r “service name” –m node name
This is the command which will failover the services from one node to another node. For e.g. if we want to move amalias services from node 06 to 04 then the command looks like:
# clusvcadm –r “amalias” –m HBFMSPROD04 then press enter it will shoe stopping stat on node 06 once it is stopped it will show starting status on node 04.


3       To check the failover status use
#clustat
Once the failover is done the service amalias will be in started state on node 04.
4       Once the activity is done and the node 06 is rebooted it will auto failover the service from 04 to 06 is auto failover is enabled in the configuration file.

There are some useful commands of the redhat cluster are as below:

#clusvcadm  –Z service name ---to freeze the service

# clusvcadm  –s service name – to stop a service

#clusvcadm  –d service name –to disable service

#clusvcadm  –e service name –to enable service

# clusvcadm  –R service name – to restart a service











No comments:
Write comments