Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi, i work with drbd and keepalived. I have two nodes On booting node1 is the master an works fine. If i cut the network connection Keepalive runs a script on the master(fault.sh) to unmount the filesystem and bring drbd to secondary. On the same time keepalived starts on node2(backup) a script(master.sh) to bring drbd to primary and mount the filesystem. This works fine, but if i connect the node1 back, keepalived start on both nodes the right scripts, but on the node 1 it didn't get the primary status back and can't mount the filesystem. Please can someone help. Here are my configfiles. ########### /etc/keepalived/keepalived.conf on Master-Server ########################## vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 1 priority 100 authentication { auth_type PASS auth_pass <Here is the password> } virtual_ipaddress { 192.168.70.30/24 brd 192.168.70.255 dev eth0 } notify_master /etc/keepalived/master.sh notify_backup /etc/keepalived/backup.sh notify_fault /etc/keepalived/fault.sh } ########### /etc/keepalived/keepalived.conf on Backup-Server ########################## vrrp_instance VI_1 { state BACKUP interface eth0 virtual_router_id 1 priority 40 authentication { auth_type PASS auth_pass <Here is the password> } virtual_ipaddress { 192.168.70.30/24 brd 192.168.70.255 dev eth0 } notify_master /etc/keepalived/master.sh notify_backup /etc/keepalived/backup.sh notify_fault /etc/keepalived/fault.sh } ############### /etc/keepalived/master.sh on both Server the same ############################### drbdsetup /dev/drbd0 wait_sync drbdsetup /dev/drbd0 primary mount /dev/drbd0 /mnt/cluster /etc/init.d/mysql start /etc/init.d/apache2 start ############### /etc/keepalived/backup.sh on both Server the same ############################### /etc/init.d/apache2 stop /etc/init.d/mysql stop umount /mnt/cluster drbdsetup /dev/drbd0 secondary ############### /etc/keepalived/fault.sh on both Server the same ############################### /etc/init.d/apache2 stop /etc/init.d/mysql stop umount /mnt/cluster drbdsetup /dev/drbd0 secondary ############### /etc/drbd.conf on both Server the same ################################# resource drbd0 { protocol C; #incon-degr-cmd "halt -f"; incon-degr-cmd "echo ' !DRBD! pri on incon-degr' | wall; sleep 60; halt -f"; startup { degr-wfc-timeout 120; } disk { #on-io-error panic; on-io-error pass_on; } net { timeout 60; connect-int 10; ping-int 10; max-buffers 2048; max-epoch-size 2048; } syncer { rate 100M; group 1; al-extents 257; } on node1 { device /dev/drbd0; disk /dev/hdc4; address 172.19.2.10:7788; meta-disk internal; } on node2 { device /dev/drbd0; disk /dev/hdc4; address 172.19.2.20:7788; meta-disk internal; } }