[feature-request] a parameter to avoid removal of thinpool when a storage pool is removed

At the moment if you first attach a storage pool to the existing lvm thinpool and try to delete it then it tries to delete it as well:

$ lxc storage delete default
Error: Failed to run: lvremove -f /dev/vghdd/lvdata: Logical volume vghdd/<redacted> contains a filesystem in use.

How about a parameter that simply removes a reference to the thinpool and leaves it as-is?

PS: I could have tried to contribute it, since it’s obviously has the lowest ever priority, if needed at all :slight_smile:

Ah yeah, we should do like we do with CEPH and store a volatile key on create telling us whether we create the thinpool or not, if we didn’t create it, then we shouldn’t attempt to delete it when the LXD pool is removed.

@brauner should be easy enough to implement like the CEPH trick.

1 Like