HAST and CARP

Mikolaj Golub to.my.trociny at gmail.com
Thu Jul 1 20:33:30 UTC 2010


On Thu, 01 Jul 2010 16:29:25 +0900 hiroshi at soupacific.com wrote:

 h> SERVERA is master for CARP and HAST
 h> then boot SERVERB

 h> ServerB is using CARP and ifstated.
 h> First CARP state is INIT then BACKUP
 h> Similar to ucarp's method, vip-down.sh is called.
 h> vip-down.sh calls carp_down.sh

 h> Inside is almost same to ucarp_down.sh except delete ucarp staff.

 h> if I do not put hastctl create xxxx, then hastd refuse connection and
 h> message says
 h> Split-brain detected secondary !

Split-brain means that you or your scripts did something wrong: both nodes
acted as primary (either simultaneously or one then another but there was no
communication between them so both made changes to the data that was not
synced to another node).

The easy way to get split-brain is to change the role on secondary to primary
without changing the role on the primary host, make some changes on the
secondary (acting as a primary) and change back its role to secondary.

You should check your setup if something like this may happen.

Doing 'hastctl create' on every switching is wrong. Note, after 'hastctl
create' hast metadata on the disk are lost and synchronization of all blocks
from the primary is initiated, which is rather long. You can observe the
status of this synchronization looking at "dirty" field of hastctl status
output on the primary. You can't switch to failover until synchronization is
complete. So you should avoid 'hastctl create' -- this is only for initial
setup or repairing your hast.

-- 
Mikolaj Golub


More information about the freebsd-fs mailing list