Create Ceph cluster

Moki Lv6

I use Ubuntu 22.04 LTS on each node with installed Docker.

Create first node

1
apt install -yqq cephadm
1
cephadm bootstrap --cluster-network 10.200.6.0/24 --mon-ip 10.200.7.31 --initial-dashboard-password dashboard-password --dashboard-password-noupdate 

Dashboard URL: https://10.200.7.31:8443/
Login: admin
Password: dashboard-password

Add nodes

Run on new nodes:

1
apt install -y cephadm

Run on first node:

1
2
ssh-copy-id -f -i /etc/ceph/ceph.pub root@10.200.7.32
ceph orch host add ceph2 10.200.7.32 --labels _admin
1
2
ssh-copy-id -f -i /etc/ceph/ceph.pub root@10.200.7.33
ceph orch host add ceph3 10.200.7.33 --labels _admin

Remove node

Run on first node:

1
ceph orch host drain ceph2
1
ceph orch osd rm status
1
ceph orch host rm ceph2

Add storage

On each node:

1
ceph orch apply osd --all-available-devices

Status

Services:

1
ceph orch ps

Disks stats:

1
rados df

Pools stats:

1
ceph osd pool stats

Storage

Pools

1
ceph osd pool my-pool create

Services

RWG

1
2
3
4
ceph orch apply rgw rwg.srv --placement='2 label:_admin'
ceph osd pool rwg-pool create
ceph osd pool set rbd-pool compression_algorithm lz4
ceph osd pool application enable rwg-pool rwg

RBD

1
2
3
ceph osd pool rbd-pool create
ceph osd pool set rbd-pool compression_algorithm lz4
ceph osd pool application enable rbd-pool rbd

NFS

List clusters:

1
ceph nfs cluster ls

Details:

1
ceph nfs cluster info

Simple

1
ceph orch apply nfs nfs.single.1 --placement='1 label:_admin'

High availability

1
ceph nfs cluster create nfs.ha.1 'label:_admin count-per-host:1' --ingress --virtual_ip 10.200.7.30 --port 5555