ceph delete 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.

Check if you have permission to delete pool

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

Add and delete pool permissions

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

Distribution configuration file

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

Restart mon and mgr services of all nodes

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

或者
[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
  [email protected]            loaded active running Ceph metadata server daemon
● [email protected]            loaded failed failed  Ceph cluster manager daemon
  [email protected]            loaded active running Ceph cluster manager daemon
● [email protected]            loaded failed failed  Ceph cluster monitor daemon
  [email protected]            loaded active running Ceph cluster monitor daemon
  [email protected]                 loaded active running Ceph object storage daemon osd.1
[root@ceph02 ~]# systemctl restart [email protected]
[root@ceph02 ~]# systemctl restart [email protected]

或者
[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
  [email protected]                               loaded active running Ceph metadata server daemon
  [email protected]                               loaded active running Ceph cluster manager daemon
● [email protected]                               loaded failed failed  Ceph cluster monitor daemon
  [email protected]                               loaded active running Ceph cluster monitor daemon
  [email protected]                                    loaded active running Ceph object storage daemon osd.2
[root@ceph03 ~]# systemctl restart [email protected]
[root@ceph03 ~]# systemctl restart [email protected]

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

Delete pool

Note: The pool name must be entered twice, and if it is a cache volume, it cannot be deleted.

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

Unable to delete cache volume (normal)

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

Guess you like

Origin blog.csdn.net/weixin_40548182/article/details/111636379