CEPH is an open-source distributed storage system offering scalability, reliability, and data redundancy. It is designed to store data on commodity hardware and provides a unified interface for object, block, and file storage. This blog post will discuss the prerequisites for CEPH installation, how to install CEPH on Ubuntu, configuring the CEPH cluster, setting up OSDs, configuring MON nodes, and setting up MDS.
Prerequisites for CEPH Installation
Before installing CEPH, specific prerequisites need to be fulfilled:
- Ubuntu 18.04 or later
- At least 4GB of RAM
- A dedicated network interface for CEPH traffic
- A minimum of 10GB of free disk space
- Access to the internet to download CEPH packages and dependencies
At least three Ubuntu nodes are required to set up multiple Ubuntu nodes. These nodes should have monitors, OSDs, and a client node.
Networking: Ensure seamless communication between all nodes across the network.
User and Permissions: Establish passwordless SSH access between nodes.
Installation
To install CEPH on Ubuntu, follow the steps below:
- Update the package repository on Ubuntu:
$ sudo apt update && sudo apt upgrade -y
- Install SSH and NTP server packages to enable passwordless authentication between nodes and time synchronization.
$ sudo apt install -y ntp openssh-server
$ sudo systemctl enable ntp
$ sudo systemctl start ntp
$ sudo systemctl enable sshd
$ sudo systemctl start sshd
- To set up passwordless SSH access, create a user cephuser1, generate SSH keys on all nodes and copy them to each node from all nodes.
$ sudo ssh-keygen -t rsa
$ sudo ssh-copy-id cephuser1@Ceph_nodes_ip_or_hostnsame
- To install Ceph on all nodes, first add a Ceph repository on all nodes and then install it on all nodes using this repository.
$ sudo apt install -y software-properties-common
$ sudo add-apt-repository cloud-archive:octopus
$ sudo apt update
$ sudo apt install -y ceph-deploy ceph-common ceph-mds ceph-mon ceph-osd ceph-radosgw
- To configure the Ceph cluster, create a cluster directory on the Ceph admin node.
$ mkdir Ceph-Cluster
$ cd Ceph-Cluster
- Run the following command below to initialize the cluster.
$ ceph-deploy new node1 node2 node3
- Edit the
ceph.conf
file generated in the cluster directory, and add the line below under the[global]
section to use the public network.
public network = <your-network-ip-address-range>
- Install Ceph on All Nodes.
$ ceph-deploy install node1 node2 node3
- Deploy the initial monitor and gather all the keys
$ ceph-deploy mon create-initial
- Prepare and activate OSDs on all OSD nodes. First, identify the disk to use.
$ ceph-deploy disk list node1
- Prepare and activate the disk on all OSD nodes.
$ ceph-deploy osd create --data /dev/sdb node1
Repeat for all OSDs on all nodes.
- Add a Manager daemon for the Ceph dashboard and other management features.
$ ceph-deploy mgr create node1
- Deploy MDS to use CephFS
$ ceph-deploy mds create node1
- Check the status of the cluster.
$ ceph -s
- Create a pool for storage and a filesystem for CephFS.
$ ceph osd pool create mypool 128
$ ceph fs volume create myfs
- On the client mount, the CephFS
$ sudo apt install ceph-fuse
$ sudo mkdir /mnt/cephfs
$ sudo ceph-fuse /mnt/cephfs
- Finally, the Ceph CLI or dashboard can be used for monitoring and management.
$ ceph status
Setting up a Ceph storage cluster in a multinode environment on Ubuntu involves installing Ceph on multiple nodes, configuring the cluster, and managing storage pools. Above all, it is a detailed guide with commands and explanations.