Ceph Storage - Ceph Deployment (part 5)

In this article we will finally deploy Ceph Cluster with three monitor (MON) nodes.


IMPORTANT: Administration of the cluster is done entirely from the admin node.

IMPORTANT: Login with cephadmin and use this user from now on.


Create dedicated directory for ceph deploy

Move to a dedicated directory to collect the files that ceph-deploy will generate. This will be the work-ing directory for any further use of ceph-deploy

$ cd ~
$ mkdir ceph-cluster
$ cd ceph-cluster


Install ceph-deploy (on the admin node only)

$ sudo apt-get install ceph-deploy


Deploy Ceph on all nodes (creates config file only)

IMPORTANT: Do not use “sudo” for ceph-deploy

If you want to implement dedicated networks for Ceph cluster and public traffic use the following options. If you don't specify the networks, you can edit ceph.conf after running the command and add the different networks manually. 

--cluster-network <CLUSTER_NETWORK> #specify internal cluster network
--public-network <PUBLIC_NETWORK> #specify public cluster network

Example of ceph deploy command:

$ ceph-deploy new --cluster-network “” --public-network “” ceph1.apac.lab ceph2.apac.lab ceph3.apac.lab


Change the default number of replicas

If you have only 2 OSD nodes you will have to change the number of replicas from default 3 to 2 in ceph.conf, so that Ceph can achieve an active + clean state with just two Ceph OSD nodes. If you have 3+ OSD nodes you can keep the default 3 or use more replicas depending on your configuration.

To change the number of replicas add the following line under the [global] section in ceph.conf file. 

osd pool default size = 2 


Install Ceph

The following command will install the software on the 3 initial nodes.

$ ceph-deploy install ceph1 ceph2 ceph3

Note: You can use the --no-adjust-repos option if you are using different apt configurations for ceph. This is useful if you added different source repositories on each node and want each node to use these different repositories.


Deploy initial monitor(s) and gather the keys

$ ceph-deploy mon create-initial

NOTE: You have to be in the ceph-cluster directory created in the first step while running ceph-deploy commands. It needs to read the ceph.conf file.


And that is it. You should have 3 MON nodes running. You can test your cluster with the following command.

# sudo ceph status


In the next article we will add two additional OSD nodes.


Add comment

Security code