Standalone Mode

Get Software

# Skip this step if it has been completed
$ git clone

Install Software

Script Installation

Install Basic Cluster

CubeFS supports deploying a basic cluster with a single script. The basic cluster includes components such as Master, MetaNode, and DataNode, with the option to additionally start a client and ObjectNode. The steps are as follows:

cd ./cubefs
# Compile
# Generate configuration files and start the basic cluster
sh ./shell/ /home/data bond0

# Wait a minute for cluster to prepare state, and optionally execute the following command

# Mount the file system (optional, execute this command if you want to experience file storage. By default, it is mounted at /home/data/client/mnt)
sh ./shell/ /home/data

# Start object storage (optional, execute this command if you want to experience object storage. The default listening port is 17410)
sh ./shell/ /home/data
  • bond0: The name of the local network card, fill in according to the actual situation
  • /home/data: A local directory used to store cluster running logs, data, and configuration files. The directory should be the same for all three sh commands.
  • Machine requirements
    • Need root permission
    • Able to use ifconfig
    • Memory of 4G or more
    • Remaining disk space corresponding to /home/data is more than 20G
  • Check the cluster status
./build/bin/cfs-cli cluster info
  Cluster name       : cfs_dev
  Master leader      :
  Master-1           :
  Master-2           :
  Master-3           :
  Auto allocate      : Enabled
  MetaNode count (active/total)    : 4/4
  MetaNode used                    : 0 GB
  MetaNode available               : 21 GB
  MetaNode total                   : 21 GB
  DataNode count (active/total)    : 4/4
  DataNode used                    : 44 GB
  DataNode available               : 191 GB
  DataNode total                   : 235 GB
  Volume count       : 2

For using the file system, refer to the File System Usage section.

For using object storage, refer to the Object Storage Usage section.

Install Erasure Code Subsystem


Optional section. If you need to use the erasure-coded volume, you need to deploy it.

$> cd cubefs/blobstore
$> ./ --consul
start blobstore service successfully, wait minutes for internal state preparation

After the erasure code subsystem is deployed successfully, modify the ebsAddr configuration item in the Master configuration file (more configuration reference) to the Consul address registered by the Access node, which is http://localhost:8500 by default.

Stop the Cluster

  • The script will stop the server and the mount point
sh ./shell/

Docker Installation

Install Basic Cluster

In the docker directory, the tool is used to facilitate running the CubeFS docker-compose trial cluster, including the Master, MetaNode, DataNode, and ObjectNode components.


Please make sure that docker and docker-compose are installed, and before executing the docker deployment, make sure that the firewall is turned off to avoid permission issues causing container startup failures.

Execute the following command to create a minimal CubeFS cluster.


/data/disk is the data root directory and requires at least 10GB of free space.

$ docker/ -r -d /data/disk

After the client is started, use the mount command in the client docker container to check the directory mounting status:

$ mount | grep cubefs

Open in a browser, log in with admin/123456, and you can view the Grafana monitoring indicator interface of CubeFS.

Or use the following command to run step by step:

$ docker/ -b
$ docker/ -s -d /data/disk
$ docker/ -c
$ docker/ -m

For more commands, please refer to the help:

$ docker/ -h

The Prometheus and Grafana related configurations for monitoring are located in the docker/monitor directory.

Install Erasure Code Subsystem


The erasure code docker deployment method has not been unified with other modules (such as Master) for the time being. This section is currently only used to experience the function of the erasure code subsystem itself, and will be improved later.

Support the following docker image deployment methods:

  • Remote pull build [recommended]
$> docker pull cubefs/cubefs:blobstore-v3.3.0 # Pull the image
$> docker run cubefs/cubefs:blobstore-v3.3.0 # Run the image
$> docker container ls # View running containers
   CONTAINER ID        IMAGE                                  COMMAND                  CREATED             STATUS              PORTS               NAMES
   76100321156b        blobstore:v3.3.0                       "/bin/sh -c /apps/..."   4 minutes ago       Up 4 minutes                            thirsty_kare
$> docker exec -it thirsty_kare /bin/bash # Enter the container
  • Local script compilation and build
$> cd blobstore
$> ./ -b # Compile and build
&> Successfully built 0b29fda1cd22
   Successfully tagged blobstore:v3.3.0
$> ./ -r # Run the image
$> ... # The subsequent steps are the same as those for remote pull build
Edit on GitHub