ceph learn

deploy

cephadm

1
2
3
4
5
# step1 monitor
cephadm bootstrap --mon-ip *<mon-ip>*

# ceph shell
sudo ./cephadm shell

service

1
2
3
4
5
# check all vaild service
ceph orch ls

# check all vaild/invaild service
ceph orch ps

health

1
ceph df

host

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# list host
ceph orch host ls --detail

# add host
ssh-copy-id -f -i /etc/ceph/ceph.pub root@*<new-host>*
ceph orch host add *<newhost>* [*<ip>*] [*<label1> ...*]
# e.g. ceph orch host add host2 10.10.0.102 --labels _admin

# remove host
ceph orch host drain *<host>*
ceph orch ps <host> # daemons on the host
ceph orch host rm <host> # remove the host from the cluster after all daemons have been removed

# add storage
ceph orch apply osd --all-available-devices

osd

1
2
3
4
5
6
7
8
9
10
# list
ceph orch device ls

# Creating New OSDs
ceph orch apply osd --all-available-devices
# or
ceph orch daemon add osd *<host>*:*<device-path>*
# e.g.
ceph orch daemon add osd host1:/dev/sdb
ceph orch daemon add osd host1:data_devices=/dev/sda,/dev/sdb,db_devices=/dev/sdc,osds_per_device=2

RGW

radosgw

1
2
3
4
5
6
7
8
9
10
11
12
# enable rgw
ceph mgr module enable rgw

# config rgw name e.g. foo
ceph orch apply rgw foo

# lable host
ceph orch host label add gwhost1 rgw # the 'rgw' label can be anything
ceph orch host label add gwhost2 rgw

# apply
ceph orch apply rgw foo '--placement=label:rgw count-per-host:2' --port=8000

Ceph Object Gateway