lxd
lxd copied to clipboard
lxd recover does not recover storage before container
hi,
we had to recover a system with containers having 2 storage. The lxd recover was trying to recover the container after recovering the first storage (root) and failed because the second one was not here.
recover should recover all the storage before trying to restore the containers.
This LXD server currently has the following storage pools:
Would you like to recover another storage pool? (yes/no) [default=no]: yes
Name of the storage pool: GUEST
Name of the storage backend (lvm, powerflex, zfs, btrfs, ceph, cephfs, cephobject, dir): btrfs
Source of the storage pool (block device, volume group, dataset, path, ... as applicable): /mnt/GUEST
Additional storage pool configuration property (KEY=VALUE, empty when done):
Would you like to recover another storage pool? (yes/no) [default=no]: yes
Name of the storage pool: database
Name of the storage backend (lvm, powerflex, zfs, btrfs, ceph, cephfs, cephobject, dir): dir
Source of the storage pool (block device, volume group, dataset, path, ... as applicable): /mnt/DATABASE
Additional storage pool configuration property (KEY=VALUE, empty when done):
Would you like to recover another storage pool? (yes/no) [default=no]:
The recovery process will be scanning the following storage pools:
- NEW: "GUEST" (backend="btrfs", source="/mnt/GUEST")
- NEW: "database" (backend="dir", source="/mnt/DATABASE")
Would you like to continue with scanning for lost volumes? (yes/no) [default=yes]: yes
Scanning for unknown volumes...
The following unknown storage pools have been found:
- Storage pool "GUEST" of type "btrfs"
- Storage pool "database" of type "dir"
The following unknown volumes have been found:
- Container "myserver01" on pool "GUEST" in project "default" (includes 0 snapshots)
- Volume "myserver01" on pool "database" in project "default" (includes 0 snapshots)
Would you like those to be recovered? (yes/no) [default=no]: yes
Starting recovery...
Error: Failed import request: Failed creating instance "myserver01" record in project "default": Failed creating instance record: Failed initialising instance: Failed add validation for device "myserver01": Failed to get storage pool "database": Storage pool not found
version is 5.21.3-75def3c on unbuntu 24.04.
best regards, Ghislain.
@roosterfish can you look at this one as part of your work on recover?
@roosterfish does one of your recent PRS solve this?
Might be fixed by https://github.com/canonical/lxd/pull/16164, but I'll double check.