Lxc storage delete lxd Error: No such object

I’ve deleted the zfs pool manually and still I’m unable to get lxc to remove this storage “lxd” (the name of the zfs pool I created). When I rebooted the server lxd refused to start because the lxd zfs pool was missing. However I can’t figure out where the metadata is coming from and/or how to change the default pool to a different zfs pool.

How do I change the default storage pool to lxdmirror and remove all traces of lxd… and get lxd to read from the right storage pool on start up?

# lxc storage delete lxd

Error: No such Object
# lxc storage list lxd
| lxd       |             | zfs    | lxd       | 2       |
| lxdmirror |             | zfs    | lxdmirror | 15      |

# lxc storage show lxd
  source: lxd
  zfs.pool_name: lxd
description: ""
name: lxd
driver: zfs
- /1.0/images/beb29682c9b598c824592166ee619c8478f5ccba226f525a7d7c0e8810bf3874
- /1.0/images/e1e62217dabb1acff585f13472af44b2720839546d1c3fb60d6187afa91fc995
status: Created
- none

The errors may be coming from those images.
Can you do lxc storage volume list lxd and then attempt to delete them with:

  • lxc storage volume delete lxd image/beb29682c9b598c824592166ee619c8478f5ccba226f525a7d7c0e8810bf3874
  • lxc storage volume delete lxd image/e1e62217dabb1acff585f13472af44b2720839546d1c3fb60d6187afa91fc995

It could be that this is what’s failing and preventing the deletion of the storage pool.

If they don’t go away willingly (likely since you wiped the pool), you may need a bit of DB surgery, can you show:

  • lxd sql global “SELECT * FROM storage_pools;”
  • lxd sql global “SELECT * FROM storage_volumes;”