From owner-freebsd-fs@FreeBSD.ORG Thu Jul 1 07:29:27 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF7F7106564A; Thu, 1 Jul 2010 07:29:27 +0000 (UTC) (envelope-from hiroshi@soupacific.com) Received: from mail.soupacific.com (mail.soupacific.com [211.19.53.201]) by mx1.freebsd.org (Postfix) with ESMTP id A824D8FC18; Thu, 1 Jul 2010 07:29:27 +0000 (UTC) Received: from [127.0.0.1] (unknown [192.168.1.239]) by mail.soupacific.com (Postfix) with ESMTP id 36DA86E549; Thu, 1 Jul 2010 07:21:19 +0000 (UTC) Message-ID: <4C2C43D5.1080907@soupacific.com> Date: Thu, 01 Jul 2010 16:29:25 +0900 From: "hiroshi@soupacific.com" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Mikolaj Golub References: <4C139F9C.2090305@soupacific.com> <86iq5oc82y.fsf@kopusha.home.net> <4C14215D.9090304@soupacific.com> <20100613003635.GA60012@icarus.home.lan> <20100613074921.GB1320@garage.freebsd.pl> <4C149A5C.3070401@soupacific.com> <20100613102401.GE1320@garage.freebsd.pl> <86eigavzsg.fsf@kopusha.home.net> <20100614095044.GH1721@garage.freebsd.pl> <868w6hwt2w.fsf@kopusha.home.net> <20100614153746.GN1721@garage.freebsd.pl> <86zkyxvc4v.fsf@kopusha.home.net> In-Reply-To: <86zkyxvc4v.fsf@kopusha.home.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org, Pawel Jakub Dawidek Subject: HAST and CARP X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 07:29:28 -0000 HI folks ! I finished to run HAST with CARP and ifstated. Question I haove now. SERVERA is master for CARP and HAST then boot SERVERB ServerB is using CARP and ifstated. First CARP state is INIT then BACKUP Similar to ucarp's method, vip-down.sh is called. vip-down.sh calls carp_down.sh Inside is almost same to ucarp_down.sh except delete ucarp staff. if I do not put hastctl create xxxx, then hastd refuse connection and message says Split-brain detected secondary ! I put debug call but I can not figure out what kind value is correct. } else if (res->hr_secondary_localcnt > res->hr_primary_remotecnt && res->hr_primary_localcnt > res->hr_secondary_remotecnt) { /* * Not good, we have split-brain condition. */ //hiroshi debug pjdlog_error("secondary_remotecnt %lu, primary_remotecnt %lu", res->hr_secondary_remotecnt, res->hr_primary_remotecnt); pjdlog_error("secondary_localcnt %lu, primary_localcnt %lu", res->hr_secondary_localcnt, res->hr_primary_localcnt); pjdlog_error("Split-brain detected, exiting."); nv_add_string(nvout, "Split-brain condition!", "errmsg"); free(map); map = NULL; mapsize = 0; } else /* if (res->hr_secondary_localcnt < res->hr_primary_remotecnt || hastctl status return perfect as secondary. Only looks like connection error. When using ucarp with debug Booting as secondary vip-up.sh then vip-down.sh But CARP, only calls vip-dwon.sh directly. Once I put hastctl create xxx before hastctl role secondary. Things works fine. Do I need hastctl create xxx or split-brain secondary is wrong? My complete files are here. http://www.soupacific.com/VivaFreeBSD_HAST/hastquick.html Anybody to try HAST with CARP, please try! but any mistake I made, All risk is your own please. My HAST, CARP and ifstated works fine! Thanks Hiroshi Katayama Hiorhis