ceph删除pool

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

查看是否有删除pool权限

ceph --show-config |grep mon_allow_pool_delete
mon_allow_pool_delete = false

添加删除pool权限

cd /etc/ceph/
cat /etc/ceph/ceph.conf 
[global]
mon_allow_pool_delete = true

分发配置文件

ceph-deploy --overwrite-conf admin ceph01 ceph02 ceph03

重启所有节点的mon和mgr服务

[root@ceph01 ceph]# systemctl list-units --type=service|grep ceph
● ceph-disk@dev-vdc1.service                   loaded failed failed  Ceph disk activation: /dev/vdc1
  ceph-mds@ceph01.service                      loaded active running Ceph metadata server daemon
  ceph-mgr@ceph01.service                      loaded active running Ceph cluster manager daemon
● ceph-mon@ceph-01.service                     loaded failed failed  Ceph cluster monitor daemon
  ceph-mon@ceph01.service                      loaded active running Ceph cluster monitor daemon
  ceph-osd@0.service                           loaded active running Ceph object storage daemon osd.0
  ceph-osd@3.service                           loaded active running Ceph object storage daemon osd.3
  ceph-osd@6.service                           loaded active running Ceph object storage daemon osd.6
● ceph-osd@ceph01.service                      loaded failed failed  Ceph object storage daemon osd.ceph01
● ceph-radosgw@ceph01.service                  loaded failed failed  Ceph rados gateway
● ceph-radosgw@radosgw.gateway-service.service loaded failed failed  Ceph rados gateway
  ceph-radosgw@radosgw.gateway.service         loaded active running Ceph rados gateway
[root@ceph01 ceph]# systemctl restart ceph-mgr@ceph01.service
[root@ceph01 ceph]# systemctl restart ceph-mon@ceph01.service

或者
[root@ceph01 ceph]# systemctl restart ceph-mgr@target
[root@ceph01 ceph]# systemctl restart ceph-mon@target
[root@ceph02 ~]# systemctl list-units --type=service|grep ceph
  ceph-mds@ceph02.service            loaded active running Ceph metadata server daemon
● ceph-mgr@ceph01.service            loaded failed failed  Ceph cluster manager daemon
  ceph-mgr@ceph02.service            loaded active running Ceph cluster manager daemon
● ceph-mon@ceph01.service            loaded failed failed  Ceph cluster monitor daemon
  ceph-mon@ceph02.service            loaded active running Ceph cluster monitor daemon
  ceph-osd@1.service                 loaded active running Ceph object storage daemon osd.1
[root@ceph02 ~]# systemctl restart ceph-mgr@ceph02.service
[root@ceph02 ~]# systemctl restart ceph-mon@ceph02.service

或者
[root@ceph02 ceph]# systemctl restart ceph-mgr@target
[root@ceph02 ceph]# systemctl restart ceph-mon@target
[root@ceph03 ~]# systemctl list-units --type=service|grep ceph
  ceph-mds@ceph03.service                               loaded active running Ceph metadata server daemon
  ceph-mgr@ceph03.service                               loaded active running Ceph cluster manager daemon
● ceph-mon@ceph01.service                               loaded failed failed  Ceph cluster monitor daemon
  ceph-mon@ceph03.service                               loaded active running Ceph cluster monitor daemon
  ceph-osd@2.service                                    loaded active running Ceph object storage daemon osd.2
[root@ceph03 ~]# systemctl restart ceph-mgr@ceph03.service
[root@ceph03 ~]# systemctl restart ceph-mon@ceph03.service

或者
[root@ceph03 ceph]# systemctl restart ceph-mgr@target
[root@ceph03 ceph]# systemctl restart ceph-mon@target

删除pool

说明:pool名字要输入两次,另外如果是缓存卷,无法删除。

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

无法删除缓存卷(正常)

ceph osd pool rm volumes volumes  --yes-i-really-really-mean-it
Error EBUSY: pool 'volumes' has tiers cache-pool

你可能感兴趣的