RedhatAS cluster installation and management

Source: Internet
Author: User
RedhatAS cluster installation and management-Linux Enterprise Application-Linux server application information, the following is a detailed description. The cluster in Redhat provides high availability of data and services. You can use the inventory Cabinet to manage power supplies or switch between servers to meet the needs of some enterprises. Clusters can be used on database services, file servers, WWW servers, and other application servers to achieve load balancing. It was developed based on Linux LVS and increases data reliability, service availability, and load balancing.

2. features:
(1) A system without single point of hardware failure will be formed
The cluster will use independent servers to form a specific interconnected whole, which can avoid data loss and service interruption due to a machine down. It is also a low-cost, high-availability cluster service.
(2) high service availability
The cluster allows administrators to easily combine independent services to ensure data security and service availability. In order to build a service, the Administrator must configure the resources and attributes of the service, such as the service name, stopped STARTUP script, and hard disk partition.
(3) high data reliability
(4) provides simple user management interfaces
(5) Multi-Cluster Interconnection (this function has not been studied)
(6) Failover switching of services
When a server that provides services in the cluster has a problem, the cluster automatically sends the user access requests to other machines in the cluster for processing. When the system of this server is up, it can read and write the Quotum (bare device) related to the cluster, it will automatically read the relevant information about the cluster and add it to the cluster.
(7) multiple services can be provided at the same time
(8) Event Log Function
(9) monitoring functions of application services
(10) Status Monitoring

3. Minimal hardware environment:
Two servers (two NICs are required in principle)
Ethernet connection and heartbeat monitoring
Shared storage to share information

4. Create a cluster server
(1) install basic systems, mainly including hardware drivers
(2) confirm the network, including the part of the switch and use of the NIC for heartbeat monitoring
(3) cluster installation steps:
A. Install Redhat Advance Server 2.1 on both machines. Remember to select the kernel source and cluster system components during installation.
B. Restart and edit/etc/hosts to write all the machines added to the cluster, including the ing between the host and IP address.
C. Confirm that each system has recognized the required hardware environment, such as the NIC.
D. kernel requirements:
Support for ip alias (CONFIG_IP_ALIAS)
E. because there are some storage devices (Disk cabinets) that may be used by the cluster, and the kernel also imposes certain time restrictions on the cluster when the system is started, we recommend that you change lilo. conf:
TIMEOUT = 30
(4) create a bare device:
In the/dev/raw/device file, change the/etc/sysconfig/rawdevices file in the configuration file. in the cluster, a Quorum Partition is required first. These partitions and some database applications must have bare devices, because they need to meet their own buffer cache, rather than the system, so they do not include the file system.
A/etc/sysconfig/devices style file:
/Dev/raw/raw1/dev/sdb1
/Dev/raw/raw2/dev/sdb2
This can be changed according to your own needs, because the corresponding devices may be different. Therefore, we need to use fdisk to set two partitions for Quorum Partition beforehand, which is not too large, M is enough.
Can raw be used to view bare devices on a machine? Aq command. For more information, use man raw.
(5) check whether the clumanager-xxx.rpm (rpm? Qa | grep clumanager ). If this file is not installed, find the file, rpm? Ivh clumanager-xxx.rpm
(6) After confirming that the bare device is correctly established, you can use the following command to test whether the Quorum Partition works properly:
Cludiskutil? P. In the information listed, the same bare devices on different servers, such as (/dev/raw/raw1), should have the same value of Magic and Version. Please pay more attention to this.
Then run cluconfig to configure the cluster server. related information will be asked and a correct answer will be given to it. An information file of the cluster will be automatically updated for running the cluster.
This will ask about the IP address.
Adderss for cluster alias refers to the general address that the customer uses to access after the cluster is established.
(7) Use cludiskutil? T to check the Quorum Partition. If the Power switch is used, you can use clustonith to check.
(Finally, you can run the following command to start the cluster: services cluster start. When the cluster is running, the system starts several processes. What are the processes described below:
Cluquorumd Quorum deamon (daemon of bare devices)
Clusvcmgrd Service manager daemon (management Service daemon)
Clupowerd Power daemon)
Cluhbd Heartbeat daemon)
Clumibd Administrative system monitoring daemon (monitoring daemon)

5. Cluster Management:
This may be relatively simple, because the clumanager management package has been used on Redhat Advance Server 2.1, the management function of cluster is well managed using TUI. The following describes how to use related commands, hoping to help you.
A management command is cluadmin, which provides the following functions:
A. add, delete, and modify services in the cluster
B. Start and Stop the cluster
C. display the status of the cluster and the services running in it
D. Modify the cluster Log Level
E. Back up and restore cluster data
After executing the cluadmin command, if you have a certain understanding of the network, its interface is like the character management interface of the cisco device. It is mainly used to control the command, here you can use help to list all available commands and some simple help information, which may be helpful for your use, this function will not be explained in detail here. If you have any questions, you 'd better go to help here to see his help information.

Bytes ----------------------------------------------------------------------------------------------------------------------
Here is a summary. If the above work is successfully completed, it indicates that your cluster has been running properly and reported, but what is our final goal, instead of just running the cluster, we need to basically run our application services in this cluster, so that the cluster can play a very good protective role for our application services.
Bytes ----------------------------------------------------------------------------------------------------------------------

6. Create a service in the Cluster:
(1) Necessary conditions:
A. the protected service must have a script that may control start and stop, after installing the clumanage-xxx.rpm, this package contains some common service control script, this is very convenient, saving you the trouble of writing such a stuff by yourself. Place the specific location in/usr/share/cluster/doc/services/examples
B. confirm that the service to be run runs properly on each cluster server machine.
(2) Make a copy of/etc/cluster. conf to restore the original state after an error occurs, so as not to waste the previous work.
(3) run the following command:
/Sbin/cluadmin
In this way, you can add services. In this process, you will also be asked a lot about this service, so you need to have some knowledge about this service, where is his startup stop control script? Where is the necessary configuration file. It is not very difficult. If you cannot confirm it, you can go to the server to check the required information.

For some management of services in the cluster and monitoring of system status, you can directly use some commands provided in the cluadmin to track them. These are not described in detail, you can go to www.redhat.com to view the official doc.

7. backup and recovery of Cluster data
/Sbin/cluadmin
Cluadmin> cluster backup slave 200416200215.htm] The 200416200215.htm in this example can be left unspecified.
Cluadmin> cluster restore limit 200416200215.htm] Same as above
Then, restart the cluster to take effect.
Related Article

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.