Removed CEPH on host, how to remove storage pool from LXD?

Hi,

I removed CEPH from some servers in a LXD cluster, and I want to remove the corresponding storage pool in LXD (I’ll migrate to Incus after cleaning some things on these LXD hosts, like storage, and networks).

When I run lxc storage delete pool, I get :

Error: Failed checking the existence of the ceph "pool" osd pool while attempting to delete it because of an internal error: Failed to run: ceph --name client.admin --cluster ceph osd pool get pool size: exit status 1 (Error initializing cluster client: ObjectNotFound('RADOS object not found (error calling conf_read_file)'))

It is normal, because of ceph has been removed from the host.

But, how can I remove the storage pool from the LXD database ?

I tried systemctl reload snap.lxd.daemon, but nothing better.

So, I’ve been able to remove this storage by deleting it from the LXD database.

First, obtain de storage ID with :
lxd sql global 'select * from storage_pools'

Then, delete it :
lxd sql global 'delete from storage_pools where id = X' (where X is the id from SELECT request)