Master Configuration

Configuration Description

CubeFS uses JSON as the format of the configuration file.

Configuration ItemTypeDescriptionRequiredDefault Value
rolestringThe role of the process, the value can only be masterYes
ipstringHost IP addressYes
listenstringPort number on which the HTTP service listensYes
profstringGolang pprof port numberYes
idstringDistinguish different master nodesYes
peersstringRaft replication group member informationYes
logDirstringDirectory for storing log filesYes
logLevelstringLog levelNoerror
retainLogsstringHow many Raft logs to keep.Yes
walDirstringDirectory for storing Raft WAL logs.Yes
storeDirstringDirectory for storing RocksDB data. This directory must exist. If the directory does not exist, the service cannot be started.Yes
clusterNamestringCluster nameYes
ebsAddrstringAddress of the erasure coding subsystem. This must be configured when using the erasure coding subsystem.No
exporterPortintPort for Prometheus to obtain monitoring dataNo
consulAddrstringConsul registration address, used by Prometheus exporterNo
metaNodeReservedMemstringReserved memory size for metadata nodes, in bytesNo1073741824
heartbeatPortstringRaft heartbeat communication portNo5901
replicaPortstringRaft data transmission portNo5902
nodeSetCapstringCapacity of NodeSetNo18
missingDataPartitionIntervalstringIf no heartbeat is received during this time period, the replica is considered lost, in secondsNo24h
dataPartitionTimeOutSecstringIf no heartbeat is received during this time period, the replica is considered not alive, in secondsNo10min
numberOfDataPartitionsToLoadstringMaximum number of data partitions to check at a timeNo40
secondsToFreeDataPartitionAfterLoadstringAfter how many seconds to start releasing the memory occupied by the loaded data partition taskNo300
tickIntervalstringTimer interval for checking heartbeat and election timeout, in millisecondsNo500
electionTickstringHow many times the timer is reset before the election times outNo5
bindIpboolWhether to listen for connections only on the host IPNofalse
faultDomainboolWhether to enable fault domainNofalse
faultDomainBuildAsPossibleboolWhether to still try to build a nodeSetGroup as much as possible if the number of available fault domains is less than the expected numberNofalse
faultDomainGrpBatchCntstringNumber of available fault domainsNo3
dpNoLeaderReportIntervalSecstringHow often to report when data partitions has no leader, unit: sNo60
mpNoLeaderReportIntervalSecstringHow often to report when meta partitions has no leader, unit: sNo60
maxQuotaNumPerVolstringMaximum quota number per volumeNo100
volForceDeletionboolthe non-empty volume can be deleted directly or notNotrue
volDeletionDentryThresholdintif the non-empty volume can't be deleted directly , this param define a threshold , only volumes with a dentry count that is less than or equal to the threshold can be deletedNo0
enableLogPanicHookbool(Experimental) Hook panic function to flush log before executing panicNofalse
enableDirectDeleteVolboolto control the support for delayed volume deletion. `true``, will delete volume directlyNotrue

Configuration Example

{
 "role": "master",
 "id":"1",
 "ip": "127.0.0.1",
 "listen": "17010",
 "prof":"17020",
 "peers": "1:127.0.0.1:17010,2:127.0.0.2:17010,3:127.0.0.3:17010",
 "retainLogs":"20000",
 "logDir": "/cfs/master/log",
 "logLevel":"info",
 "walDir":"/cfs/master/data/wal",
 "storeDir":"/cfs/master/data/store",
 "exporterPort": 9500,
 "consulAddr": "http://consul.prometheus-cfs.local",
 "clusterName":"cubefs01",
 "metaNodeReservedMem": "1073741824"
}
Edit on GitHub