$ incus storage list
+---------------+--------+--------------------------------------------+-------------+---------+-------------+
| NAME | DRIVER | SOURCE | DESCRIPTION | USED BY | STATE |
+---------------+--------+--------------------------------------------+-------------+---------+-------------+
| default2 | zfs | /var/snap/lxd/common/lxd/disks/default.img | | 9 | UNAVAILABLE |
+---------------+--------+--------------------------------------------+-------------+---------+-------------+
| incus-default | zfs | /var/lib/incus/disks/incus-default.img | | 5 | CREATED |
+---------------+--------+--------------------------------------------+-------------+---------+-------------+
The default2 disk is definitely an old disk imported from lxd. But, the file exists:
sudo ls -lah /var/snap/lxd/common/lxd/disks/default.img
[sudo] password for xrd:
-rw------- 1 root root 100G Nov 22 08:35 /var/snap/lxd/common/lxd/disks/default.img
zpool and zfs don’t show it.
$ zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
incus-default 29.5G 7.60G 21.9G - - 18% 25% 1.00x ONLINE -
$ zfs list | grep default2
<empty...>
I’ve tried a combination of zpool import and incus admin recover but nothing seems to work.
$ incus admin recover
This server currently has the following storage pools:
- default2 (backend="zfs", source="/var/snap/lxd/common/lxd/disks/default.img")
- incus-default (backend="zfs", source="/var/lib/incus/disks/incus-default.img")
Would you like to recover another storage pool? (yes/no) [default=no]: no
The recovery process will be scanning the following storage pools:
- EXISTING: "default2" (backend="zfs", source="/var/snap/lxd/common/lxd/disks/default.img")
- EXISTING: "incus-default" (backend="zfs", source="/var/lib/incus/disks/incus-default.img")
Would you like to continue with scanning for lost volumes? (yes/no) [default=yes]:
Scanning for unknown volumes...
Error: Failed validation request: Failed mounting pool "default2": Failed to run: zpool import -f -d /var/lib/incus/disks default2: exit status 1 (cannot import 'default2': no such pool available)
$ zpool import -f -d /var/snap/lxd/common default2
cannot import 'default2': no such pool available
When you did the migration, I suppose you opted not to remove the old storage pool.
Can you check whether the old storage pool is used at all?
The following command uses the b flag that shows the storage pool for each instance.
incus list -c ns4tb
Can you show the exact error message when you try to launch a container on the old storage pool?
Yes, the storage pool is used by a few machines, sadly.
$ incus launch images:alpine/edge testcontainer --storage default2
Launching testcontainer
Error: Failed instance creation: Failed creating instance from image: Storage pool is unavailable on this server
This is basically what happens when I try to launch one of my VMs on that storage pool:
$ incus start community-public-do-vm
Error: Storage pool "default2" unavailable on this server
Also, I should say, I did have this pool working correctly until a reboot the other day. So, the initial migration from lxd did work.
There was a USB drive which was not plugged in correctly and I suspect that had a cascading effect where other things failed, and all the mounts did not succeed. But, I am having trouble trying to figure out how to resolve it all.
For more context, this storage pool was from an old installation and on a different drive. I moved it into the main SSD drive, and perhaps I used the wrong name? It was originally default, but I think I had to rename it to default2 to get things working. But, this could be memory being faulty.