Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2011 16:07:12 +0100
From:      Filip Valder <filip@valder.cz>
To:        freebsd-cluster@freebsd.org
Subject:   HA storage, diskless booting, clustering - ifstated.conf
Message-ID:  <4EEB5EA0.1070104@valder.cz>

next in thread | raw e-mail | index | archive | help
Toto je elektronicky podepsaná zpráva ve formátu MIME.

--------------ms040201090106090703090908
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

# This is the only difference between the primary and secondary
# HAST node. Set it accordingly.
init-state primary
#init-state secondary

# Leave it or substitute "carp0" for the name of your CARP interface
# if it varies.
carp_up =3D "carp0.link.up"
carp_down =3D "!carp0.link.up"

# The "net" address is an address which can be used to determine
# whether we have connectivity. Make sure the host is always up, or
# test multiple ip's, 'or'-ing the tests.
net =3D '( "ping -q -c 1 -W 1000 10.11.12.13 > /dev/null" every 10)'

state primary {
	init {
		# Leave it or substitute "carp0" for the name of
		# your CARP interface if it varies.
		run "ifconfig carp0 advskew 10"
		# Where your carp-hast-switch resides...
		run "/root/bin/carp-hast-switch master"
	}
	if $carp_down || ! $net
		set-state secondary
}

state secondary {
	init {
		# Leave it or substitute "carp0" for the name of
		# your CARP interface if it varies.
		run "ifconfig carp0 advskew 100"
		# Where your carp-hast-switch resides...
		run "/root/bin/carp-hast-switch slave"
	}
	if $carp_up && $net
		set-state primary
}



--------------ms040201090106090703090908--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EEB5EA0.1070104>