1.查看集群配置信息
ceph daemon /var/run/ceph/ceph-mon.$(hostname -s).asok config show
2.在部署节点修改了ceph.conf文件,将新配置推送至全部的ceph节点
ceph-deploy --overwrite-conf config push node1-4
3.检查仲裁状态,查看mon添加是否成功
ceph quorum_status --format json-pretty
4.列示pool列表
ceph osd lspools
5.列示pool详细信息
ceph osd dump | grep pool
6.检查pool的副本数
ceph osd dump | grep -i size
7.创建pool
ceph osd pool create pooltest 128
8.删除pool
ceph osd pool delete data
ceph osd pool delete data data --yes-i-really-really-mean-it
9.设置pool副本数(两种方法)
①命令行:ceph osd pool set data size 3
②配置文件:vim ceph/ceph.conf
osd_pool_default_size = 2
10.设置pool配额
ceph osd pool set-quota data max_objects 100 最大100个对象
ceph osd pool set-quota data max_bytes $((10*1024*1024*1024)) 容量大小最大为10G
11.重命名pool
ceph osd pool rename data jam
12.获取现有的PG数和PGP数值
ceph osd pool get data pg_num
ceph osd pool get data pgp_num
13.修改存储池的PG和PGP
ceph osd pool set data pg_num=1
ceph osd pool set data pgp_num = 1