1 .\" Copyright (c) 2010 The FreeBSD Foundation
2 .\" All rights reserved.
4 .\" This software was developed by Pawel Jakub Dawidek under sponsorship from
5 .\" the FreeBSD Foundation.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .Nd configuration file for the
49 Configuration file is designed in a way that exactly the same file can be
50 (and should be) used on both HAST nodes.
51 Every line starting with # is treated as comment and ignored.
52 .Sh CONFIGURATION FILE SYNTAX
56 .Bd -literal -offset indent
83 # Resource-node section
91 # Resource-node section
101 Most of the various available configuration parameters are optional.
102 If parameter is not defined in the particular section, it will be
103 inherited from the parent section.
106 parameter is not defined in the node section, it will be inherited from
108 In case the global section does not define the
110 parameter at all, the default value will be used.
111 .Sh CONFIGURATION FILE DESCRIPTION
114 argument can be replaced either by a full hostname as obtained by
116 only first part of the hostname, or by node's UUID as found in the
121 The following statements are available:
122 .Bl -tag -width ".Ic xxxx"
123 .It Ic control Aq addr
125 Address for communication with
127 Each of the following examples defines the same control address:
128 .Bd -literal -offset indent
129 uds:///var/run/hastctl
130 unix:///var/run/hastctl
135 .Pa uds:///var/run/hastctl .
136 .It Ic listen Aq addr
138 Address to listen on in form of:
139 .Bd -literal -offset indent
140 protocol://protocol-specific-address
143 Each of the following examples defines the same listen address:
144 .Bd -literal -offset indent
154 .Pa tcp4://0.0.0.0:8457 .
155 .It Ic replication Aq mode
157 Replication mode should be one of the following:
158 .Bl -tag -width ".Ic xxxx"
161 Report the write operation as completed when local write completes and
162 when the remote node acknowledges the data receipt, but before it
163 actually stores the data.
164 The data on remote node will be stored directly after sending
166 This mode is intended to reduce latency, but still provides a very good
168 The only situation where some small amount of data could be lost is when
169 the data is stored on primary node and sent to the secondary.
170 Secondary node then acknowledges data receipt and primary reports
171 success to an application.
172 However, it may happen that the seconderay goes down before the received
173 data is really stored locally.
174 Before secondary node returns, primary node dies entirely.
175 When the secondary node comes back to life it becomes the new primary.
176 Unfortunately some small amount of data which was confirmed to be stored
177 to the application was lost.
178 The risk of such a situation is very small, which is the reason for this
179 mode to be the default.
182 Mark the write operation as completed when local as well as remote
184 This is the safest and the slowest replication mode.
187 replication mode is currently not implemented.
190 The write operation is reported as complete right after the local write
192 This is the fastest and the most dangerous replication mode.
193 This mode should be used when replicating to a distant node where
194 latency is too high for other modes.
197 replication mode is currently not implemented.
199 .It Ic timeout Aq seconds
201 Connection timeout in seconds.
206 GEOM provider name that will appear as
207 .Pa /dev/hast/<name> .
208 If name is not defined, resource name will be used as provider name.
211 Path to the local component which will be used as backend provider for
213 This can be either GEOM provider or regular file.
214 .It Ic remote Aq addr
216 Address of the remote
219 Format is the same as for the
222 When operating as a primary node this address will be used to connect to
224 When operating as a secondary node only connections from this address
228 The example configuration file can look as follows:
229 .Bd -literal -offset indent
234 remote tcp4://10.0.0.2
237 remote tcp4://10.0.0.1
242 local /dev/mirror/tanka
243 remote tcp4://10.0.0.2
246 local /dev/mirror/tankb
247 remote tcp4://10.0.0.1
252 .Bl -tag -width ".Pa /var/run/hastctl" -compact
253 .It Pa /etc/hast.conf
257 .It Pa /var/run/hastctl
258 Control socket used by the
260 control utility to communicate with the
273 .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
274 under sponsorship of the FreeBSD Foundation.