DRBD+Heartbeat+MySQL高可用

    Read

基础环境:

[root@DB1 ~]# uname -a
Linux DB1.MySQL.hz.t4x.org 2.6.32-642.4.2.el6.x86_64 #1 SMP Tue Aug 23 19:58:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@DB1 ~]# uname -n
DB1.mysql.hz.t4x.org
[root@DB1 ~]# uname -r
2.6.32-642.4.2.el6.x86_64
[root@DB1 ~]# cat /etc/redhat-release
CentOS release 6.8 (Final) SourceByrd's Weblog-https://note.t4x.org/service/drbd-heartbeat-mysql/

IP地址规划:SourceByrd's Weblog-https://note.t4x.org/service/drbd-heartbeat-mysql/

[root@DB1 ~]# ifconfig | grep "inet addr:"
inet addr:1.1.1.110 Bcast:1.1.1.255 Mask:255.255.255.0 eth0
inet addr:10.162.32.110 Bcast:10.162.47.255 Mask:255.255.240.0 eth1
inet addr:172.16.0.110 Bcast:172.16.255.255 Mask:255.255.0.0 eht2SourceByrd's Weblog-https://note.t4x.org/service/drbd-heartbeat-mysql/

[root@DB2 ~]# ifconfig | grep "inet addr:"
inet addr:1.1.1.111 Bcast:1.1.1.255 Mask:255.255.255.0 eth0
inet addr:10.162.32.111 Bcast:10.162.47.255 Mask:255.255.240.0 eth1
inet addr:172.16.0.111 Bcast:172.16.255.255 Mask:255.255.0.0 eht2 SourceByrd's Weblog-https://note.t4x.org/service/drbd-heartbeat-mysql/

必要的配置:


mysql配置:

速度测试:

haresources文件:【参考heartbeat】

MY.CNF配置文件:

日志分析(DB1启动heartbeat日志 ):

日志分析(DB1关机 DB2日志):

效果测试:(echo速度没有写入数据库快,大概意思应该测试完成了。)

启动脚本:
SourceByrd's Weblog-https://note.t4x.org/service/drbd-heartbeat-mysql/ SourceByrd's Weblog-https://note.t4x.org/service/drbd-heartbeat-mysql/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on November 6, 2017
  • 原文链接:https://note.t4x.org/service/drbd-heartbeat-mysql/
匿名

Comment

Anonymous

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: