自己慢慢积累。
分类: LINUX
2016-03-08 17:51:52
两套LVS的ID必须不一致
在LVS服务器中修改配置文件
vi /etc/keepalived/keepalived.conf
修改以下红色字体:
! Configuration File for keepalived
global_defs {
router_id LVS_DEVEL
lvs_id 5
}
vrrp_sync_group VGM_2 {
group {
VI_2
}
notify_master /root/startdr.sh
notify_backup /root/stopdr.sh
}
vrrp_instance VI_2 {
state MASTER #备份服务器上将MASTER改为BACKUP
interface eth2
lvs_sync_daemon_inteface eth2
virtual_router_id 55
priority 100 #备份服务器上priority 90
advert_int 5
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.60.163 dev eth2:0
#(如果有多个VIP,继续换行填写.)
}
}