Run Cluster Manually

Compile Dependencies


Version Requirement


4.8.5 and above


3.1 and above


1.16 and above


1.0.6 and above


3.8.4 and above


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)

./cfs-server -c master.json

Sample master.json is shown as follows,

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

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

Start Metanode

./cfs-server -c meta.json

Sample meta.json is shown as follows,

    "role": "metanode",
    "listen": "17210",
    "prof": "17220",
    "logLevel": "info",
    "metadataDir": "/cfs/metanode/data/meta",
    "logDir": "/cfs/metanode/log",
    "raftDir": "/cfs/metanode/data/raft",
    "raftHeartbeatPort": "17230",
    "raftReplicaPort": "17240",
    "totalMem":  "8589934592",
    "consulAddr": "http://consul.prometheus-cfs.local",
    "exporterPort": 9501,
    "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

    ./cfs-server -c datanode.json

    Sample datanode.json is shown as follows,

      "role": "datanode",
      "listen": "17310",
      "prof": "17320",
      "logDir": "/cfs/datanode/log",
      "raftDir": "/cfs/datanode/log",
      "logLevel": "info",
      "raftHeartbeat": "17330",
      "raftReplica": "17340",
      "consulAddr": "http://consul.prometheus-cfs.local",
      "exporterPort": 9502,
      "masterAddr": [
      "disks": [

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

Start BlobStore

Please refer to BlobStore Manual

Start ObjectNode

./cfs-server -c objectnode.json

Sample objectnode.json is shown as follows,

    "role": "objectnode",
    "domains": [
    "listen": 17410,
    "masterAddr": [
    "logLevel": "info",
    "logDir": "/cfs/Logs/objectnode"

For detailed explanations of objectnode.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.

curl -v ""

For detailed explanations of volume creation, please refer to Volume.

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

curl -v ""

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": "/cfs/mountpoint",
      "volName": "ltptest",
      "owner": "ltptest",
      "masterAddr": ",,",
      "logDir": "/cfs/client/log",
      "profPort": "17510",
      "exporterPort": "9504",
      "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

curl -v ""
  1. upgrade each module

  2. closed freeze flag

curl -v ""