南非蚂蚁,著名Linux专家,知名IT作家。毕业于西安电子科技大学通信工程专业,爱好计算机,毕业后从事计算机行业。曾就职于新浪网、阿里云(万网),任职系统架构师。曾出版畅销书《循序渐进Linux》、《高性能Linux服务器构建实战》作者。
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
【推荐】 浅谈Linux下shell的入门与基础 | 4171 | 1 | 7 | 2012-02-05 | |
【推荐】 Linux系统下常见性能分析工具的使用 | 4264 | 0 | 8 | 2012-01-10 | |
《高性能Linux服务器构建实战》四大网上书店发售中,附试读章节下载 | 6366 | 1 | 2 | 2012-01-10 | |
遭遇ORA-01200错误的原因及解决方法 | 2663 | 0 | 1 | 2012-01-10 | |
Oracle dataGuard专题:Rman通过duplicate创建standby | 2576 | 0 | 2 | 2012-01-10 | |
Oracle dataGuard专题:利用rman创建standby | 2835 | 0 | 3 | 2012-01-10 | |
Oracle dataGuard专题:利用冷备创建standby | 3199 | 2 | 4 | 2012-01-10 | |
通过rsync+inotify实现数据的实时备份 | 2562 | 0 | 4 | 2012-01-10 | |
细说Linux下软件包的安装与管理 | 3759 | 0 | 5 | 2012-01-10 | |
浅谈Linux的内存管理机制 | 5567 | 1 | 12 | 2012-01-10 | |
初探Linux进程管理机制 | 3313 | 1 | 6 | 2012-01-10 | |
linux下磁盘镜像软件DRBD的使用 | 2424 | 0 | 3 | 2012-01-10 | |
整合apache和tomcat构建Web服务器 | 3356 | 0 | 5 | 2012-01-10 | |
【推荐】 运维监控利器Nagios之:Nagios的日常维护和管理 | 2217 | 0 | 3 | 2012-01-10 | |
【推荐】 运维监控利器Nagios之:nagios配置详解 | 2326 | 0 | 3 | 2012-01-10 | |
【推荐】 运维监控利器Nagios之:安装nagios | 2101 | 0 | 3 | 2012-01-10 | |
Heartbeat3.x应用全攻略之: 测试Heartbeat的HA功能 | 3411 | 0 | 2 | 2011-12-29 | |
【推荐】 利用ISCSI存储技术构建IP存储网络(实战篇) | 5070 | 1 | 7 | 2011-12-29 | |
【推荐】 利用ISCSI存储技术构建IP存储网络(概念篇) | 2568 | 0 | 2 | 2011-12-27 | |
【推荐】 运维监控利器Nagios:概念、结构和功能 | 3414 | 0 | 3 | 2011-12-26 |
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?