ceph delete pool

参考:

Pools — Ceph Documentation

前言:网上的写的乱七八糟不是你抄我就是我抄你 写的完全瞎扯 简直看不下去

官网截图:

ceph delete pool_第1张图片

ceph delete pool_第2张图片

#准备

1.查看pool名称

ceph osd lspools

#创建一个pool用于做测试/设置分类

ceph osd pool create pool-demo 6 6

ceph osd pool application enable pool-demo rbd

#查看application类型

ceph osd pool application get pool-demo

#删除pool(需要写两次pool的名称释义确实要删)

ceph osd pool rm pool-demo pool-demo

注:报错原因需要加上: --yes-i-really-really-mean-it

释义我确实要把它给删了

ceph osd pool rm pool-demo pool-demo

报错

Error EPERM: WARNING: this will *PERMANENTLY DESTROY* all data stored in pool pool-demo.  If you are *ABSOLUTELY CERTAIN* that is what you want, pass the pool name *twice*, followed by --yes-i-really-really-mean-it.

#再次执行删除

ceph osd pool rm pool-demo pool-demo --yes-i-really-really-mean-it

#再次报错(原因需要将配置改为允许删除ceph默认mon_allow_pool_delete为flase禁止删pool

ceph osd pool rm pool-demo pool-demo --yes-i-really-really-mean-it

Error EPERM: pool deletion is disabled; you must first set the mon_allow_pool_delete config option to true before you can destroy a pool

 

#需要通过asock查看mon_allow_pool_delete的设置值 /查看mon_allow_pool_delete设置

ceph --admin-daemon /var/run/ceph/ceph-mon.node-1.asok config show |grep mon_allow_pool_delete

#调整参数

ceph --admin-daemon /var/run/ceph/ceph-mon.node-1.asok config set mon_allow_pool_delete true

注:集群有多个mon其他的mon节点也需要执行同样的操作

#再次执行删除操作(成功)

ceph osd pool rm pool-demo pool-demo --yes-i-really-really-mean-it

注:此参数是临时调整服务器重启参数失效永久生效需要写入配置文件

    

[global]
fsid = 4b0fbef4-9617-41d1-94f4-05efb32d5d32
mon_initial_members = node-1
mon_host = 10.0.0.92
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
auth_allow_insecure_global_id_reclaim = false
public_network = 10.0.0.0/24
cluster_network = 10.0.0.0/24
mon_allow_pool_delete = true

    #同步配置文件:ceph-deploy --overwrite-conf config push node-1 node-2 node-3

    #重启mon服务:   for I in {1..3}: do ssh node-${I} systemctl restart ceph-mon.target;done

截图:

ceph delete pool_第3张图片

你可能感兴趣的:(云计算,linux,运维,服务器)