issue this container (benchmark-19) doesn’t exist how do i remove along with image etc? There is no data in this pool, it had to be created as loop back file to start LXD now i am trying to tidy up.
$ lxc storage delete LXD
$ lxc storage list
±-----±------------±-------±-------±--------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
±-----±------------±-------±-------±--------+
| LXD | | zfs | LXD | 5 |
±-----±------------±-------±-------±--------+
| lxd | | zfs | lxd | 45 |
±-----±------------±-------±-------±--------+
lxc storage show LXD
config:
source: LXD
volatile.initial_source: /dev/sdb
zfs.pool_name: LXD
description: “”
name: LXD
driver: zfs
used_by:
- /1.0/containers/benchmark-19
- /1.0/images/f75468c572cc50eca7f76391182e6fdaf58431f84c3d35a2c92e83814e701698
- /1.0/profiles/cloud-init
- /1.0/storage-pools/LXD/volumes/custom/backups
- /1.0/storage-pools/LXD/volumes/custom/images
status: Created
locations: - none
$lxd sql global “select * from storage_pools;”
±—±-----±-------±------------±------+
| id | name | driver | description | state |
±—±-----±-------±------------±------+
| 1 | LXD | zfs | | 1 |
| 3 | lxd | zfs | | 1 |
±—±-----±-------±------------±------+
$ lxd sql global “select * from storage_pools_config;”
±—±----------------±--------±------------------------±---------+
| id | storage_pool_id | node_id | key | value |
±—±----------------±--------±------------------------±---------+
| 3 | 1 | 1 | volatile.initial_source | /dev/sdb |
| 4 | 1 | 1 | zfs.pool_name | LXD |
| 5 | 1 | 1 | source | LXD |
| 9 | 3 | 1 | source | lxd |
| 10 | 3 | 1 | volatile.initial_source | lxd |
| 11 | 3 | 1 | zfs.pool_name | lxd |
±—±----------------±--------±------------------------±---------+
Can i do:
$ lxd sql global “delete from storage_pools_config where storage_pool_id =1;”
and then remove the zpool manually.
$ zpool destroy LXD