I have been using SNAP LXD for quite a while with its BTRFS default storage pool being on a 2nd disk on the Host
Old storage path:
/mnt/lxd-storage-pool
I had to reinstall LXD.
When I execute:
$ sudo lxd init
how to I set the new LXD install to use the previous /mnt/lxd-storage-pool
I tried creating a new BTRFS subvolume:
/mnt/@lxd-storage-pool
then I used
$ sudo lxd init to set /mnt/@lxd-storage-pool as the new lxd install’s storage pool
then I used rsync to to copy the old /mnt/lxd-storage-pool to /mnt/@lxd-storage-pool
then when the copy was complete I ran:
$ lxd recover
This LXD server currently has the following storage pools:
- lxd-storage-pool (backend=“btrfs”, source=“/mnt/@lxd-storage-pool”)
Would you like to recover another storage pool? (yes/no) [default=no]:
The recovery process will be scanning the following storage pools:- EXISTING: “lxd-storage-pool” (backend=“btrfs”, source=“/mnt/@lxd-storage-pool”)
Would you like to continue with scanning for lost volumes? (yes/no) [default=yes]:
Scanning for unknown volumes…
Error: Failed validation request: Failed checking volumes on pool “lxd-storage-pool”: Failed parsing backup file “/var/snap/lxd/common/lxd/storage-pools/lxd-storage-pool/containers/test/backup.yaml”: open /var/snap/lxd/common/lxd/storage-pools/lxd-storage-pool/containers/test/backup.yaml: no such file or directory
What/why doesn’t this work?
I just want the new LXD install to reuse the old
/mnt/lxd-storage-pool
and all of its Containers & VMs