南非蚂蚁,著名Linux专家,知名IT作家。毕业于西安电子科技大学通信工程专业,爱好计算机,毕业后从事计算机行业。曾就职于新浪网、阿里云(万网),任职系统架构师。曾出版畅销书《循序渐进Linux》、《高性能Linux服务器构建实战》作者。
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
【推荐】 Oracle CRS的管理与维护 | 4412 | 0 | 4 | 2012-06-30 | |
问题小结:Linux下oracle常见安装错误总结 | 4964 | 0 | 3 | 2012-05-25 | |
apache启动报错:could not bind to address 0.0.0.0:80 | 21790 | 0 | 1 | 2012-05-25 | |
Apache重启失败:name-based shared memory failure | 4489 | 0 | 3 | 2012-05-25 | |
【推荐】 su: /bin/bash: Permission denied带来的疑惑 | 4637 | 0 | 3 | 2012-05-25 | |
用Unison实现数据的双向实时同步 | 3383 | 1 | 2 | 2012-05-23 | |
其实有时候Linux真的很脆弱 | 3209 | 0 | 3 | 2012-05-23 | |
Linux系统性能分析工具-操作篇 | 3341 | 0 | 5 | 2012-05-23 | |
细说Linux系统优化-实践篇 | 7789 | 1 | 16 | 2012-05-23 | |
Linux系统备份策略探讨 | 3339 | 0 | 1 | 2012-05-23 | |
实战演示bacula恢复功能 | 2895 | 0 | 1 | 2012-05-01 | |
开源网络备份软件bacula( 启动与关闭bacula) | 2741 | 0 | 1 | 2012-05-01 | |
开源网络备份软件bacula(实例配置篇) | 2797 | 0 | 1 | 2012-05-01 | |
开源网络备份软件bacula(功能特点与原理) | 2375 | 0 | 1 | 2012-05-01 | |
Linux负载均衡软件LVS之四(测试篇) | 3153 | 0 | 7 | 2012-03-29 | |
轻量级HTTP服务器Nginx(Nginx性能优化技巧) | 5472 | 1 | 7 | 2012-03-28 | |
轻量级HTTP服务器Nginx(Nginx日常维护) | 2737 | 0 | 3 | 2012-03-28 | |
轻量级HTTP服务器Nginx(配置与调试Nginx) | 6457 | 1 | 7 | 2012-03-28 | |
轻量级HTTP服务器Nginx(入门篇) | 4961 | 0 | 3 | 2012-03-28 | |
【推荐】 高性能HTTP加速器Varnish之概念篇 | 3269 | 0 | 3 | 2012-02-08 |
exitgogo2016-02-03 15:17
saup007:双主MySQL配置Keepalived,2个角色都为BACKUP,
A节点:
vrrp_script chk_mysql_server {
#script "/opt/keepalived/script/chk_mysql_server.sh"
script "killall -0 mysqld"
interval 30 # 检测时间为30s
weight 21
}
vrrp_instance VI_1 {
state BACKUP
interface eth1
virtual_router_id 59
priority 100
advert_int 1
nopreempt
#mcas_src_ip 172.19.1.201
authentication {
auth_type PASS
auth_pass 1111
}
notify_master "/opt/keepalived/script/master.sh"
notify_backup "/opt/keepalived/script/backup.sh"
notify_fault "/opt/keepalived/script/fault.sh"
notify_stop "/opt/keepalived/script/stop.sh"
track_script {
chk_mysql_server
}
virtual_ipaddress {
172.19.1.249/24 dev eth1 scope global label eth1:0
}
}
B节点:
priority 90
#nopreempt
当停掉A的MySQL,正常切换到B,当把A MySQL启来后,vip依然在B,这个符合逻辑,但把A MySQL启来后,再去停掉B MySQL,VIP却没有飘移到A上,why?
vrrp_script chk_mysql_server {
#script "/opt/keepalived/script/chk_mysql_server.sh"
script "killall -0 mysqld"
interval 30 # 检测时间为30s
weight 21
}
这里面的权重设置有问题,修改weight值
saup0072015-08-27 15:16
双主MySQL配置Keepalived,2个角色都为BACKUP,
A节点:
vrrp_script chk_mysql_server {
#script "/opt/keepalived/script/chk_mysql_server.sh"
script "killall -0 mysqld"
interval 30 # 检测时间为30s
weight 21
}
vrrp_instance VI_1 {
state BACKUP
interface eth1
virtual_router_id 59
priority 100
advert_int 1
nopreempt
#mcas_src_ip 172.19.1.201
authentication {
auth_type PASS
auth_pass 1111
}
notify_master "/opt/keepalived/script/master.sh"
notify_backup "/opt/keepalived/script/backup.sh"
notify_fault "/opt/keepalived/script/fault.sh"
notify_stop "/opt/keepalived/script/stop.sh"
track_script {
chk_mysql_server
}
virtual_ipaddress {
172.19.1.249/24 dev eth1 scope global label eth1:0
}
}
B节点:
priority 90
#nopreempt
当停掉A的MySQL,正常切换到B,当把A MySQL启来后,vip依然在B,这个符合逻辑,但把A MySQL启来后,再去停掉B MySQL,VIP却没有飘移到A上,why?