Error after restart, cannot start container

driver: lxc
driver_version: 2.1.0
kernel: Linux
kernel_architecture: x86_64
kernel_version: 4.4.0-141-generic
server: lxd
server_pid: 7000
server_version: “2.18”
storage: zfs
storage_version: 0.6.5.6-0ubuntu26

hi guys,
i have an issue here
suddenly one of my container can not running after restart …

when i start it give me an error
sudo lxc start netbeat
error: no such file or directory
Try lxc info --show-log netbeat for more info

the log give me information
"Failed to mount ZFS dataset “pool1/containers/netbeat” onto "/var/lib/lxd/storage-pools/pool1/containers/netbeat\

when i try to import it
sudo zpool import pool1
cannot import ‘pool1’: no such pool available

sudo zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
default 99.5G 31.0G 68.5G - 26% 31% 1.00x ONLINE -
pool-goodpeople 496G 195G 301G - 26% 39% 1.00x ONLINE -
pool-hutnet 298G 6.32G 292G - 0% 2% 1.00x ONLINE -
pool-newsnetmedia 199G 93.1G 106G - 46% 46% 1.00x ONLINE -
pool-wibnetmedia 39.8G 677M 39.1G - 3% 1% 1.00x ONLINE -
pool2 99.5G 22.8G 76.7G - 17% 22% 1.00x ONLINE -

sudo lxc storage list
±------------------±------------±-------±------------------±--------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
±------------------±------------±-------±------------------±--------+
| default | | zfs | default | 7 |
±------------------±------------±-------±------------------±--------+
| pool-goodpeople | | zfs | pool-goodpeople | 2 |
±------------------±------------±-------±------------------±--------+
| pool-hutnet | | zfs | pool-hutnet | 2 |
±------------------±------------±-------±------------------±--------+
| pool-newsnetmedia | | zfs | pool-newsnetmedia | 1 |
±------------------±------------±-------±------------------±--------+
| pool-wibnetmedia | | zfs | pool-wibnetmedia | 1 |
±------------------±------------±-------±------------------±--------+
| pool1 | | zfs | pool1 | 1 |
±------------------±------------±-------±------------------±--------+
| pool2 | | zfs | pool2 | 1 |
±------------------±------------±-------±------------------±--------+

lxc storage show pool1
config:
source: pool1
volatile.initial_source: /dev/loop1
zfs.pool_name: pool1
description: “”
name: pool1
driver: zfs
used_by:

  • /1.0/containers/netbeat

here is device list pool mapping
default /dev/sdb
pool-goodpeople /dev/sdh
pool-hutnet /dev/sdf
pool-newsnetmedia /dev/sde
pool-wibnetmedia /dev/sdg
pool2 /dev/sdd

sudo fdisk -l
Disk /dev/sdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 07ECDB3F-A5BF-A04E-93FE-655B1B1D6425

Device Start End Sectors Size Type
/dev/sdb1 2048 209696767 209694720 100G Solaris /usr & Apple ZFS
/dev/sdb9 209696768 209713151 16384 8M Solaris reserved 1

Disk /dev/sdc: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: FC9575B8-628B-9645-8D13-652F097C7D8D

Device Start End Sectors Size Type
/dev/sdc1 2048 209696767 209694720 100G Solaris /usr & Apple ZFS
/dev/sdc9 209696768 209713151 16384 8M Solaris reserved 1

Disk /dev/sdd: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3B02642A-105E-5143-80D7-346139CC0255

Device Start End Sectors Size Type
/dev/sdd1 2048 209696767 209694720 100G Solaris /usr & Apple ZFS
/dev/sdd9 209696768 209713151 16384 8M Solaris reserved 1

Disk /dev/sdf: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: CB099C00-CC73-164A-8DB8-52DFD1068008

Device Start End Sectors Size Type
/dev/sdf1 2048 629127167 629125120 300G Solaris /usr & Apple ZFS
/dev/sdf9 629127168 629143551 16384 8M Solaris reserved 1

Disk /dev/sde: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 72492E8F-6322-F34B-8B3A-299435432C2B

Device Start End Sectors Size Type
/dev/sde1 2048 419411967 419409920 200G Solaris /usr & Apple ZFS
/dev/sde9 419411968 419428351 16384 8M Solaris reserved 1

Disk /dev/sdg: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 6193DE6A-9003-E842-9F1B-FD77F5B79397

Device Start End Sectors Size Type
/dev/sdg1 2048 83867647 83865600 40G Solaris /usr & Apple ZFS
/dev/sdg9 83867648 83884031 16384 8M Solaris reserved 1

Disk /dev/sdh: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 464020E5-3E2E-1047-96A3-58AF8EE9F9D8

Device Start End Sectors Size Type
/dev/sdh1 2048 1048557567 1048555520 500G Solaris /usr & Apple ZFS
/dev/sdh9 1048557568 1048573951 16384 8M Solaris reserved 1

Disk /dev/sda: 24 GiB, 25769803776 bytes, 50331648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0846f7ac

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 50329599 49328130 23.5G 5 Extended
/dev/sda5 1001472 50329599 49328128 23.5G 8e Linux LVM

Partition 2 does not start on physical sector boundary.

Disk /dev/mapper/vm–vg-root: 115.5 GiB, 124033957888 bytes, 242253824 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/vm–vg-swap_1: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

any idea how to fix it ??

LXD remembers pool1 as having been a loop device (/dev/loop1) which is a very very unusual setup for ZFS as ZFS has its own loop system for file based pools…

Anyway, this suggests that this particular zpool is backed by some file, not by a partition.
If you locate that file, you should be able to import the pool by using zpool import pool1 -d /path/to/directory

Hi stephen, Thanks for your clue about .img file … already found the file and import it …
everything get back to normal …

Thank You Stephen

Best
Huda