Edit on GitHub

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
masterAddrstringAddress of the master serviceYes
totalMemstringMaximum available memory. This value must be higher than the value of metaNodeReservedMem in the master configuration, in bytesYes
localIPstringIP address of the local machine. If this option is not specified, the IP address used for communication with the master is usedNo
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

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.