MetaNode Configuration

Configuration Description

Configuration ItemTypeDescriptionRequired
rolestringProcess role: MetaNodeYes
listenstringPort for listening and accepting requestsYes
profstringDebugging and administrator API interfaceYes
logLevelstringLog level, default: errorNo
metadataDirstringDirectory for storing metadata snapshotsYes
logDirstringDirectory for storing logsYes
raftDirstringDirectory for storing Raft WAL logsYes
raftHeartbeatPortstringRaft heartbeat communication portYes
raftReplicaPortstringRaft data transmission portYes
consulAddrstringPrometheus registration interfaceNo
exporterPortstringPort for Prometheus to obtain monitoring dataNo
masterAddrstring sliceAddress of the master serviceYes
totalMemstringMaximum available memory. This value must be higher than the value of metaNodeReservedMem in the master configuration, in bytesYes
memRatiostringThe ratio of maximum available memory to the total memory of the host. If this option is filled in, the calculated value will override the totalMem itemNo
localIPstringIP address of the local machine. If this option is not specified, the IP address used for communication with the master is usedNo
bindIpboolWhether to listen for connections only on the localIP, default is falseNo
zoneNamestringSpecify the zone. By default, it is assigned to the default zoneNo
deleteBatchCountint64Number of inode nodes to be deleted in batches at one time, default is 500No
tickIntervalfloat64Interval for Raft to check heartbeats and election timeouts, unit is milliseconds, default is 300No
raftRecvBufSizeintSize of the Raft receive buffer, unit: bytes, default is 2048No
nameResolveIntervalintInterval for Raft node address resolution, unit: minutes, the value should be between [1-60], default is 1No
enableLogPanicHookbool(Experimental) Hook panic function to flush log before executing panicNo

Configuration Example

     "role": "metanode",
     "listen": "17210",
     "prof": "17220",
     "logLevel": "debug",
     "metadataDir": "/cfs/metanode/data/meta",
     "logDir": "/cfs/metanode/log",
     "raftDir": "/cfs/metanode/data/raft",
     "raftHeartbeatPort": "17230",
     "raftReplicaPort": "17240",
     "consulAddr": "http://consul.prometheus-cfs.local",
     "exporterPort": 9501,
     "totalMem":  "8589934592",
     "masterAddr": [


  • The configuration options listen, raftHeartbeatPort, and raftReplicaPort cannot be modified after the program is first configured and started.
  • The relevant configuration information is recorded in the constcfg file under the metadataDir directory. If you need to force modification, you need to manually delete the file.
  • The above three configuration options are related to the registration information of the MetaNode in the Master. If modified, the Master will not be able to locate the MetaNode information before the modification.
Edit on GitHub