====== [HOWTO] Completely remove a POOL from cluster ======
^ Documentation ^|
^Name:| [HOWTO] Completely remove a POOL from cluster |
^Description:| HOW TO Completely remove a POOL from cluster (hardcore edition) |
^Modification date :|13/06/2018|
^Owner:|dodger|
^Notify changes to:|Owner |
^Tags:|ceph, object storage |
^Scalate to:|The_fucking_bofh|
====== Variables used in this documentation ======
^ Name ^ Description ^ Sample ^
| ''${POOL_NAME}'' | Name of the gw node | export POOL_NAME="new.default.rgw.buckets.data"
|
====== Instructions ======
Removing a pool will **DESTROY** all the data inside, there will be no way to recover it:
Error EPERM: WARNING: this will *PERMANENTLY DESTROY* all data stored in pool new.default.rgw.buckets.data. If you are *ABSOLUTELY CERTAIN* that is what you want, pass the pool name *twice*, followed by --yes-i-really-really-mean-it.
Droping a pool:
ceph osd pool delete ${POOL_NAME}
Will result in the upper message:
Error EPERM: WARNING: this will *PERMANENTLY DESTROY* all data stored in pool ${POOL_NAME}. If you are *ABSOLUTELY CERTAIN* that is what you want, pass the pool name *twice*, followed by --yes-i-really-really-mean-it.
So:
ceph osd pool delete ${POOL_NAME} ${POOL_NAME} --yes-i-really-really-mean-it
That by default will show a message:
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
So you need to change that parameter prior to dropping the pool:
ceph tell mon.${x} injectargs '--mon-allow-pool-delete=true'
Where ''${x}'' is the master monitor (I suppose any ''mon'' on the pool will propagate the setting).
\\
Then drop the pool:
\\
ceph osd pool delete ${POOL_NAME} ${POOL_NAME} --yes-i-really-really-mean-it
\\
And re-set the parameter, **THIS IS MANDATORY**:
ceph tell mon.${x} injectargs '--mon-allow-pool-delete=false'