Skip to content

Instantly share code, notes, and snippets.

@tumf
Created November 10, 2011 11:43
Show Gist options
  • Select an option

  • Save tumf/1354676 to your computer and use it in GitHub Desktop.

Select an option

Save tumf/1354676 to your computer and use it in GitHub Desktop.
keepalived.conf
vrrp_instance VI_a {
state BACKUP
interface eth1
garp_master_delay 5
virtual_router_id 2
priority 99 # NFS-AはNFS-1を優先するため、下げる
advert_int 1
authentication {
auth_type PASS
auth_pass nfs_a.secret
}
virtual_ipaddress {
192.168.0.101/24 dev eth1 # NFS-A
}
}
vrrp_instance VI_b {
state BACKUP
interface eth1
garp_master_delay 5
virtual_router_id 3
priority 101 # <-- これは優先度の高いサーバを本来のNFSサーバとするため、サーバごとにかえる
advert_int 1
authentication {
auth_type PASS
auth_pass nfs_b.secret
}
virtual_ipaddress {
192.168.0.102/24 dev eth1 # NFS-B
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment