Centos 6.3 DRBD Installation Configuration notes

Source: Internet
Author: User
Tags centos iptables

Recently prepared to update the point load balanced high availability of documents, so the previous DRBD have been trying to conquer the time to take out today.

DRBD (distributed replicated block Device) We can understand that it is actually a network RAID-1, between two servers even if a power outage or downtime will not have any impact on the data, And the real earnest exchange can be solved through heartbeat solution, no need human intervention.

For example: Drbd+heartbeat+mysql is a master-slave structure separation, as a Drbd+heartbeat+nfs backup storage solution.

--------------------don't say much nonsense, open---------------------------

System version: centos6.3 x64 (kernel 2.6.32)

drbd:drbd-8.4.3

node1:192.168.7.88 (drbd1.example.com)

node2:192.168.7.89 (drbd2.example.com)

(NODE1) is configured for the primary node only

(NODE2) is configured from node only

(NODE1,NODE2) Common Configuration from node

I. Preparation environment: (NODE1,NODE2)

1. Close iptables and SELinux to avoid error during installation.

# Service Iptables Stop

# Setenforce 0

# Vi/etc/sysconfig/selinux

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

Selinux=disabled

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

2. Set up Hosts file

# vi/etc/hosts

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

192.168.7.88 drbd1.example.com DRBD1

192.168.7.89 drbd2.example.com Drbd2

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

3. Add a 2G hard disk SDB to the two virtual machines as DRBD, partition to SDB1, size 1G, and create/data directory on the local system without mount operation.

# FDISK/DEV/SDB

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

N-p-1-1-"+1G"-W

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

# Mkdir/data

4. Time synchronization: (important)

# Ntpdate-u Asia.pool.ntp.org

5. Change host Name:

(Node1)

# vi/etc/sysconfig/network

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

Hostname=server.example.com

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

(Node2)

# vi/etc/sysconfig/network

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

Hostname=client.example.com

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

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.