1. 程式人生 > >如何刪除ceph的一個pool

如何刪除ceph的一個pool

其實執行程式碼:
ceph osd pool delete ecpool ecpool –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
這是由於沒有配置mon節點的 mon_allow_pool_delete 欄位所致,解決辦法就是到mon節點進行相應的設定。
解決方案:
注:1-3步的操作必須在mon節點上執行

  1. 開啟mon節點的配置檔案:
    [root@node1 ceph]# vi /etc/ceph/ceph.conf
  2. 在配置檔案中新增如下內容:
    [mon]
    mon allow pool delete = true
  3. 重啟ceph-mon服務:
    [root@node1 ceph]# systemctl restart ceph-mon.target
  4. 執行刪除pool命令:
    [root@node3 ~]# ceph osd pool delete ecpool ecpool –yes-i-really-really-mean-it
    pool ‘ecpool’ removed