Importing a container locally copied from one zfs pool to another (all local)

Hello

I’m missing something simple here, I know it

I copied a container from one local zfs pool “default” to a new one on another disk

I’ve got this new pool imported to lxd as “zfs2”

I’ve mounted the dataset in the new location and modified the backup.yaml file so that all references to the default pool now show “zfs”

However, when I try and import the container with lxd import, it still says there are references to the “default” pool and I’m sure I’ve changed everything in it, I’ve been through it with a fine tooth comb so I don’t know what its referencing?

It’s almost like its looking at the old containers backup.yaml file?

Any ideas one what to check before I pull my hair out?

Here’s the backup.yaml

root@server01:/var/snap/lxd/common/lxd/storage-pools/default/containers/video-controller-3# cat backup.yaml 
container:
  architecture: x86_64
  config:
    boot.autostart: "yes"
    image.architecture: amd64
    image.description: ubuntu 16.04 LTS amd64 (release) (20180724)
    image.label: release
    image.os: ubuntu
    image.release: xenial
    image.serial: "20180724"
    image.version: "16.04"
    volatile.base_image: 2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386
    volatile.eth0.hwaddr: 00:16:3e:8c:e2:66
    volatile.idmap.base: "0"
    volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.power: RUNNING
  devices:
    root:
      path: /
      pool: zfs2
      size: 200GB
      type: disk
  ephemeral: false
  profiles:
  - profzfs2
  stateful: false
  description: ""
  created_at: 2018-07-31T23:53:49+01:00
  expanded_config:
    boot.autostart: "yes"
    image.architecture: amd64
    image.description: ubuntu 16.04 LTS amd64 (release) (20180724)
    image.label: release
    image.os: ubuntu
    image.release: xenial
    image.serial: "20180724"
    image.version: "16.04"
    volatile.base_image: 2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386
    volatile.eth0.hwaddr: 00:16:3e:8c:e2:66
    volatile.idmap.base: "0"
    volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.power: RUNNING
  expanded_devices:
    eth0:
      name: eth0
      nictype: bridged
      parent: lxdbr99
      type: nic
    root:
      path: /
      pool: zfs2
      size: 200GB
      type: disk
  name: video-controller-3
  status: Stopped
  status_code: 102
  last_used_at: 2018-10-06T10:48:04.554495491+01:00
  location: none
snapshots:
- architecture: x86_64
  config:
    image.architecture: amd64
    image.description: ubuntu 16.04 LTS amd64 (release) (20180724)
    image.label: release
    image.os: ubuntu
    image.release: xenial
    image.serial: "20180724"
    image.version: "16.04"
    volatile.base_image: 2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386
    volatile.eth0.hwaddr: 00:16:3e:8c:e2:66
    volatile.idmap.base: "0"
    volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  created_at: 2018-07-31T23:54:03+01:00
  devices:
    root:
      path: /
      pool: zfs2
      type: disk
  ephemeral: false
  expanded_config:
    image.architecture: amd64
    image.description: ubuntu 16.04 LTS amd64 (release) (20180724)
    image.label: release
    image.os: ubuntu
    image.release: xenial
    image.serial: "20180724"
    image.version: "16.04"
    volatile.base_image: 2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386
    volatile.eth0.hwaddr: 00:16:3e:8c:e2:66
    volatile.idmap.base: "0"
    volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  expanded_devices:
    eth0:
      name: eth0
      nictype: bridged
      parent: lxdbr99
      type: nic
    root:
      path: /
      pool: zfs2
      type: disk
  last_used_at: 1970-01-01T01:00:00+01:00
  name: snap0
  profiles:
  - profzfs2
  stateful: false
- architecture: x86_64
  config:
    image.architecture: amd64
    image.description: ubuntu 16.04 LTS amd64 (release) (20180724)
    image.label: release
    image.os: ubuntu
    image.release: xenial
    image.serial: "20180724"
    image.version: "16.04"
    volatile.base_image: 2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386
    volatile.eth0.hwaddr: 00:16:3e:8c:e2:66
    volatile.idmap.base: "0"
    volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  created_at: 2018-07-31T23:56:16+01:00
  devices:
    root:
      path: /
      pool: zfs2
      type: disk
  ephemeral: false
  expanded_config:
    image.architecture: amd64
    image.description: ubuntu 16.04 LTS amd64 (release) (20180724)
    image.label: release
    image.os: ubuntu
    image.release: xenial
    image.serial: "20180724"
    image.version: "16.04"
    volatile.base_image: 2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386
    volatile.eth0.hwaddr: 00:16:3e:8c:e2:66
    volatile.idmap.base: "0"
    volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
    volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  expanded_devices:
    eth0:
      name: eth0
      nictype: bridged
      parent: lxdbr99
      type: nic
    root:
      path: /
      pool: zfs2
      type: disk
  last_used_at: 1970-01-01T01:00:00+01:00
  name: snap1
  profiles:
  - profzfs2
  stateful: false
pool:
  config:
    size: 39GB
    source: large1-5/zfs2
    volume.zfs.use_refquota: "true"
    zfs.pool_name: large1-5
  description: ""
  name: zfs2
  driver: zfs
  used_by: []
  status: Created
  locations:
  - none
volume:
  config: {}
  description: ""
  name: video-controller-3
  type: container
  used_by: []

Try mounting the dataset on /var/snap/lxd/common/lxd/storage-pools/zfs2/containers/video-controller-3 instead?

Ah never spotted that, I knew it was something silly. I’ll try that now.

Cheers,
Jon.