Neo4j+DRBD+pacemaker高可用架构

本文详细介绍了如何构建一个基于Neo4j、DRBD和Pacemaker的高可用架构。首先,通过磁盘格式化和分区配置DRBD的前置条件,然后设置两台服务器之间的通信互信,关闭防火墙和Selinux。接着,安装并配置DRBD,创建主从模式,并启用DRBD服务。再通过Pacemaker和Corosync安装实现集群管理,最后调整Neo4j配置并注册为服务,通过crmsh配置资源管理,确保服务的高可用性。
摘要由CSDN通过智能技术生成

 

主节点

192.168.154.101(s101)

CentOS Linux release 7.2.1511 (Core)

 

root/123

从节点

192.168.154.102(s102)

CentOS Linux release 7.2.1511 (Core)

 

root/123

 

一、磁盘格式化(drbd的前置条件)

-==========================================================================================

[root@s101 ~]# fdisk -l

 

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x000a87cb

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     1026047      512000   83  Linux

/dev/sda2         1026048    41943039    20458496   8e  Linux LVM

 

Disk /dev/sdb: 5368 MB, 5368709120 bytes, 10485760 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

 

 

Disk /dev/mapper/centos-root: 18.8 GB, 18756927488 bytes, 36634624 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

 

 

Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

 

#查看到/dev/sdb没有挂载的,配置分区

[root@s101 ~]# fdisk /dev/sdb     

 

Welcome to fdisk (util-linux 2.23.2).

 

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

 

Command (m for help): p

 

Disk /dev/sdb: 5368 MB, 5368709120 bytes, 10485760 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xce34fc98

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1            2048    10242047     5120000   83  Linux

 

Command (m for help): d

Selected partition 1

Partition 1 is deleted

 

Command (m for help): p

 

Disk /dev/sdb: 5368 MB, 5368709120 bytes, 10485760 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xce34fc98

 

   Device Boot      Start         End      Blocks   Id  System

 

Command (m for help): n

Partition type:

   p   primary (0 primary, 0 extended, 4 free)

   e   extended

Select (default p): e

Partition number (1-4, default 1): 1

First sector (2048-10485759, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759): +4G

Partition 1 of type Extended and of size 4 GiB is set

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

 

[root@s101 ~]# fdisk -l

 

Disk /dev/sdb: 5368 MB, 5368709120 bytes, 10485760 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xce34fc98

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1            2048     8390655     4194304    5  Extended

 

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x000a87cb

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     1026047      512000   83  Linux

/dev/sda2         1026048    41943039    20458496   8e  Linux LVM

 

Disk /dev/mapper/centos-root: 18.8 GB, 18756927488 bytes, 36634624 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

 

 

Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 41943

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值