How to recover a lxd-storage volume

Hi,
I stored several container in a separate lxd-storage (btrfs).
The hole thing is located on a physical disk.

Today, the root-disk failed and I attached the lxd-disk to the backup-device.

I tried to restore the volumes on the new device, without success.

What I did:

lxd recover
Name of the storage pool: second
Name of the storage backend: btrfs
Source of the storage pool: /dev/sdb1

 - EXISTING: "default" (backend="btrfs", source="/var/snap/lxd/common/lxd/disks/default.img")
 - NEW: "second" (backend="btrfs", source="/dev/sdb1")

Error: Failed validation request: Failed checking volumes on pool "default": 
Failed parsing backup file 
"/var/snap/lxd/common/lxd/storage-pools/default/containers/migration.3209980035/backup.yaml": 
open /var/snap/lxd/common/lxd/storage-pools/default/containers/migration.3209980035/backup.yaml: 
no such file or directory

Any help to allocate the storage pool to the new device is highly appreciated.

Thanks in advance

hartmut

migration.XYZ isn’t a real container, I’d recommend just deleting that folder to avoid confusing lxd receover.

Thanks.
I should delete anything in the folder
/var/snap/lxd/common/lxd/storage-pools/default/containers ?

Now the »unknown volumes are found«

The following unknown volumes« have been found:
 - Container "devel" on pool "second" in project "default" (includes 1 snapshots)
 - Container "halfgarten" on pool "second" in project "default" (includes 0 snapshots)
 - Container "hb" on pool "second" in project "default" (includes 0 snapshots)  (...)

but then

failed creating instance "devel" record in project "default"

Where do I find an error-log?

What’s the full error for that devel instance?

Hi Stephane,

there were errors in mapped filesystems. After fulfilling that, the recovery was successful.
THANKS VERY VERY MUCH for releasing this awesome tool!

1 Like