Here is a list of Ceph commands that we tend to use on a regular basis:
a)Display cluster status:
‘ceph -s’
b)Display running cluster status:
‘ceph -w’
c)Display pool usage stats:
‘ceph df’
d)List pools:
‘ceph osd lspools’
e)Display per pool placement group and replication levels:
‘ceph osd dump | grep ‘replicated size’
f)Set pool placement group sizes:
‘ceph osd pool set pool_name pg_num 512’
‘ceph osd pool set pool_name pgp_num 512’
g)Display rbd images in a pool:
‘rbd -p pool_name list’
h)Create rbd snapshot:
‘rbd –pool rbd snap create pool_name/image_name@snap_name’
i)Display rbd snapshots:
‘rbd snap ls pool_name/image_name’
j)Display which images are mapped via kernel:
‘rbd showmapped’
k)Get rados statistics:
‘rados df’
l)List pieces of pool using rados:
‘rados -p pool_name ls’