How do I re-use a BTRFS storage after formatting my system disk?

On my old system, I had somehow (forgot how) set up the LXD containers and stuff to be inside a BTRFS subvolume.

I still have that subvolume, but formatted the rest of my hard disk (so installed LXD afresh).

How do I make LXD use the data from that BTRFS subvolume for LXD? I tried everything I could think of, but lxd init complains that the btrfs subvol is not empty.

What should I do?


I even tried doing:

lxc storage create default-btrfs btrfs source=/media...

But that failed with this message:

Error: Requested btrfs subvolume exists but is not empty

I don’t know what else to do! I am at a loss!

That’s what lxd recover is for :slight_smile: