In this practical work, we will set up a CEPH cluster, and access it :
- via block devices
- via filesystem
First, we need to set up Virtualbox virtual machines.
- Create 4 virtual machines from debian.ova image
- Configure them to use the same internal network
Give tem the following names :
- ceph-admin
- ceph-node1
- ceph-node2
- ceph-node3
Add two disks of 5 GB to ceph-node*
Set up a SSH server on each nodes. Create a ceph user on each node. Give him sudo priviledges on each node, without to type password. Generate a SSH key on ceph-admin. Copy the key to every nodes. Enable the SSH key on any node. You should be able to login and switch of nodes without typing passwords.
Now on ceph-admin, install ceph-deploy.
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
echo deb http://ceph.com/debian-dumpling/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
sudo apt-get update
sudo apt-get install ceph-deploy
Please also set up DNS resolution threw /etc/hosts to address them by there name.
Install CEPH packages on every host.
Create a cluster with name my-ceph-cluster.
Install two monitors :
- ceph-node1
- ceph-node2
Gather monitors keys.
Install two MDS
- ceph-node1
- ceph-node2
Install three OSDs :
- ceph-node1
- ceph-node2
- ceph-node3
Please separate journals from data storage from system instalation.
Create two rados pools :
- cephfs-data
- cephfs-metadata
Create a filesystem named cephfs using these pools.
Check they entered active state.
Mount the fileSystem on ceph-admin. Create files on it.
Create a rados pool volumes
Create two objects of 256MB each
Map these objects to block devices.
Format them in ext4, and use them. Create files on it.