From owner-freebsd-questions@freebsd.org Thu Jan 14 10:24:56 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA933A81E91 for ; Thu, 14 Jan 2016 10:24:56 +0000 (UTC) (envelope-from shahinhasanov@hotmail.com) Received: from DUB004-OMC4S33.hotmail.com (dub004-omc4s33.hotmail.com [157.55.2.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39C921353 for ; Thu, 14 Jan 2016 10:24:56 +0000 (UTC) (envelope-from shahinhasanov@hotmail.com) Received: from DUB127-W36 ([157.55.2.72]) by DUB004-OMC4S33.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Thu, 14 Jan 2016 02:23:46 -0800 X-TMN: [YtKsTU5bimSX8GcDdnbX758PPhs8rZma] X-Originating-Email: [shahinhasanov@hotmail.com] Message-ID: From: Shahin Hasanov To: FREEBSD_QUESTION Subject: RE: the switching time hastd from secondary to primary Date: Thu, 14 Jan 2016 14:23:46 +0400 Importance: Normal In-Reply-To: References: , MIME-Version: 1.0 X-OriginalArrivalTime: 14 Jan 2016 10:23:46.0879 (UTC) FILETIME=[A70784F0:01D14EB5] Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 10:24:56 -0000 In /usr/local/sbin/ucarp_up.sh(below shown extract of it) script ucarp wa= iting while it became primary. It tooks about 20 sec as written http://www.= freebsd.org/cgi/man.cgi?query=3Dhast.conf&apropos=3D0&sektion=3D0&manpath= =3DFreeBSD+10.2-RELEASE&arch=3Ddefault&format=3Dhtml .=20 =20 for i in `jot 30`=3B do pgrep -f "hastd: ${resource} \(secondary\)" >/dev/null 2>&1 || brea= k sleep 1 done if pgrep -f "hastd: ${resource} \(secondary\)" >/dev/null 2>&1=3B then logger -p local0.error -t hast "Secondary process for resource ${re= source} is still running after 30 seconds." exit 1 fi =20 Date: Thu=2C 14 Jan 2016 11:31:58 +0300 Subject: Re: the switching time hastd from secondary to primary From: vsasjason@gmail.com To: shahinhasanov@hotmail.com CC: freebsd-questions@freebsd.org 14 =FF=ED=E2. 2016 =E3. 10:25 =EF=EE=EB=FC=E7=EE=E2=E0=F2=E5=EB=FC "Shahin = Hasanov" =ED=E0=EF=E8=F1=E0=EB: =0A= > =0A= > I can't change the switching time hastd from secondary to primary. it is = default time 20 sec.is it possible? In despite of that in etc/hast.conf was= written timeout 10 =0A= > =0A= > resource HAST0 { =0A= > replication memsync =0A= > compression lzf =0A= > timeout 10 =0A= > on node1 { =0A= > local /dev/da1p1 =0A= > remote 10.190.190.4 =0A= > } =0A= > on node2 { =0A= > local /dev/da1p1 =0A= > remote 10.190.190.3 =0A= > } =0A= > } =0A= http://www.freebsd.org/cgi/man.cgi?hastd =0A= A hastd daemon never picks its role automatically. The role has to be confi= gured with the hastctl(8) control utility by additional software like ucarp= or heartbeat that can reliably manage role separation and switch secondary= node to primary role in case of the primary's failure. =