the switching time hastd from secondary to primary

Shahin Hasanov shahinhasanov at
Thu Jan 14 10:24:56 UTC 2016

In  /usr/local/sbin/ shown extract of it)  script ucarp waiting while it became primary. It tooks about 20 sec as written . 
for i in `jot 30`; do
        pgrep -f "hastd: ${resource} \(secondary\)" >/dev/null 2>&1 || break
        sleep 1
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

Date: Thu, 14 Jan 2016 11:31:58 +0300
Subject: Re: the switching time hastd from secondary to primary
From: vsasjason at
To: shahinhasanov at
CC: freebsd-questions at

14 янв. 2016 г. 10:25 пользователь "Shahin Hasanov" <shahinhasanov at> написал:


> I can't change the switching time hastd from secondary to primary. it is default time 20 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

>     }

>    on node2 {

>          local /dev/da1p1

>           remote

>          }

> }

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. 		 	   		  

More information about the freebsd-questions mailing list