南非蚂蚁,著名Linux专家,知名IT作家。毕业于西安电子科技大学通信工程专业,爱好计算机,毕业后从事计算机行业。曾就职于新浪网、阿里云(万网),任职系统架构师。曾出版畅销书《循序渐进Linux》、《高性能Linux服务器构建实战》作者。
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
学Linux实战运维,就来爱维教育 | 6512 | 0 | 0 | 2016-11-03 | |
MYSQL企业常用架构与调优经验分享 | 7128 | 0 | 3 | 2016-04-11 | |
Linux入门经典《循序渐进Linux》第二版强势来袭! | 4696 | 0 | 0 | 2016-03-09 | |
再谈如何学习Linux,一线Linux专家学习经验谈 | 4109 | 0 | 1 | 2016-02-03 | |
关于ip_conntrack跟踪连接满导致网络丢包问题的分析 | 11797 | 0 | 0 | 2016-01-22 | |
【推荐】 《循序渐进Linux》第二版即将出版发行(附封面) | 8287 | 8 | 3 | 2015-12-25 | |
【推荐】 高性能集群软件Keepalived之安装配置篇 | 9939 | 1 | 9 | 2015-05-11 | |
【推荐】 高性能集群软件Keepalived之基础知识篇 | 7711 | 2 | 6 | 2015-05-06 | |
【推荐】 Linux Glibc幽灵漏洞紧急修补方案 | 9176 | 2 | 3 | 2015-01-29 | |
【推荐】 分布式监控报警平台Centreon之:Centreon简介 | 11522 | 3 | 4 | 2014-11-18 | |
【推荐】 Linux Bash严重漏洞紧急修复方案 | 8568 | 5 | 7 | 2014-09-26 | |
【推荐】 安全运维之:Linux系统账户和登录安全 | 5764 | 0 | 4 | 2014-09-15 | |
Keepalived中Master和Backup角色选举策略 | 2985 | 0 | 0 | 2014-09-15 | |
多年后,才知道自己是多么的无知 | 3507 | 4 | 1 | 2014-09-15 | |
【推荐】 运维实战案例之“Too many open files”错误与解决方法 | 3611 | 0 | 2 | 2014-08-27 | |
《高性能Linux构建实战Ⅱ》已出版发行,附封面照! | 9282 | 13 | 2 | 2014-06-30 | |
【推荐】 基于Linux服务器的性能分析与优化(2) | 4814 | 0 | 3 | 2014-06-20 | |
图书抄袭何时休,技术人的版权在哪里 | 3146 | 2 | 0 | 2013-11-11 | |
LVS+Keepalived构建高可用负载均衡(测试篇) | 6772 | 0 | 3 | 2012-06-30 | |
轻松构建Mysql高可用集群系统 | 5405 | 0 | 9 | 2012-06-30 |
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?