Linux-HA practice (2)-virtual IP address of TFS Nameserver HA

Source: Internet
Author: User
Tags nameserver

The machine-level HA for the Nameserver of TFS can be done through the virtual IP mechanism. You only need a 'heartbeat' to solve the problem. The following is a simple example of the next step. ** Operating system **: 'centos 6.4 x86_64 '** Heartbeat **: ''' [root @ jdzhan1 ha. d] # rpm-q heartbeatheartbeat-3.0.4-2.el6.x86_64 ''' ----- ** Step0 **: Install Heartbeatyum installation and source code installation can be, see [previous] [1] blog. --- ** Step 1 **: configure the virtual IP1. modify the 'Ha. cf 'main configuration: ''' # CRM without 2.x style, that is, Pacemakercrm off ''' 2. modify 'haresources ''' for the master and slave nodes as follows # vi/etc/ha. d/haresources ''' Add the following content: ''' # jdzhan1 is the node name, IPaddr is a script that comes with Heartbeat, and 192.168.129.100/24 is the virtual IPjdzhan1 IPaddr to be set :: 192.168.100/24/eth0: 0/''' ***** note **: The 'haresources 'of the master and slave nodes must be identical. * 3. start Heartbeat ''' # service heartbeat start '''. If no problem occurs, ping 192.168.129.100. The virtual IP address has been set. Enter ifconfig to view it :! [Enter the image description here] [2] --- ** Step 2 **: Set ns. conf and ds. the configuration file of conf 'nameserver 'is modified as follows: ''' # listen port = 8100 # workdirectoy tfs installation path work_dir =/home/tfs # The NIC bound to the device name is generally the first dev_name = eth0 # shown in ifconfig # ip addr (vip) virtual IPip_addr = 192.168.129.100 [nameserver] # ipipip_addr_list = 192.168.129.129 | 192.168.129.130group _ mask = 255.255.255 ''' Dataserver: ''' [nameserver] # ip addr (vip) virtual IPip_addr = 1 92.16129.100 # ipipip_addr_list = 192.168.129.129 | 192.168.129.130group _ mask = 255.255.255.255 ''' --- ** Step3 **: Start 'tfs ''''#. /scripts/tfs start_ns #. /scripts/tfs start_ds 1-2 ''' --- ** Step4 **: Test to disable the machine where a 'nameserver 'is located. By checking the log, we can find that Heartbeat has crashed to another node. ''' # Tail-f/var/log/messages '''! [Enter the image description here] [3] Under ifconfig, the virtual IP address has been switched over :! [Enter the image description here] [4] When a 'nameserver 'node goes down, the entire cluster is still available. According to the above configuration, only node-level HA can be implemented. When the Nameserver process on the node where the virtual IP address is located goes down directly, failover cannot be implemented, in addition, the Nameserver process cannot be restarted after the host is restarted. To implement HA at the Resource level, you need to use CRM (Cluster Resource Manager). The most famous is Pacemaker. For details about resource-level Nameserver HA Based on Pacemaker, refer to the official documentation or [this blog] [5]. Configuration is complicated, mainly for the cib. xml configuration of Pacemaker. [Markdown format Reading] [6] [1]: http://zhanjindong.info/2014/03/10/linux-ha-heartbeat/ [2]: http://zhanjindong.info/wp-content/uploads/2014/03/11.png [3]: http://zhanjindong.info/wp-content/uploads/2014/03/21.png [4]: http://zhanjindong.info/wp-content/uploads/2014/03/31.png [5]: http://blog.yunnotes.net/index.php/tfs_nameserver_haconfig/ [6]: https://www.zybuluo.com/zhanjindong/note/6522

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.