Centos 6.3 DRBD+HEARTBEAT+NFS Configuration Notes

Source: Internet
Author: User
Tags centos

Here first of all thank the wine brother to build a highly available Linux server This book, read this book and reference inside the configuration let oneself to drbd+heartbeat+nfs thinking clearly a lot.

DRBD is simply a network raid-1, generally has 2 to multiple node nodes, the disk blocks created by each node will map to the local DRBD block, and then through the network to each node DRBD disk blocks synchronized updates.

The role of heartbeat can increase the availability of DRBD, it can automatically switch the DRBD block to the backup node after a node failure, and automatically make virtual IP from the new binding, DRBD block, disk mount and start NFS script operations, this series of operations because only in his back-end node, The front-end user accesses the heartbeat virtual IP, so there is no perception of the user.

Finally spit trough, Yum installed true pit Dad, later if not necessary, as far as possible source package installation.

System version: centos6.3 x64 (kernel 2.6.32)

drbd:drbd-8.4.3

Heartbeat:epel update source (real pit)

NFS: System self-belt

HeartBeat vip:192.168.7.90

Node1 drbd+heartbeat:192.168.7.88 (drbd1.example.com)

Node2 drbd+heartbeat:192.168.7.89 (drbd2.example.com)

(NODE1) is configured for the primary node only

(NODE2) is configured only from the node end

(NODE1,NODE2) need to be configured primarily from the node

I. DRBD configuration, Portal: http://showerlee.blog.51cto.com/2047005/1211963

Two. Hearbeat configuration;

Here we go. DRBD system environment and installation configuration:

1. Installation Heartbeat (CentOS6.3 in the default without heartbeat package, so need to download from a third party) (NODE1,NODE2)

# wget ftp://mirror.switch.ch/pool/1/mirror/scientificlinux/6rolling/i386/os/Packages/epel-release-6-5.noarch.rpm

# Rpm-ivuh epel-release-6-5.noarch.rpm

# Yum--enablerepo=epel Install Heartbeat-y

2. Configure Heartbeat

(Node1)

# VI/ETC/HA.D/HA.CF

---------------

# log

Logfile/var/log/ha-log

Logfacility local0

# Heartbeat Monitoring Time

KeepAlive 2

# Time of Death

Deadtime 5

# Specify each other's IP:

Ucast eth0 192.168.7.89

# when the server is normal, the primary server takes over the resource and the other server discards the resource

Auto_failback off

#定义节点

Node drbd1.example.com drbd2.example.com

---------------

(Node2)

# VI/ETC/HA.D/HA.CF

---------------

# log

Logfile/var/log/ha-log

Logfacility local0

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.