歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> 學習Linux

keepalived從機接管後主機恢復不搶占VIP,keepalivedvip

keepalived從機接管後主機恢復不搶占VIP,keepalivedvip

keepalived從機接管後主機恢復不搶占VIP,keepalivedvip


在lvs+keepalived環境中,為了減小keepalived主從切換帶來的意外風險,,設置主機恢復後不搶占VIP。
待進行vrrp協議通告備機不可用時切換。主要修改兩個地方。(紅色部分)

只需修改主服務器state MASTER改為state BACKUP並添加nopreempt

 

! Configuration File for keepalived

global_defs {
notification_email {
[email protected]
}
notification_email_from [email protected]
smtp_server localhost
smtp_connect_timeout 30
router_id mfs_master
}

vrrp_instance VI_1 {
state BACKUP
interface eth1
virtual_router_id 51
priority 100
nopreempt
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.0.11
}
}

http://xxxxxx/Linuxjc/1181642.html TechArticle

Copyright © Linux教程網 All Rights Reserved