MicroCeph is a utility mantained by Canonical that allows us to deploy a Ceph cluster without dealing with all the configurations and commands usually required.
We're going to install and hold MicroCeph as a snap package.
sudo snap install microceph
sudo snap refresh --hold microceph
Once we've installed MicroCeph, we bootstrap the Ceph cluster.
sudo microceph cluster bootstrap --public-network 0.0.0.0/0
A few seconds later, we can check the cluster status.
sudo microceph status
MicroCeph deployment summary:
- eu-central-1.binarycomet.net (100.42.187.104)
Services: mds, mgr, mon
Disks: 0
As you can see the cluster is running with one node containing three services, but storage is allocated yet.
As there are required at least three OSDs (Object Storage Daemons) to work, we're going to create three loop files of 4 GB each one.
sudo microceph disk add loop,4G,3
+-----------+---------+
| PATH | STATUS |
+-----------+---------+
| loop,4G,3 | Success |
+-----------+---------+
The OSD and the loop file are stored at /var/snap/microceph/common/data/osd
.
If we check the cluster status again, we can see it now contains three disks.
sudo microceph status
MicroCeph deployment summary:
- eu-central-1.binarycomet.net (100.42.187.104)
Services: mds, mgr, mon, osd
Disks: 3
We can also check the status using the native Ceph tooling:
sudo ceph status
cluster:
id: 755f2ac4-cd4e-44c9-8bd6-70cc8c95af5b
health: HEALTH_OK
services:
mon: 1 daemons, quorum eu-central-1.binarycomet.net (age 10m)
mgr: eu-central-1.binarycomet.net(active, since 9m)
osd: 3 osds: 3 up (since 4m), 3 in (since 4m)
data:
pools: 1 pools, 1 pgs
objects: 2 objects, 577 KiB
usage: 82 MiB used, 12 GiB / 12 GiB avail
pgs: 1 active+clean
Now we have a working Ceph cluster with one node and three OSDs.