History log of /freebsd-current/sbin/hastd/hastd.c
Revision Date Author Comments
# 32e86a82 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 1c86e811 29-Nov-2020 Eugene Grosbein <eugen@FreeBSD.org>

hastd(8) assumes it has no extra file descriptors opened
and aborts otherwise, so call closefrom() early.

PR: 227461
MFC after: 2 weeks


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# 67210fb3 21-Apr-2016 Marcelo Araujo <araujo@FreeBSD.org>

Use MAX() from sys/param.h.

MFC after: 2 weeks.


# f8665529 10-Dec-2013 Mikolaj Golub <trociny@FreeBSD.org>

Check remote protocol version only for the first connection (when it
is actually sent by the remote node).

Otherwise it generated confusing "Negotiated protocol version 1" debug
messages when processing the second connection.

MFC after: 2 weeks


# d6e636c9 17-Feb-2013 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Add support for 'memsync' mode. This is the fastest replication mode that's
why it will now be the default.
- Bump protocol version to 2 and add backward compatibility for version 1.
- Allow to specify hosts by kern.hostid as well (in addition to hostname and
kern.hostuuid) in configuration file.

Sponsored by: Panzura
Tested by: trociny


# 7f995f69 29-Mar-2012 Mikolaj Golub <trociny@FreeBSD.org>

If hastd is invoked with "-P pidfile" option always create pidfile
regardless of whether -F (foreground) option is set or not.

Also, if -P option is specified, ignore pidfile setting from configuration
not only on start but on reload too. This fixes the issue when for hastd
run with -P option reload caused the pidfile change.

Reviewed by: pjd
MFC after: 1 week


# 4ed472a1 22-Jan-2012 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Free memory that won't be used in child.

MFC after: 1 week


# 4bbeefbb 10-Jan-2012 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Fix a bug where pidfile was removed in SIGHUP when it hasn't changed in
configuration file.
- Log the fact that pidfile has changed.

MFC after: 3 days


# 2b1b224d 10-Jan-2012 Pawel Jakub Dawidek <pjd@FreeBSD.org>

For functions that return -1 on failure check exactly for -1 and not for
any negative number.

MFC after: 3 days


# 45bd093c 10-Jan-2012 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Don't touch pidfiles when running in foreground. Before that change we
would create an empty pidfile on start and check if it changed on SIGHUP.

MFC after: 3 days


# 4b85a12f 07-Jan-2012 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for sbin/


# bd738d63 16-Oct-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Allow to specify pidfile in HAST configuration file.

MFC after: 1 week


# 6fea20e2 17-Oct-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.

MFC after: 1 week


# 518dd4c0 28-Sep-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

After every activemap change flush disk's write cache, so that write
reordering won't make the actual write to be committed before marking
the coresponding extent as dirty.

It can be disabled in configuration file.

If BIO_FLUSH is not supported by the underlying file system we log a warning
and never send BIO_FLUSH again to that GEOM provider.

MFC after: 3 days


# d4cb6369 19-May-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

In preparation for IPv6 support allow to specify multiple addresses to
listen on.

MFC after: 3 weeks


# 7a2b8368 26-Apr-2011 Mikolaj Golub <trociny@FreeBSD.org>

Rename HASTCTL_ defines, which are used for conversion between main
hastd process and workers, remove unused one and set different range
of numbers. This is done in order not to confuse them with HASTCTL_CMD
defines, used for conversation between hastctl and hastd, and to avoid
bugs like the one fixed in in r221075.

Approved by: pjd (mentor)
MFC after: 1 week


# 8e15d1e4 20-Apr-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Correct comment.

MFC after: 1 week


# ac0401e3 20-Apr-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

When we become primary, we connect to the remote and expect it to be in
secondary role. It is possible that the remote node is primary, but only
because there was a role change and it didn't finish cleaning up (unmounting
file systems, etc.). If we detect such situation, wait for the remote node
to switch the role to secondary before accepting I/Os. If we don't wait for
it in that case, we will most likely cause split-brain.

MFC after: 1 week


# 0eb02c03 20-Apr-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

If we act in different role than requested by the remote node, log it
as a warning and not an error.

MFC after: 1 week


# 640b7ee6 23-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Don't create socketpair for connection forwarding between parent and secondary.
Secondary doesn't need to connect anywhere.

MFC after: 1 week


# cd72d521 22-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

White space cleanups.

MFC after: 1 week


# 351758d8 21-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Before handling any events on descriptors check signals so we can update
our info about worker processes if any of them was terminated in the meantime.

This fixes the problem with 'hastctl status' running from a hook called on
split-brain:
1. Secondary calls a hooks and terminates.
2. Hook asks for resource status via 'hastctl status'.
3. The main hastd handles the status request by sending it to the secondary
worker who is already dead, but because signals weren't checked yet he
doesn't know that and we get EPIPE.

MFC after: 1 week


# 0b626a28 21-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

In hast.conf we define the other node's address in 'remote' variable.
This way we know how to connect to secondary node when we are primary.
The same variable is used by the secondary node - it only accepts
connections from the address stored in 'remote' variable.
In cluster configurations it is common that each node has its individual
IP address and there is one addtional shared IP address which is assigned
to primary node. It seems it is possible that if the shared IP address is
from the same network as the individual IP address it might be choosen by
the kernel as a source address for connection with the secondary node.
Such connection will be rejected by secondary, as it doesn't come from
primary node individual IP.

Add 'source' variable that allows to specify source IP address we want to
bind to before connecting to the secondary node.

MFC after: 1 week


# 4f0ec479 21-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

When creating connection on behalf of primary worker, set pjdlog prefix
to resource name and role, so that any logs related to that can be identified
properly.

MFC after: 1 week


# c3a8627c 21-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

If there is any traffic on one of out descriptors, we were not checking for
long running hooks. Fix it by not using select(2) timeout to decide if we want
to check hooks or not.

MFC after: 1 week


# 8cd3d45a 06-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Allow to compress on-the-wire data using two algorithms:
- HOLE - it simply turns all-zero blocks into few bytes header;
it is extremely fast, so it is turned on by default;
it is mostly intended to speed up initial synchronization
where we expect many zeros;
- LZF - very fast algorithm by Marc Alexander Lehmann, which shows
very decent compression ratio and has BSD license.

MFC after: 2 weeks


# 1fee97b0 06-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Allow to checksum on-the-wire data using either CRC32 or SHA256.

MFC after: 2 weeks


# e84a29b6 06-Feb-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Now that we break the loop on fstat(2) failure we no longer need to satisfy
gcc's imperfections.

MFC after: 1 week


# 207ee3cd 06-Feb-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Add (void) cast before snprintf(3)s for which we are not interested in return
values.

MFC after: 1 week


# ee3a876c 06-Feb-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Treat fstat(2) failure (different than EBADF) as fatal error.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 1 week


# 18d6e1a5 06-Feb-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Open syslog when logging sysconf(3) failure.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 1 week


# 5aa85abd 05-Feb-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Close more descriptors that can be open if the worker process for the given
resource is already running.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 1 week


# 32ecf620 03-Feb-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Setup another socketpair between parent and child, so that primary sandboxed
worker can ask the main privileged process to connect in worker's behalf
and then we can migrate descriptor using this socketpair to worker.
This is not really needed now, but will be needed once we start to use
capsicum for sandboxing.

MFC after: 1 week


# 2ec483c5 31-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Use pjdlog for assertions and aborts as this will log assert/abort message
to syslog if we run in background.
- Asserts in proto.c that method we want to call is implemented and remove
dummy methods from protocols implementation that are only there to abort
the program with nice message.

MFC after: 1 week


# 579fd4b2 28-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Add function to assert that the only descriptors we have open are the ones
we expect to be open. Also assert that they point at expected type.

Because openlog(3) API is unable to tell us descriptor number it is using, we
have to close syslog socket, remember assert message in local buffer and if we
fail on assertion, reopen syslog socket and log the message.

MFC after: 1 week


# c3c56f8e 28-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Add function to close all unneeded descriptors after fork(2).

MFC after: 1 week


# c0dbce00 27-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Close the control socket before exiting, so it will be unlinked.

MFC after: 1 week


# eeb3cd67 27-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Add functions to initialize/finalize pjdlog. This allows to open/close log
file at will.

MFC after: 1 week


# 115f4e5c 24-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Don't open configuration file from worker process. Handle SIGHUP in the
master process only and pass changes to the worker processes over control
socket. This removes access to global namespace in preparation for capsicum
sandboxing.

MFC after: 2 weeks


# 5ed118d8 22-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- On primary worker reload, update hr_exec field.
- Update comment.

MFC after: 1 week


# 9cc97e58 12-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Install default signal handlers before masking signals we want to handle.
It is possible that the parent process ignores some of them and sigtimedwait()
will never see them, eventhough they are masked.

The most common situation for this to happen is boot process where init(8)
ignores SIGHUP before starting to execute /etc/rc. This in turn caused
hastd(8) to ignore SIGHUP.

Reported by: trasz
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after: 3 days


# 347bde36 16-Dec-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Log the fact of launching and include protocol version number.

MFC after: 3 days


# 2964aeb3 24-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Load geom_gate.ko module after parsing arguments.

MFC after: 3 days


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 3f562cce 17-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Log correct connection when canceling half-open connection.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# 428ad0a9 04-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Decrease report interval to 5 seconds, as this also means we will check for
signals every 5 seconds and not every 10 seconds as before.

MFC after: 3 days


# 5f24b330 04-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

hook_check() is now only used to report about long-running hooks, so the
argument is redundant, remove it.

MFC after: 3 days


# 41013c0b 04-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

We can't mask ignored signal, so install dummy signal hander for SIGCHLD before
masking it.

This fixes bogus reports about hooks running for too long and other problems
related to garbage-collecting child processes.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# 9dd5a6cb 22-Sep-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Switch to sigprocmask(2) API also in the main process and secondary process.
This way the primary process inherits signal mask from the main process,
which fixes a race where signal is delivered to the primary process before
configuring signal mask.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# 196abd35 22-Sep-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Assert that descriptor numbers are sane.

MFC after: 3 days


# 0c24d8e2 22-Sep-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Fix descriptor leaks: when child exits, we have to close control and event
socket pairs. We did that only in one case out of three.

MFC after: 3 days


# 5bdff860 30-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Because it is very hard to make fork(2) from threaded process safe (we are
limited to async-signal safe functions in the child process), move all hooks
execution to the main (non-threaded) process.

Do it by maintaining connection (socketpair) between child and parent
and sending events from the child to parent, so it can execute the hook.

This is step in right direction for others reasons too. For example there is
one less problem to drop privs in worker processes.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# 6b276294 30-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

We only want to know if descriptors are ready for reading.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# ecc99c89 29-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Allow to run hooks from the main hastd process.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# 5da23209 27-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

When SIGTERM or SIGINT is received, terminate worker processes.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# 0becad39 27-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Allow to execute specified program on various HAST events.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# 0989854d 05-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Implement configuration reload on SIGHUP. This includes:
- Load added resources.
- Stop and forget removed resources.
- Update modified resources in least intrusive way, ie. don't touch
/dev/hast/<name> unless path to local component or provider name were
modified.

Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after: 1 month


# bbbb114c 05-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Prepare configuration parsing code to be called multiple times:
- Don't exit on errors if not requested.
- Don't keep configuration in global variable, but allocate memory for
configuration.
- Call yyrestart() before yyparse() so that on error in configuration file
we will start from the begining next time and not from the place we left of.

MFC after: 1 month


# 005f438b 05-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Use pjdlog_exitx() to log errors and exit instead of errx().
- Use 'unable to' (instead of 'cannot') consistently.

MFC after: 1 month


# c9697b73 23-Jun-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

MFC r209263:

r209175:

Eliminate dead code.

Found by: Coverity Prevent
CID: 5158

r209177:

Remove macros that are not really needed. The idea was to have them in case
we grow more descriptors, but I'll reconsider readding them once we get there.

Passing (a = b) expression to FD_ISSET() is bad idea, as FD_ISSET() evaluates
its argument twice.

Found by: Coverity Prevent
CID: 5243

r209179:

Plug memory leaks.

Found by: Coverity Prevent
CID: 7052, 7053, 7054, 7055

r209180:

Plug memory leak.

Found by: Coverity Prevent
CID: 7051

r209181:

Plug memory leak.

Found by: Coverity Prevent
CID: 7056

r209182:

Plug memory leak.

Found by: Coverity Prevent
CID: 7057

r209183:

Initialize gctl_seq for synchronization requests.

Reported by: hiroshi@soupacific.com
Analysed by: Mikolaj Golub <to.my.trociny@gmail.com>
Tested by: hiroshi@soupacific.com, Mikolaj Golub <to.my.trociny@gmail.com>

r209184:

Fix typos.

r209185:

Correct various log messages.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

Note that without some of these changes hastd won't work on 8.x properly.

Approved by: re (kensmith)


# f3bd7412 14-Jun-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Correct various log messages.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# 9fab3c1b 14-Jun-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Remove macros that are not really needed. The idea was to have them in case
we grow more descriptors, but I'll reconsider readding them once we get there.

Passing (a = b) expression to FD_ISSET() is bad idea, as FD_ISSET() evaluates
its argument twice.

Found by: Coverity Prevent
CID: 5243
MFC after: 3 days


# badd3232 01-May-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

MFC r207070,r207343,r207345,r207347,r207348,r207371,r207372,r207390:

r207070:

Fix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.

Reported by: Andrei V. Lavreniyuk <andy.lavr@reactor-xg.kiev.ua>

r207343:

Don't assume that "resource" property is in metadata.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>

r207345:

Use WEXITSTATUS() to obtain real exit code.

r207347:

Mark temporary issues as such.

r207348:

Restart worker thread only if the problem was temporary.
In case of persistent problem we don't want to loop forever.

r207371:

Fix a problem where hastd will stuck in recv(2) after sending request to
secondary, which died between send(2) and recv(2). Do it by adding timeout
to recv(2) for primary incoming and outgoing sockets and secondary outgoing
socket.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>
Tested by: Mikolaj Golub <to.my.trociny@gmail.com>

r207372:

- Check if the worker process was killed by signal and restart it.
- Improve logging.

Pointed out by: Garrett Cooper <yanefbsd@gmail.com>

r207390:

Default connection timeout is way too long. To make it shorter we have to
make socket non-blocking, connect() and if we get EINPROGRESS, we have to
wait using select(). Very complex, but I know no other way to define
connection timeout for a given socket.

Reported by: hiroshi@soupacific.com


# c6ddcbe0 29-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Check if the worker process was killed by signal and restart it.
- Improve logging.

Pointed out by: Garrett Cooper <yanefbsd@gmail.com>
MFC after: 3 days


# 5571414c 29-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Fix a problem where hastd will stuck in recv(2) after sending request to
secondary, which died between send(2) and recv(2). Do it by adding timeout
to recv(2) for primary incoming and outgoing sockets and secondary outgoing
socket.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>
Tested by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# 83a56714 28-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Restart worker thread only if the problem was temporary.
In case of persistent problem we don't want to loop forever.

MFC after: 3 days


# 06c117d1 28-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Use WEXITSTATUS() to obtain real exit code.

MFC after: 3 days


# c44c50cd 18-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

MFC r204177,r205738,r206669,r206696,r206697:

r204177:

Changing proto_socketpair.c compilation and linking order revealed
a problem - we should simply ignore proto_server() if address
doesn't start with socketpair://, and not abort.

r205738:

Don't hold connection lock when doing reconnects as it makes I/Os wait for
connection timeouts.

Reported by: Kevin Day <toasty@dragondata.com>

r206669:

Increase ggate queue size to maximum value.
HAST was not able to stand heavy random load.

Reported by: Hiroyuki Yamagami

r206696:

Fix control socket leak when worker process exits.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

r206697:

Fix log size calculation which caused message truncation.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>


# 2b98f840 18-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

MFC r204076,r204077,r204083,r205279:

r204076:

Please welcome HAST - Highly Avalable Storage.

HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by: FreeBSD Foundation
Sponsored by: OMCnet Internet Service GmbH
Sponsored by: TransIP BV

r204077:

Remove some lines left over by accident.

r204083:

Add missing KEYWORD line.

Pointed out by: dougb

r205279 sys:

Simplify loops.


# 09398e9b 16-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Fix control socket leak when worker process exits.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 32115b10 18-Feb-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Please welcome HAST - Highly Avalable Storage.

HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by: FreeBSD Foundation
Sponsored by: OMCnet Internet Service GmbH
Sponsored by: TransIP BV