Centos 6.0 System Drbd+heartbeat+nfs enable high-availability file storage

Source: Internet
Author: User
Tags centos

This paper centos6.0 system:

Using DRBD mirroring technology to achieve data synchronization between two servers in the background, the use of heartbeat to achieve automatic switching, open NFS to provide file services

node1:192.168.182.132

node2:192.168.182.128

vip:192.168.182.200

1. Configure hosts, install DRBD, Heartbeat, NFS

1>, Node1, Node2:

Vim hosts

192.168.182.132 Node1

192.168.182.128 Node2

2>, DRBD:

Yum-y Install gcc kernel-devel kernel-headers Flex libnet

Tar zxvf drbd-8.4.3.tar.gz

CD drbd-8.4.3

./configure--PREFIX=/USR/LOCAL/DRBD--with-km

Make kdir=/usr/src/kernels/2.6.32-71.el6.i686/

Make install

Mkdir-p/USR/LOCAL/DRBD/VAR/RUN/DRBD

Cp/usr/local/drbd/etc/rc.d/init.d/drbd/etc/rc.d/init.d

Chkconfig--add DRBD

Chkconfig DRBD on

CD DRBD

CP drbd.ko/lib/modules/' uname-r '/kernel/lib/

Depmod

Modprobe DRBD

Cd/usr/local/drbd/etc/drbd.d

MV Global_common.conf Global_common.conf.bak

Vim global_common.conf

Global {

Usage-count Yes; #是否参加DRBD使用者统计, default Yes

}

Common {

NET {

Protocol C; #使用drbd的第三种同步协议, indicates that write completion is considered after receiving a write acknowledgement from the remote host.

}

}

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.