Ghost container volume

Hello to all, I have a strange situation.

After a failed lxc import (image to big for my default volume root size or an nonexistent storage volume attached to the original exported container, I’m sorry to not to be more precise but I discovered the problem after this two operation) I have a “ghost” storage volume.

1st failed operation: lxc import image_prod.tar.gz image_stage
2nd failed operation: lxc import image_prod.tar.gz image_stage

I see the ghost volume through lxc storage volume list default, no volume trace with lvs or lsblk.

To delete it the only way is through lxd sql global "delete from storage_volumes where storage_volumes.id=6"?

Thank you, Davide

lxc snap 4.11
storage LVM (xfs, no thinpool)

Sounds like a bug in the revert logic.

@tomp can you take a quick look at this?

Do i have to open an issue in github?

You can, but the ping above is usually enough to have Tom come up with a pull request :wink:

Ok, to solve my problem is safe to delete the entry with the lxd sql command?

Yep, that’s fine since you’ve confirmed that the LV itself was already deleted by LXD.

Will do.

Have reproduced this issue.

This should fix it: