Edit on GitHub

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

Configuration Example

 "role": "master",
 "ip": "",
 "listen": "17010",
 "peers": "1:,2:,3:",
 "logDir": "/cfs/master/log",
 "exporterPort": 9500,
 "consulAddr": "http://consul.prometheus-cfs.local",
 "metaNodeReservedMem": "1073741824"