LXD Container in ERROR State

742 Views Asked by At

I have a Ubuntu 16.04 LTS system where i created 3 LXD containers. They where working fine. The system was reseted without stopping the containers by accident. Now they are in a ERROR state and I cannot start them. When i try to start any of them i get the same error (i get it even if i try to delete them):

error: Unable to import the ZFS pool: cannot import 'lxd': no such pool available

Is there any way i can recover them?

My system is:

Ubuntu 16.04 LTS
LXC/LXD version 2.011
ZFS v0.6.5.6-0ubuntu20

With lxc list i get the following result:

+-----------+-------+------+------+------------+-----------+
|   NAME    | STATE | IPV4 | IPV6 |    TYPE    | SNAPSHOTS |
+-----------+-------+------+------+------------+-----------+
| cups-lxc  | ERROR |      |      | PERSISTENT |           |
+-----------+-------+------+------+------------+-----------+
| mongo-lxc | ERROR |      |      | PERSISTENT |           |
+-----------+-------+------+------+------------+-----------+
| mysql-lxc | ERROR |      |      | PERSISTENT |           |
+-----------+-------+------+------+------------+-----------+
1

There are 1 best solutions below

0
On

The fact that zpool list shows no pool means that you need to run zpool import <pool name> first. If you want to be more cautious, you can run it without the pool name to get a list of all zpools that ZFS can find on the disks attached to the system (but you shouldn’t need to do that, since importing will not cause any damage anyway).