Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 2016 14:23:46 +0400
From:      Shahin Hasanov <shahinhasanov@hotmail.com>
To:        FREEBSD_QUESTION <freebsd-questions@freebsd.org>
Subject:   RE: the switching time hastd from secondary to primary
Message-ID:  <DUB127-W36479628640DB40F39E12BB6CC0@phx.gbl>
In-Reply-To: <CAA2O=b84TtRyjYgFL9v1e36nERE4QFQoePx9LLFi10bC-cXHSA@mail.gmail.com>
References:  <DUB127-W2563827245EC96990575DDB6CC0@phx.gbl>, <CAA2O=b84TtRyjYgFL9v1e36nERE4QFQoePx9LLFi10bC-cXHSA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

In  /usr/local/sbin/ucarp_up.sh(below shown extract of it)  script ucarp waiting while it became primary. It tooks about 20 sec as written http://www.freebsd.org/cgi/man.cgi?query=hast.conf&apropos=0&sektion=0&manpath=FreeBSD+10.2-RELEASE&arch=default&format=html . 
 
for i in `jot 30`; do
        pgrep -f "hastd: ${resource} \(secondary\)" >/dev/null 2>&1 || break
        sleep 1
done
if pgrep -f "hastd: ${resource} \(secondary\)" >/dev/null 2>&1; then
        logger -p local0.error -t hast "Secondary process for resource ${resource} is still running after 30 seconds."
        exit 1
fi

 
Date: Thu, 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 янв. 2016 г. 10:25 пользователь "Shahin Hasanov" <shahinhasanov@hotmail.com> написал:

>

> 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

>

> resource HAST0 {

>    replication memsync

>    compression lzf

>    timeout 10

>    on node1 {

>          local /dev/da1p1

>          remote 10.190.190.4

>     }

>    on node2 {

>          local /dev/da1p1

>           remote 10.190.190.3

>          }

> }

http://www.freebsd.org/cgi/man.cgi?hastd

A hastd daemon never picks its role automatically. The role has to be configured 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. 		 	   		  


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