Back in October we mentioned that the FreeBSD Foundation decided the fund the HAST project (new FreeBSD Project: HAST)
Pawel Jakub Dawidek, the sponsored FreeBSD developer, has made quite a bit of progress since and finished the development of stage one:
I want to report that first milestone of the HAST project is complete.
Summary of the work that have been done:
- Implementation of hastd daemon.
- Implementation of hastctl utility to manage hastd daemons.
- GEOM_GATE class was extended so that the caller can specify the name of GEOM provider. Before only /dev/ggateX names were supported. HAST will use /dev/hast/
- Implementation of communication protocol. There is abstraction layer on top and below there are three protocols implemented currently:
- proto_tcp4 – It is used for communication between primary and secondary nodes.
- proto_uds – (UDS – UNIX Domain Socket) It is used for communication between hastctl and hastd.
- proto_socketpair – It is used for communication between main hastd daemon and worker processes forked from it.
- Implementation of nv (name-value) API, which allows to easy create packets containing name-value pairs. It is used for entire communication through the protocols above. It is also responsible for managing correct byte-order.
- Implementation of ebuf (extendable buffer) API, which provides a way to extend given buffer by adding data at the back, but also at the front without reallocating it and copying the data very often (or never).
- Implementation of logging API (pjdlog). The API decides if messages should be logged on standard output/error (before going into background) or to syslog (when we daemonize). It also provides some shortcuts for logging a message and exiting, etc. It supports notion of debug level and can skip messages intended for higher debug level than requested.
- Implementation of configuration file parser in lex/yacc. Configuration file is designed in a way that it can be kept identical on both nodes.
- Checksumming and compression for the data is not one of the project’s goal, but the stubs are there, so this can be added easly.
- A lot of care was taken to be able to handle more nodes in the future. This is not implemented and in not project goal, but I wanted to make it ready for future improvements (source)
HAST enables users to use the FreeBSD operating system for highly available configurations where data has to be shared across the cluster nodes. The software will allow for synchronous block-level replication of any storage media (GEOM providers, using FreeBSD nomenclature) over the TCP/IP network and for fast failure recovery. HAST will provide storage using GEOM infrastructure, which means it will be file system and application independent and could be combined with any existing GEOM class. In case of a master node failure, the cluster will be able to switch to the slave node, check and mount UFS file system or import ZFS pool and continue to work without missing a single bit of data.
(BTW, I’m in no way affiliated with the work of the FreeBSD Foundation; I only want to see FreeBSD progress to become even better)