keepalived03:資源搶佔問題 01Keepalived構建高可用伺服器,有MASTER,BACKUP之分,在MASTER主機宕掉之後,BACKUP主機會接替02所有的任務,但是當MASTER主機修複後,會搶佔資源,這樣就是不必要的切換03 如何讓MASTER恢複後不搶佔BACKUP的資源:將兩個主機均設定成BACKUP,因為不搶佔只支援BACKUP模式04那個成為MASTER,靠優先順序決定05! Configuration File for keepalived06 07global_defs {08 notification_email {09 oscersong007@gmail.com10 }11 notification_email_from keepalived@localhost12 smtp_server 127.0.0.113 smtp_connect_timeout 3014 router_id LVS_DEVEL15}16vrrp_sync_group VGM {17 group {18 VI_119 }20}21vrrp_script chk_http_port {22 script "killall -0 httpd"23 interval 124}25vrrp_instance VI_1 {26 state BACKUP #BACKUP27 interface eth028 virtual_router_id 5129 priority 50 #5030 advert_int 131 authentication {32 auth_type PASS33 auth_pass westos34 }35 track_interface {36 eth037 eth138 }39 virtual_ipaddress {40 192.168.0.150/24 dev eth041 10.0.0.150/24 dev eth142 }43 track_script {44 chk_http_port45}46 47}