Red Hat RHCS cluster maintenance

Source: Internet
Author: User
1. The core processes for starting the RHCS cluster are cman and rgmanager. To start the cluster, execute the following command on each node of the cluster in sequence: servicecmanstartservicergmanagerstart, to execute these two commands, you must first start cman, www.linuxidc.com, and then start rgmanager. After all nodes in the cluster successfully start the cman Service

1. Start the RHCS Cluster

The core processes of the RHCS cluster include cman and rgmanager. To start the cluster, execute the following commands on each node of the cluster in sequence:

Service cman start

Service rgmanager start

Note that the two commands are executed sequentially. You must first start cman, www.linuxidc.com, and then start rgmanager. After the cman service is successfully started on all nodes in the cluster, start the rgmanager service on each node in sequence.

If the GFS2 cluster file system is used, the startup method is as follows:

Service cman start

Service qdiskd start

Service clvmd start

Service gfs2 start

Service rgmanager start


Ii. Disable the RHCS Cluster

The command to disable the RHCS cluster is as follows:

Service rgmanager stop

Service cman stop

First, disable the rgmanager service on each node of the Cluster. After the rgmanager service on all nodes is successfully disabled, disable the cman service on each node in turn to close the services of the cluster.

When you disable the cman service, you may be prompted to disable the service. In this case, you can check whether the local shared storage GFS2 file system has been uninstalled, you can also check whether the rgmanager service of other nodes is properly disabled.


3. Manage application services

After the cluster system is started, the application service is automatically started by default. However, if an application service is not automatically started, you must start it manually.
The command used to manage application services is clusvcadm, which can be used to start, shut down, restart, and switch application services in the cluster.

1. Start an Application Service
You can start the application service of a node as follows:
Clusvcadm-e -M

Where:
Service: the name of the Application Service created in the cluster.
Node: indicates the name of the cluster Node.

For example, to start the mysql service on the node up02, perform the following operations:
[Root @ up02 ~] # Clusvcadm-e up_service-m up02
Member web1 trying to enable service: up_service... Success
Service: up_service is now running on up02

You can use the/var/log/messages file to view the details of starting the application service. After up_service is started,
Service-related cluster resources, such as virtual IP addresses and application service scripts, are also started. www.linuxidc.com can run the following command to check whether cluster resources have been properly loaded.


2. Disable an Application Service
You can disable the application service of a node as follows:
Clusvcadm-s -M

For example, to disable the mysql service on the node up02, perform the following operations:
[Root @ up02 ~] # Clusvcadm-s up_service-m up02
Member up02 stopping service: up_service... Success

You can view the details of disabling the application service in the/var/log/messages file. When mysql is disabled, cluster resources related to services, such as virtual IP addresses and application service scripts, are also released.


3. Restart an Application Service
You can restart the application service of a node as follows:
Clusvcadm-R -M

For example, to restart the mysql service on the node up02, perform the following operations:
[Root @ up02 ~] # Clusvcadm-R up_service-m up02
Member up02 trying to restart service: up_service... Success

You can view detailed information about restarting the application service in the/var/log/messages file.


4. Switch a service
You can switch an application service from one node to another by using the following method:
Clusvcadm-r -M

For example, to switch the service of node up02 to node up01, perform the following operations:
[Root @ up02 ~] # Clusvcadm-r up_service-m up01
Trying to relocate service: up_service to up01. .. Success
Service: up_service is now running on up01


Iv. Monitoring the RHCS cluster status

[Root @ up-02 ~] # Clustat
Cluster Status for clus-up @ Mon Jun 18 14:59:29 2012
Member Status: Quorate
Member Name ID Status
--------------------
Up01 1 Online, rgmanager
Up02 2 Online, Local, rgmanager

Service Name Owner (Last) State
---------------------------
Service: up_service up02 started
[Root @ up-02 ~] #

In this case, the mysql service runs on the host up-02.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.