Create a single node ceph server

Firt make sure your system is up to date and has ntp configured.

systemctl stop firewalld
systemctl disable firewalld
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config && setenforce 0

hostnamectl set-hostname ceph-node.lab.lcl

yum install -y epel-release
yum install -y python-pip
pip install --upgrade pip
pip install ceph-deploy

mkdir ceph
cd ceph

ceph-deploy new ceph-node

vi ceph.conf (and add)
osd pool default size = 1
osd crush chooseleaf type = 0

ceph-deploy install ceph-node
ceph-deploy mon create-initial

lsblk

ceph-deploy disk zap ceph-node /dev/sdb
ceph-deploy osd create --data /dev/sdb ceph-node

ceph-deploy admin ceph-node
chmod 644 /etc/ceph/ceph.client.admin.keyring

ceph-deploy mgr create ceph-node

ceph -s
  cluster:
    id:     9aee9084-801b-4094-85da-d5785fe4918f
    health: HEALTH_OK
 
  services:
    mon: 1 daemons, quorum ceph-node
    mgr: ceph-node(active)
    osd: 1 osds: 1 up, 1 in
 
  data:
    pools:   0 pools, 0 pgs
    objects: 0  objects, 0 B
    usage:   1.0 GiB used, 599 GiB / 600 GiB avail
    pgs:   

About SUNWfrk

SUNWfrk or better known as Bart has more than 15 years experience in Unix and Linux Administration, lately he is also working with microservices and automation.

Leave a Reply

Your email address will not be published. Required fields are marked *