I am facing an issue where I cannot remap the volume groups previously mapped as storage pools in LXD after I uninstall the LXD without explicitly removing storage pools.
I have installed LXD using snap and mapped one of the volume groups named “l1_md1_lvm” as storage pool in lxd.
Now I have removed the lxd snap calling snap remove lxd without explicitly removing the storage pool.
Install back the LXD using snap and map the same volumegroup back to lxd as storage pool. It fails saying “Error: Volume group “op1_md1_lvm” is already used by LXD”
This sounds like something wasn’t cleaned up properly when uninstalling the snap. Did you encounter any errors during the removal of the LXD snap? Where there any left over volumes in the volume group which were not managed by LXD?
Would be interesting to know if you can reproduce this issue.
There error is happening if there is still the lxd_pool tag set on the volume group.