Metaloggers
A metalogger connects to the master and receives a copy of every changelog entry, plus periodic full downloads of the metadata image. Unlike a shadow master, a metalogger does not participate in consensus and can never become the master — it is a pure, independent backup of the cluster metadata.
Run a metalogger on a host separate from the master so a master‑host failure cannot take the backup with it. The basic enablement (install saunafs-metalogger, start the service) is covered in Service configuration; this page details the configuration and how the metalogger feeds recovery.
Configuration (leil-metalogger.cfg)
# /etc/saunafs/leil-metalogger.cfg
MASTER_HOST = 192.168.10.10
MASTER_PORT = 9419
DATA_PATH = /var/lib/saunafs/metalogger
BACK_LOGS = 50
BACK_META_KEEP_PREVIOUS = 3
META_DOWNLOAD_FREQ = 24
| Option | Meaning | Default |
|---|---|---|
MASTER_HOST | Address of the master to back up | leil-master |
MASTER_PORT | Metalogger port on the master (MATOML) | 9419 |
DATA_PATH | Where downloaded metadata and changelogs are stored | (required) |
WORKING_USER / WORKING_GROUP | User/group the service runs as | (user required) |
BACK_LOGS | Number of changelog files to retain | 50 |
BACK_META_KEEP_PREVIOUS | Previous metadata images to keep | 3 |
META_DOWNLOAD_FREQ | Hours between full metadata downloads (at most BACK_LOGS/2) | 24 |
MASTER_RECONNECTION_DELAY | Seconds before retrying a lost master connection | 30 |
MASTER_TIMEOUT | Seconds before a master connection is considered dead | 60 |
TLS_CERT_FILE / TLS_KEY_FILE / TLS_CA_CERT_FILE | TLS material when the cluster runs with TLS | (none) |
Reload or restart the service after editing:
sudo systemctl restart saunafs-metalogger
Using a metalogger for recovery
A metalogger's DATA_PATH contains everything needed to rebuild metadata up to the last received changelog entry: the periodic metadata image plus the changelogs since. In a disaster where every master and shadow is lost, that data is copied to a fresh master host and replayed.
The full break‑glass procedure — including the leil-master -a (--auto-recovery) rebuild and consistency verification — is documented in Metadata recovery.
Test metalogger‑based recovery periodically in a non‑production environment. Do not assume recovery works until you have actually performed it end to end.