LEIL-MASTER.CFG(5)
β¨ NAME β¨
leil-master.cfg(5) β okay bestie, this is the main configuration file for leil-master. π
π DESCRIPTION π
The file leil-master.cfg contains the configuration of the LeilFS metadata server process. Itβs literally the main character of your metadata config stack. β¨
π¦ SYNTAX π¦
Syntax is:
OPTION = VALUE
Lines starting with # character are ignored.
π OPTIONS π
Configuration options:
PERSONALITYβ Current personality of this instance of metadata server. Valid values aremaster,shadowandha-cluster-managed. If installation is managed by an HA cluster the only valid value isha-cluster-managed; otherwise the only valid values aremasterandshadow, in which case only one metadata server in LeilFS shall havemasterpersonality.mastermeans that this instance of metadata server acts as main metadata server governing all file system metadata modifications.shadowmeans that this instance of metadata server acts as backup metadata server ready for immediate deployment as new master in case of current master failure. Metadata server personality can be changed at any moment as long as one changes personality fromshadowtomaster; changing personality the other way around is forbidden.ha-cluster-managedmeans that this instance is managed by HA cluster, server runs in shadow mode as long as itβs not remotely promoted to master.CLUSTER_IDβ Uniquely identifies this namespace. Prevents accidental connections to wrong metadata or chunkservers. (default isdefault)DATA_PATHβ where to store metadata files and lock fileWORKING_USERβ user to run daemon asWORKING_GROUPβ group to run daemon as (optional β if empty then default user group will be used)SYSLOG_IDENTβ name of process to place in syslog messages (default isleil-master)LOCK_MEMORYβ whether to performmlockall()to avoid swapping outleil-masterprocess (default is0, i.e. no)LIMIT_GLIBC_MALLOC_ARENASβ Linux only: limit glibc malloc arenas to given value β prevents from using huge amount of virtual memory. This can influence performance by reducing memory fragmentation and improving 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β nice level to run daemon with (default is-19if possible; note: process must be started as root to increase priority)EXPORTS_FILENAMEβ alternative name ofleil-exports.cfgfileTOPOLOGY_FILENAMEβ alternative name ofleil-topology.cfgfileCUSTOM_GOALS_FILENAMEβ alternative name ofleil-goals.cfgfilePREFER_LOCAL_CHUNKSERVERβ If a client mountpoint has a local chunkserver, and a given chunk happens to reside locally, thenleil-masterwill list the local chunkserver first. However, when the local client mount is issuing many read(s)/write(s), to many local chunks, these requests can overload the local chunkserver and disk subsystem. Setting this to0(the default is1) means that 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 is 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 changelog when it is being started after a crash; otherwise it will refuse to start andleil-metarestoreshould 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: logs are stored in blocks of 5k lines, so sometimes real number of seconds may be little bigger; zero disables 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β Chunks loop shouldnβt check more chunks per seconds than given number (default is100000)CHUNKS_LOOP_MIN_TIMEβ Chunks loop will check all chunks in specified time (default is300) unlessCHUNKS_LOOP_MAX_CPSwill force slower execution.CHUNKS_LOOP_PERIODβ Time in milliseconds between chunks loop execution (default is1000).CHUNKS_LOOP_MAX_CPUβ Hard limit on CPU usage by chunks loop (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β 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 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) (default is0, i.e. there is no overhead for prioritizing endangered chunks).ENDANGERED_CHUNKS_MAX_CAPACITYβ Max capacity of endangered chunks queue. This value can limit memory usage of master server if there are lots of endangered chunks in the system. This value is ignored ifENDANGERED_CHUNKS_PRIORITYis set to0. (default is1Mi, i.e. no more than1Michunks will be kept in a queue).ACCEPTABLE_DIFFERENCEβ A 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 metadata checksum shall be sent to backup servers (default is: every50metadata updates)METADATA_CHECKSUM_RECALCULATION_SPEEDβ how fast should metadata be recalculated in background (default:100objects per function call)DISABLE_METADATA_CHECKSUM_VERIFICATIONβ should checksum verification be disabled while applying changelogNO_ATIMEβ when this option is set to1inode 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 connection with the client was lost. Values between60and604800(one week) are accepted. (default is86400)USE_BDB_FOR_NAME_STORAGEβ When this option is set to1Berkeley DB is used for storing file/directory names in file (DATA_PATH/name_storage.db). By default all strings are kept in system memory. (default is0)BDB_NAME_STORAGE_CACHE_SIZEβ Size of memory cache (in MB) for file/directory names used by Berkeley DB storage. (default is10)AVOID_SAME_IP_CHUNKSERVERSβ When this option is set to1, 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 chunk becomes endangered (default is0)SNAPSHOT_INITIAL_BATCH_SIZEβ This option can be used to specify 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 snapshot request. (default is10000)FILE_TEST_LOOP_MIN_TIMEβ Test files loop will try to check all files in specified time in seconds (default is3600). Itβs possible for the loop to take more time if the master server is busy or the machine doesnβt have enough processing power to make all the needed calculations.
Options below are mandatory for all Shadow instances:
MASTER_HOSTβ address of the host running LeilFS metadata server that currently acts as masterMASTER_PORTβ port number where LeilFS metadata server currently running as master listens for connections from shadows and metaloggers (default is9420)MASTER_RECONNECTION_DELAYβ delay in seconds before trying to reconnect to metadata server after disconnection (default is1)MASTER_TIMEOUTβ timeout (in seconds) for metadata server connections (default is60)LOAD_FACTOR_PENALTYβ set this and a percentage of the load gets added on top of each chunkserver's disk usage when the master is picking the most fitting chunkserver π so the heavy-loaded ones get chosen for operations less often. No cap, but fr fr it's<pink>default0</pink>and the correct values live in the range from0to0.5πPRIORITIZE_DATA_PARTSβ when this is on, the master server prioritizes data parts in EC goals so they land on the chunkservers that have the higher percentage of available space β¨ lowkey could cause parities to always land in the same chunkservers if the cluster isn't well balanced, so keep that in mind π<pink>default:1</pink>POLL_TIMEOUT_MSβ the maximum amount of time in milliseconds that the polling operation will wait for events π this value gets applied to the polling in the events loop. Smaller values could reduce latency at the cost of CPU usage, so it's giving tradeoff city π<pink>default:50</pink>ENABLE_PROMETHEUS(EXPERIMENTAL) β whether to enable Prometheus support and metric collection π heads up bestie, this requires compiling with Prometheus support. Set it to either1to enable, or0to disable<pink>(default is0)</pink>PROMETHEUS_HOST(EXPERIMENTAL) β the host address where Prometheus metric data can be collected π it must be in the format ofHOST:PORT<pink>(default0.0.0.0:9499)</pink>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 it's disabled, no metadata for folders will be created if there's insufficient storage space<pink>(default:1)</pink>LOG_LEVELβ setup logging, periodt π it uses the environment variableSAUNAFS_LOG_LEVELor the config valueLOG_LEVELto determine logging level. The valid log levels are:tracedebuginfowarnorwarningerrorerrorcritorcriticaloff
TLS_CERT_FILE(EXPERIMENTAL) β path to the TLS certificate file the master/shadow server will use for TLS connections π there is no default value, so you gotta supply it yourself π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 either, ngl you're on your own here π«ΆTLS_CA_CERT_FILE(EXPERIMENTAL) β path to the trusted CA certificate which is used to authenticate the TLS connection π‘οΈ there is no default value β¨USE_CHUNKSERVER_SIDE_CHUNK_LOCK(EXPERIMENTAL) β when set to1, it enables sending chunk part lock messages to the chunkservers π this can be useful to track down which chunk parts are currently being written. Reloadable<pink>(default:0)</pink>EMPTY_RESERVED_FILES_PERIOD_MSECONDS(EXPERIMENTAL) β interval for periodic cleaning of reserved files, in milliseconds π§Ή if set to0, the reserved files deletion is disabled<pink>(Default:0)</pink>
β οΈ Warning β οΈ Administrator-only option, bestie β do not play with this casually. 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. Fr fr, it's giving chaos. 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. Iconic behaviour only, please π
πΈ NOTES πΈ
Chunks in master are tested in a loop π speed (or frequency) is regulated by two options: CHUNKS_LOOP_MIN_TIME and CHUNKS_LOOP_MAX_CPS. The first one defines the minimal time of the loop, and the second one defines the maximal number of chunk tests per second. Typically at the beginning, when the number of chunks is small, the time is constant and regulated by CHUNK_LOOP_MIN_TIME, but when the number of chunks becomes bigger, then the time of the loop can increase according to CHUNKS_LOOP_MAX_CPS β¨ slay, it scales.
Deletion limits are defined as a soft and a hard limit π when the number of chunks to delete increases from loop to loop, then the current limit can be temporarily increased above the soft limit β but never above the hard limit π ββοΈ periodt.
π¦ REPORTING BUGS π¦
Report bugs to the GitHub repository https://github.com/leil-io/leilfs as an issue π ty bestie ily.
π COPYRIGHT π
Copyright 2008-2009 Gemius SA
Copyright 2013-2019 Skytechnology sp. z o.o.
Copyright 2023-2024 Leil Storage OΓ
LeilFS 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 π
LeilFS 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 LeilFS. If not, see http://www.gnu.org/licenses/ π
π SEE ALSO π
okay that's the whole page bestie, you made it to the end π₯³ this version is dated 1980-01-01 and it's the LEIL-MASTER.CFG(5) page, so go be the main character of your own cluster π
β¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: saunafs 5.12.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms