14

I'm running proxmox and I try to remove a pool which I created wrong. However it keeps giving this error:

mon_command failed - pool deletion is disabled; you must first set the mon_allow_pool_delete config option to true before you can destroy a pool1_U (500)
OK

But:

root@kvm-01:~# ceph -n mon.0 --show-config | grep mon_allow_pool_delete
mon_allow_pool_delete = true
root@kvm-01:~# ceph -n mon.1 --show-config | grep mon_allow_pool_delete
mon_allow_pool_delete = true
root@kvm-01:~# ceph -n mon.2 --show-config | grep mon_allow_pool_delete
mon_allow_pool_delete = true

root@kvm-01:~# cat /etc/ceph/ceph.conf
[global]
         auth client required = cephx
         auth cluster required = cephx
         auth service required = cephx
         cluster network = 10.0.0.0/24
         filestore xattr use omap = true
         fsid = 41fa3ff6-e751-4ebf-8a76-3f4a445823d2
         keyring = /etc/pve/priv/$cluster.$name.keyring
         osd journal size = 5120
         osd pool default min size = 1
         public network = 10.0.0.0/24
[osd]
         keyring = /var/lib/ceph/osd/ceph-$id/keyring
[mon.0]
         host = kvm-01
         mon addr = 10.0.0.1:6789
         mon allow pool delete = true

[mon.2]
         host = kvm-03
         mon addr = 10.0.0.3:6789
         mon allow pool delete = true
[mon.1]
         host = kvm-02
         mon addr = 10.0.0.2:6789
         mon allow pool delete = true

So that's my full config. Any idea why I am unable to delete my pools?

Florius
  • 367
  • 1
  • 5
  • 17

5 Answers5

35

Another approach:

ceph tell mon.\* injectargs '--mon-allow-pool-delete=true'
ceph osd pool rm test-pool test-pool --yes-i-really-really-mean-it
Cobra vs Ninja
  • 477
  • 4
  • 4
  • I followed your approach, and it exactly fixed my problem! Thank you! ` -- $ ssh cloud-1 sudo ceph --version ceph version 13.2.1 (5533ecdc0fda920179d7ad84e0aa65a127b20d77) mimic ` (stable) – holibut Sep 21 '18 at 01:42
  • 1
    This is a better approach because when the monitor is restarted, the flag is reset. – Brian Topping Nov 10 '18 at 16:44
  • 2
    You can turn it back off with `ceph tell mon.\* injectargs '--mon-allow-pool-delete=false'` once you've deleted your pool. – KingBob May 08 '19 at 10:28
  • 1
    This command is outdated, please use `ceph config set mon mon_allow_pool_delete true` instead. – Devpool Nov 07 '19 at 13:45
10

You can set the config via the CLI or via the dashboard of Ceph under Cluster -> Configuration (advanced settings).

Ceph dashboard configuration page

The CLI command is the following:

ceph config set mon mon_allow_pool_delete true

Devpool
  • 701
  • 7
  • 6
0

you need to do:

systemctl restart ceph-mon.target

Otherwise you can restart the server an infinite number of times and nothing happens

KingBob
  • 792
  • 2
  • 6
  • 14
gonzalo
  • 32
  • 1
-1

After editing the config you need to reboot the node. After the reboot everything went smoothly!

Florius
  • 367
  • 1
  • 5
  • 17
-1

After added the following lines to the /etc/ceph/ceph.conf or /etc/ceph/ceph.d/ceph.conf and restart the ceph.target servivce, the issue still exists.

[mon.1]
host = kvm-02
mon addr = 10.11.110.112:6789
mon allow pool delete = true