Moving LXD Containers Between ZFS Pools

Hi guys,

I have successfully moved all the containers in a LXD server from the existing/old lxdpool to a new lxdpool-2 by following the instructions found here:

Everything is running smoothly so I want to delete the old lxdpool, however there seem to be some images stored in the old pool, so I am hesitant if I should dig deeper or just remove the oldpool…

Marked in bold towards the end of the following:

root@YCC1:~# zfs list
lxdpool 1.32G 17.9G 30.6K none
lxdpool-2 17.3G 40.4G 24K none
lxdpool-2/containers 16.6G 40.4G 24K none
lxdpool-2/containers/cadilla-me 1.49G 40.4G 1.49G /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/cadilla-me
lxdpool-2/containers/mauteam-org 2.10G 40.4G 2.10G /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/mauteam-org
lxdpool-2/containers/mautic-2-15-3 1.28G 40.4G 1.28G /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/mautic-2-15-3
lxdpool-2/containers/mautic-2-15-3-DB 1.03G 40.4G 1.03G /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/mautic-2-15-3-DB
lxdpool-2/containers/ubuntu-18-04 830M 40.4G 830M /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/ubuntu-18-04
lxdpool-2/containers/whereisthisgoingtoland 17.8M 40.4G 673M /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/whereisthisgoingtoland
lxdpool-2/containers/wp-5-3-1 1.25G 40.4G 1.25G /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/wp-5-3-1
lxdpool-2/containers/wp-5-3-1-DB 1020M 40.4G 1020M /var/snap/lxd/common/lxd/storage-pools/zfspool-2/containers/wp-5-3-1-DB
lxdpool-2/custom 24K 40.4G 24K none
lxdpool-2/custom-snapshots 24K 40.4G 24K none
lxdpool-2/deleted 24K 40.4G 24K none
lxdpool-2/images 663M 40.4G 24K none
lxdpool-2/images/979ff60086ca9fb1c93d3131f8eca291820a524f0bd0b7d621a3c2f5f41ef185 663M 40.4G 663M none
lxdpool-2/snapshots 24K 40.4G 24K none
lxdpool/containers 30.6K 17.9G 30.6K none
lxdpool/custom 30.6K 17.9G 30.6K none
lxdpool/custom-snapshots 30.6K 17.9G 30.6K none
lxdpool/deleted 91.9K 17.9G 30.6K none
lxdpool/deleted/containers 30.6K 17.9G 30.6K none
lxdpool/deleted/images 30.6K 17.9G 30.6K none
lxdpool/images 1.31G 17.9G 30.6K none
lxdpool/images/368bb7174b679ece9bd0dfe2ab953c02c47ff4451736cb255655ba8348f17bc0 663M 17.9G 663M none
lxdpool/images/979ff60086ca9fb1c93d3131f8eca291820a524f0bd0b7d621a3c2f5f41ef185 677M 17.9G 677M none
lxdpool/snapshots 30.6K 17.9G 30.6K none

Another concern is that I have many more than 2 images stored on this server, but I have no idea where those are stored.
Not too worried at this time cause the images can be rebuilt from the containers, however, I would like to understand how this works.

Those are old cached copies of images, that’s fine.
The rest of your images are likely just stored as tarballs in /var/snap/lxd/common/lxd/images/

1 Like

Thank you @stgraber