Quickly build a new Ceph cluster with ceph-deploy on CentOS 7

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×

One year ago, i published a series of 10 blog posts called My adventures with Ceph Storage. As I had recently to rebuild my Ceph cluster from scratch, I decided it was time to create a quick guide to build the cluster as fast as possible.

Ceph cluster

I designed again my cluster to have one administrator machine, three monitor nodes and four OSD nodes. Each node has been built using CentOS 7.0, and with a disk layout like it’s explained in Part 3 of the previous series. These are the machines I created:

Each OSD node has two network connections, the primary to talk with all the other nodes, and a secondary one for the storage replication.

For each node, the sequence of commands to be executed once the machine is up and running is:

On the admin node

In this machine, login as cephuser. This is the user you will always use to run any Ceph operation. Run these commands:

repeat this command for each other node in the cluster.

On the OSD nodes

Go on each OSD node and prepare the disks with these commands:

Repeat the same commands on each node.

Build the cluster

We will build the cluster from the admin node (the “ceph” machine) using the cephuser account. To save keys and logs in a defined position, we create a dedicated folder:

Remember to move into this folder each time you login into the machine.

Install ceph-deploy and create the new cluster by defining the monitor nodes:

Create then the initial Ceph configuration:

Then, install ceph on each node:

Then, create the OSD disks on each OSD node:

repeat these two commands on each osd node.

NOTE: if after the creation of the cluster, OSDs are all down and not able to be started, I’ve found an issue with the latest ceph-deploy version. You can solve it by running:

on each node and reboot them. There is also an issue in the systemd creation of Ceph services in the monitors, as they are not enabled by default. To solve it, go in each monitor and run:

Finally, deploy the management keys to all the nodes:

If everything worked without errors, you would see the new cluster using ceph -v and ceph -s:

We have a working Ceph cluster using the latest version 10.2 (Jewel, as of May 2016).

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×

One thought on “Quickly build a new Ceph cluster with ceph-deploy on CentOS 7

Comments are closed.