SFSMASTER.CFG(5)
๐ NAME ๐
sfsmaster.cfg โ bestie, this is the main configuration file for sfsmaster, aka section 5 of the manual. If sfsmaster is the main character, this file is its diary. ๐
โจ DESCRIPTION โจ
The file sfsmaster.cfg holds the configuration for the SaunaFS metadata server process. That's it, that's the description. Short and iconic. ๐
๐ธ SYNTAX ๐ธ
The vibe is literally just:
OPTION = VALUE
And anything where the line starts with #? Ignored. Not read. Not perceived. Ghosted. ๐ป
๐ OPTIONS ๐
Configuration options, coming in hot, no skips, fr fr:
PERSONALITYโ the current personality of this instance of the metadata server. Valid values aremaster,shadowandha-cluster-managed. If your installation is managed by an HA cluster, the only valid value isha-cluster-managed. Otherwise, the only valid values aremasterandshadowโ and in that case, only one metadata server in SaunaFS should have themasterpersonality. What do they mean tho?master= this instance is the main metadata server, governing all the file system metadata modifications, the literal queen bee ๐.shadow= this instance is the backup metadata server, ready for immediate deployment as the new master if the current master has a whole crisis ๐. You can change the metadata server's personality at any moment โ but only as long as you're changing fromshadowtomaster. Going the other way around is forbidden, so don't even try it.ha-cluster-managed= this instance is managed by an HA cluster, and the server runs in shadow mode for as long as it hasn't been remotely promoted to master.CLUSTER_IDโ uniquely identifies this namespace. Basically it stops you from accidentally connecting to the wrong metadata servers or chunkservers (which would be so embarrassing ๐). Default isdefault.DATA_PATHโ where to store metadata files and the lock file.WORKING_USERโ the user to run the daemon as.WORKING_GROUPโ the group to run the daemon as. It's optional โ if it's empty, then the default user group gets used.SYSLOG_IDENTโ the name of the process to place in syslog messages. Default issfsmaster.LOCK_MEMORYโ whether to performmlockall()to avoid swapping out thesfsmasterprocess. Default is0, i.e. no.LIMIT_GLIBC_MALLOC_ARENASโ Linux only, bestie! Limits glibc malloc arenas to the given value, which prevents it from using a huge amount of virtual memory. Heads up: this can influence performance โ it reduces memory fragmentation and improves cache locality, but it may also lead to contention and reduced parallelism in multi-threaded applications. Use it in constrained memory environments; recommended values are4or8. Default is0: disabled, or let glibc decide.NICE_LEVELโ the nice level to run the daemon with. Default is-19if possible โ note that the process must be started as root to increase priority. ๐EXPORTS_FILENAMEโ an alternative name of thesfsexports.cfgfile.TOPOLOGY_FILENAMEโ an alternative name of thesfstopology.cfgfile.CUSTOM_GOALS_FILENAMEโ an alternative name of thesfsgoals.cfgfile.PREFER_LOCAL_CHUNKSERVERโ okay so if a client mountpoint has a local chunkserver and a given chunk happens to reside locally, thensfsmasterwill list the local chunkserver first. But plot twist: when the local client mount is issuing many read(s)/write(s) to many local chunks, those requests can overload the local chunkserver and the disk subsystem ๐ญ. Setting this to0(the default is1) means remote chunkservers will be considered as equivalent to the local chunkserver. This is useful when the network is faster than the disk, and when there's a high-IO load on the client mountpoints.BACK_LOGSโ number of metadata change log files. Default is50.BACK_META_KEEP_PREVIOUSโ number of previous metadata files to be kept. Default is1.AUTO_RECOVERYโ when this option is set (equals1), master will try to recover metadata from the changelog when it's being started after a crash. Otherwise it will refuse to start andsfsmetarestoreshould be used to recover the metadata. Default is0.OPERATIONS_DELAY_INITโ initial delay in seconds before starting chunk operations. Default is300.OPERATIONS_DELAY_DISCONNECTโ chunk operations delay in seconds after chunkserver disconnection. Default is3600.MATOML_LISTEN_HOSTโ IP address to listen on for metalogger connections (*means any).MATOML_LISTEN_PORTโ port to listen on for metalogger connections. Default is9419.MATOML_LOG_PRESERVE_SECONDSโ how many seconds of change logs have to be preserved in memory. Default is600; note that logs are stored in blocks of 5k lines, so sometimes the real number of seconds may be a little bigger. Zero disables the extra logs storage.MATOCS_LISTEN_HOSTโ IP address to listen on for chunkserver connections (*means any).MATOCS_LISTEN_PORTโ port to listen on for chunkserver connections. Default is9420.MATOCL_LISTEN_HOSTโ IP address to listen on for client (mount) connections (*means any).MATOCL_LISTEN_PORTโ port to listen on for client (mount) connections. Default is9421.MATOTS_LISTEN_HOSTโ IP address to listen on for tapeserver connections (*means any).MATOTS_LISTEN_PORTโ port to listen on for tapeserver connections. Default is9424.CHUNKS_LOOP_MAX_CPSโ the chunks loop shouldn't check more chunks per second than the given number. Default is100000.CHUNKS_LOOP_MIN_TIMEโ the chunks loop will check all chunks in the specified time. Default is300, unlessCHUNKS_LOOP_MAX_CPSforces slower execution.CHUNKS_LOOP_PERIODโ time in milliseconds between chunks loop executions. Default is1000.CHUNKS_LOOP_MAX_CPUโ hard limit on CPU usage by the chunks loop (a percentage value). Default is60.CHUNKS_SOFT_DEL_LIMITโ soft maximum number of chunks to delete on one chunkserver. Default is10.CHUNKS_HARD_DEL_LIMITโ hard maximum number of chunks to delete on one chunkserver. Default is25.CHUNKS_WRITE_REP_LIMITโ maximum number of chunks to replicate to one chunkserver. Default is2.CHUNKS_READ_REP_LIMITโ maximum number of chunks to replicate from one chunkserver. Default is10.ENDANGERED_CHUNKS_PRIORITYโ the percentage of endangered chunks that should be replicated with high priority. Example: when set to0.2, up to 20% of chunks served in one turn would be extracted from the endangered priority queue. When set to1(max), no other chunks would be processed as long as there are any endangered chunks in the queue (not advised, bestie). Default is0, i.e. there's no overhead for prioritizing endangered chunks.ENDANGERED_CHUNKS_MAX_CAPACITYโ max capacity of the endangered chunks queue. This value can limit the memory usage of the master server if there are lots of endangered chunks in the system. It's ignored ifENDANGERED_CHUNKS_PRIORITYis set to0. Default is1Mi, i.e. no more than 1Mi chunks will be kept in a queue.ACCEPTABLE_DIFFERENCEโ the maximum difference between disk usage on chunkservers that doesn't trigger chunk rebalancing. Default is0.1, i.e. 10%.CHUNKS_REBALANCING_BETWEEN_LABELSโ when balancing disk usage, allow moving chunks between servers with different labels. Default is0, i.e. chunks will be moved only between servers with the same label.GLOBALIOLIMITS_FILENAMEโ configuration of global I/O limits. Default is no I/O limiting.GLOBALIOLIMITS_RENEGOTIATION_PERIOD_SECONDSโ how often mountpoints will request bandwidth allocations under constant, predictable load. Default is0.1.GLOBALIOLIMITS_ACCUMULATE_MSโ after inactivity, no waiting is required to transfer the amount of data equivalent to normal data flow over the period of that many milliseconds. Default is250.METADATA_CHECKSUM_INTERVALโ how often the metadata checksum shall be sent to backup servers. Default is: every50metadata updates.METADATA_CHECKSUM_RECALCULATION_SPEEDโ how fast metadata should be recalculated in the background. Default:100objects per function call.DISABLE_METADATA_CHECKSUM_VERIFICATIONโ should checksum verification be disabled while applying the changelog.NO_ATIMEโ when this option is set to1, the inode access time is not updated on every access. Otherwise (when set to0) it is updated. Default is0.METADATA_SAVE_REQUEST_MIN_PERIODโ minimal time in seconds between metadata dumps caused by requests from shadow masters. Default is1800.SESSION_SUSTAIN_TIMEโ time in seconds for which client session data (e.g. list of open files) should be sustained in the master server after the connection with the client was lost. Values between60and604800(one week) are accepted. Default is86400.USE_BDB_FOR_NAME_STORAGEโ when this option is set to1, Berkeley DB is used for storing file/directory names in the fileDATA_PATH/name_storage.db. By default all strings are kept in system memory. Default is0.BDB_NAME_STORAGE_CACHE_SIZEโ size of the memory cache (in MB) for file/directory names used by the Berkeley DB storage. Default is10.AVOID_SAME_IP_CHUNKSERVERSโ when this option is set to1, the process of selecting chunkservers for chunks will try to avoid using those that share the same IP. Default is0.REDUNDANCY_LEVELโ minimum number of required redundant chunk parts that can be lost before a chunk becomes endangered. Default is0.SNAPSHOT_INITIAL_BATCH_SIZEโ this option can be used to specify the initial number of snapshotted nodes that will be atomically cloned before enqueuing the task for execution in fixed-sized batches. Default is1000.SNAPSHOT_INITIAL_BATCH_SIZE_LIMITโ this option specifies the maximum initial batch size set for a snapshot request. Default is10000.FILE_TEST_LOOP_MIN_TIMEโ the test files loop will try to check all files in the specified time, in seconds. Default is3600. It's possible for the loop to take more time if the master server is busy, or if the machine doesn't have enough processing power to make all the needed calculations. ๐ฎโ๐จ
๐ Options below are mandatory for all Shadow instances ๐
Like, non-negotiable. You need these:
MASTER_HOSTโ address of the host running the SaunaFS metadata server that currently acts as master.MASTER_PORTโ port number where the SaunaFS metadata server currently running as master listens for connections from 'shadow's and metaloggers. Default is9420.MASTER_RECONNECTION_DELAYโ delay in seconds before trying to reconnect to the metadata server after disconnection. Default is1.MASTER_TIMEOUTโ timeout (in seconds) for metadata server connections. Default is60.
More options, coming right upโstay with me, bestie ๐
LOAD_FACTOR_PENALTYโ when set, percentage of load will be added to chunkserver disk usage to determine most fitting chunkserver. Heavy loaded chunkservers will be picked for operations less frequently. Default is0, and correct values are in range from0to0.5. balance queen behavior โจPRIORITIZE_DATA_PARTSโ when set, master server will prioritize data parts in EC goals to land in the chunkservers with higher percentage of available space. Could cause parities landing always in the same chunkservers if the cluster is not well balanced. Default:1. โ ๏ธ unbalanced-vibes warningPOLL_TIMEOUT_MSโ maximum amount of time in milliseconds that the polling operation will wait for events. The value is applied for the polling in the events loop. Smaller values could reduce latency at the cost of CPU usage. Default:50. latency vs CPU drama ๐ญENABLE_PROMETHEUS(EXPERIMENTAL) โ whether to enable Prometheus support and metric collection. Note that this requires compiling with Prometheus support. Set to either1to enable, or0to disable. Default is0. metrics era ๐PROMETHEUS_HOST(EXPERIMENTAL) โ host address where Prometheus metric data can be collected, must be in the format ofHOST:PORT. Default0.0.0.0:9499. address, but make it metrics โจCREATE_EMPTY_FOLDERS_WHEN_SPACE_DEPLETED(EXPERIMENTAL) โ when enabled, this option allows the system to create metadata for empty folders when storage space is depleted. This helps preserving the intended file and directory structure. When this option is disabled, no metadata for folders will be created if there is insufficient storage space. Default:1. folder structure preservation slay ๐ซถLOG_LEVELโ setup logging. Uses the environment variableSAUNAFS_LOG_LEVELor config valueLOG_LEVELto determine logging level. Valid log levels aretracedebuginfowarnorwarningerrorerrorcritorcriticaloff
pick your log volume, bestie ๐
TLS_CERT_FILE(EXPERIMENTAL) โ path to the TLS certificate file the master/shadow server will use for TLS connections. There is no default value. certificate glam ๐TLS_KEY_FILE(EXPERIMENTAL) โ path to the TLS private key file the master/shadow server will use for TLS connections. There is no default value. keep it secret, keep it safe ๐๏ธTLS_CA_CERT_FILE(EXPERIMENTAL) โ path to the trusted CA certificate which is used to authenticate the TLS connection. There is no default value. trust issues, but make it TLS ๐USE_CHUNKSERVER_SIDE_CHUNK_LOCK(EXPERIMENTAL) โ when set to1, enables sending chunk part lock messages to the chunkservers. This can be useful to track down which chunk parts are currently being written. Reloadable. Default:0. lock it down, detective ๐EMPTY_RESERVED_FILES_PERIOD_MSECONDS(EXPERIMENTAL) โ interval for periodic cleaning of reserved files, in milliseconds. If set to0, the reserved files deletion is disabled. Default:0. โ ๏ธ admin-only, read the warning below
โ ๏ธ Warning Administrator-only option. Enabling periodic deletion may remove master-side references to reserved files that are still held by other applications or client instances that have not released them yet. This can disrupt ongoing operations and lead to unexpected errors. Recommended approach: Do not enable automatic deletion unless you fully understand the impact on running workloads. Prefer manually freeing reserved files by locating each reference or process using them and stopping it before releasing the reservation.
๐ NOTES ๐
Chunks in master are tested in loop. Speed (or frequency) is regulated by two options CHUNKS_LOOP_MIN_TIME and CHUNKS_LOOP_MAX_CPS. First defines minimal time of the loop and second maximal number of chunk tests per second. Typically at the beginning, when number of chunks is small, time is constant, regulated by CHUNK_LOOP_MIN_TIME, but when number of chunks became bigger then time of loop can increase according to CHUNKS_LOOP_MAX_CPS. chunk loop math, iykyk ๐
Deletion limits are defined as soft and hard limit. When number of chunks to delete increases from loop to loop then current limit can be temporary increased above soft limit, but never above hard limit. soft limit is a suggestion, hard limit is the law ๐จ
๐ REPORTING BUGS ๐
Report bugs to the GitHub repository https://github.com/leil-io/saunafs as an issue. be a good citizen and file that issue ๐
๐ COPYRIGHT ๐
Copyright 2008-2009 Gemius SA
Copyright 2013-2019 Skytechnology sp. z o.o.
Copyright 2023-2024 Leil Storage Oร
SaunaFS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.
SaunaFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with SaunaFS. If not, see http://www.gnu.org/licenses/.
๐ฎ SEE ALSO ๐ฎ
This page is SFSMASTER.CFG(5), dated 2026-07-29 โ okay love you, bye bestie ๐
โจ
๐ฆ where this page comes from
- ubuntu stonking: saunafs-master 5.8.0-1ubuntu1 ยท GPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms