FreeBSD Manual Pages
HAST.CONF(5) FreeBSD File Formats Manual HAST.CONF(5) NAME hast.conf -- configuration file for the hastd(8) deamon and the hastctl(8) utility. DESCRIPTION The hast.conf file is used by both hastd(8) daemon and hastctl(8) control utility. Configuration file is designed in a way that exactly the same file can be (and should be) used on both HAST nodes. Every line starting with # is treated as comment and ignored. CONFIGURATION FILE SYNTAX General syntax of the hast.conf file is following: # Global section control <addr> listen <addr> replication <mode> timeout <seconds> on <node> { # Node section control <addr> listen <addr> } on <node> { # Node section control <addr> listen <addr> } resource <name> { # Resource section replication <mode> name <name> local <path> timeout <seconds> on <node> { # Resource-node section name <name> # Required local <path> # Required remote <addr> } on <node> { # Resource-node section name <name> # Required local <path> # Required remote <addr> } } Most of the various available configuration parameters are optional. If parameter is not defined in the particular section, it will be inherited from the parent section. For example, if the listen parameter is not defined in the node section, it will be inherited from the global sec- tion. In case the global section does not define the listen parameter at all, the default value will be used. CONFIGURATION FILE DESCRIPTION The <node> argument can be replaced either by a full hostname as obtained by gethostname(3), only first part of the hostname, or by node's UUID as found in the kern.hostuuid sysctl(8) variable. The following statements are available: control <addr> Address for communication with hastctl(8). Each of the following examples defines the same control address: uds:///var/run/hastctl unix:///var/run/hastctl /var/run/hastctl The default value is uds:///var/run/hastctl. listen <addr> Address to listen on in form of: protocol://protocol-specific-address Each of the following examples defines the same listen address: 0.0.0.0 0.0.0.0:8457 tcp://0.0.0.0 tcp://0.0.0.0:8457 tcp4://0.0.0.0 tcp4://0.0.0.0:8457 The default value is tcp4://0.0.0.0:8457. replication <mode> Replication mode should be one of the following: memsync Report the write operation as completed when local write com- pletes and when the remote node acknowledges the data receipt, but before it actually stores the data. The data on remote node will be stored directly after sending acknowl- edgement. This mode is intended to reduce latency, but still provides a very good reliability. The only situation where some small amount of data could be lost is when the data is stored on primary node and sent to the secondary. Secondary node then acknowledges data receipt and primary reports suc- cess to an application. However, it may happen that the sec- onderay goes down before the received data is really stored locally. Before secondary node returns, primary node dies entirely. When the secondary node comes back to life it becomes the new primary. Unfortunately some small amount of data which was confirmed to be stored to the application was lost. The risk of such a situation is very small, which is the reason for this mode to be the default. fullsync Mark the write operation as completed when local as well as remote write completes. This is the safest and the slowest replication mode. The fullsync replication mode is currently not implemented. async The write operation is reported as complete right after the local write completes. This is the fastest and the most dan- gerous replication mode. This mode should be used when replicating to a distant node where latency is too high for other modes. The async replication mode is currently not implemented. timeout <seconds> Connection timeout in seconds. The default value is 5. name <name> GEOM provider name that will appear as /dev/hast/_name_. If name is not defined, resource name will be used as provider name. local <path> Path to the local component which will be used as backend provider for the resource. This can be either GEOM provider or regular file. remote <addr> Address of the remote hastd daemon. Format is the same as for the listen statement. When operating as a primary node this address will be used to connect to the secondary node. When operating as a secondary node only connections from this address will be accepted. EXAMPLES The example configuration file can look as follows: resource shared { local /dev/da0 on hasta { remote tcp4://10.0.0.2 } on hastb { remote tcp4://10.0.0.1 } } resource tank { on hasta { local /dev/mirror/tanka remote tcp4://10.0.0.2 } on hastb { local /dev/mirror/tankb remote tcp4://10.0.0.1 } } FILES /etc/hast.conf The default hast.conf configuration file. /var/run/hastctl Control socket used by the hastctl(8) control utility to communicate with the hastd(8) daemon. SEE ALSO gethostname(3), geom(4), hastctl(8), hastd(8). AUTHORS The hast.conf was written by Pawel Jakub Dawidek <pjd@FreeBSD.org> under sponsorship of the FreeBSD Foundation. FreeBSD 11.1 February 1, 2010 FreeBSD 11.1
NAME | DESCRIPTION | CONFIGURATION FILE SYNTAX | CONFIGURATION FILE DESCRIPTION | EXAMPLES | FILES | SEE ALSO | AUTHORS
Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=hast.conf&sektion=5&manpath=FreeBSD+8.1-RELEASE>