Docs > Run Cluster Manually

Run Cluster Manually


Use following command to build server and client:

make build

If the build is successful, cfs-server and cfs-client will be found in directory build/bin


Start Resource Manager (Master)

nohup ./cfs-server -c master.json &

Sample master.json is shown as follows,

  "role": "master",
  "ip": "",
  "listen": "80",
  "peers": "1:,2:,3:",
  "logDir": "/export/Logs/master",
  "consulAddr": "http://consul.prometheus-cfs.local",
  "exporterPort": 9510,
  "metaNodeReservedMem": "134217728"

For detailed explanations of master.json, please refer to Resource Manager (Master).

Start Metanode

nohup ./cfs-server -c meta.json &

Sample meta.json is shown as follows,

    "role": "metanode",
    "listen": "9021",
    "prof": "9092",
    "logLevel": "info",
    "metadataDir": "/export/Data/metanode",
    "logDir": "/export/Logs/metanode",
    "raftDir": "/export/Data/metanode/raft",
    "raftHeartbeatPort": "9093",
    "raftReplicaPort": "9094",
    "totalMem":  "17179869184",
    "consulAddr": "http://consul.prometheus-cfs.local",
    "exporterPort": 9511,
    "masterAddr": [

For detailed explanations of meta.json, please refer to Meta Subsystem.

Start Datanode

  1. Prepare data directories

    Recommendation Using independent disks can reach better performance.

    Disk preparation

    1.1 Check available disks

    fdisk -l

    1.2 Build local Linux file system on the selected devices

    mkfs.xfs -f /dev/sdx

    1.3 Make mount point

    mkdir /data0

    1.4 Mount the device on mount point

    mount /dev/sdx /data0
  2. Start datanode

    nohup ./cfs-server -c datanode.json &

    Sample datanode.json is shown as follows,

      "role": "datanode",
      "listen": "6000",
      "prof": "6001",
      "logDir": "/export/Logs/datanode",
      "raftDir": "/export/Data/datanode/raft",
      "logLevel": "info",
      "raftHeartbeat": "9095",
      "raftReplica": "9096",
      "consulAddr": "http://consul.prometheus-cfs.local",
      "exporterPort": 9512,
      "masterAddr": [
      "disks": [

For detailed explanations of datanode.json, please refer to Data Subsystem.

Start ObjectNode

nohup ./cfs-server -c objectnode.json &

Sample objectnode.json is shown as follows,

    "role": "objectnode",
    "domains": [
    "listen": 80,
    "masterAddr": [
    "logLevel": "info",
    "logDir": "/export/Logs/objectnode",
    "region": "cn_bj"

For detailed explanations of meta.json, please refer to Object Subsystem (ObjectNode).

Create Volume

By default, there are only a few data partitions allocated upon volume creation, and will be dynamically expanded according to actual usage.

For performance evaluation, extra data partitions shall be pre-created according to the amount of data nodes and disks to reach maximum performance.

Mount Client

  1. Run modprobe fuse to insert FUSE kernel module.

  2. Run yum install -y fuse to install libfuse.

  3. Run cfs-client -c fuse.json to start a client daemon.

    Sample fuse.json is shown as follows,

      "mountPoint": "/mnt/fuse",
      "volName": "test",
      "owner": "cfs",
      "masterAddr": ",,",
      "logDir": "/export/Logs/client",
      "profPort": "10094",
      "logLevel": "info"

For detailed explanations of fuse.json, please refer to Client.

Note that end user can start more than one client on a single machine, as long as mountpoints are different.


  1. freeze the cluster
  1. upgrade each module
  2. closed freeze flag