Docker with overlay driver in LXD cluster not working

I have been trying to work docker inside lxc container to work with overlay driver. LXD cluster is setup on Ubuntu 18.04 VM with zfs pool. Each time I install docker it starts with vfs storage driver, but when I change with overlay (already added as linux module in lxd profile ) docker fails to start. I even tried setting docker storage driver to zfs which fails too. I am new with LXD technology and can’t figure out if it is possible to run docker with overlay storage driver on LXD cluster containers on ZFS pool.

The overlay kernel filesystem cannot be used on top of zfs.
That’s not a LXD limitation but a hard kernel one as the two filesystems are just incompatible.

For similar environments in the past, some have created a separate storage pool which is backed by something compatible with overlay (dir on top of ext4 is the most solid) and then assigned one storage volume per container, mounting that volume at /var/lib/docker.

That’s exactly what I needed to know thanks.

Hello! I got what you said but have no idea on how to do it, can you give an idea on how to do this? Thank you!

Also might be worth pointing out that BTRFS backed storage also doesn’t play completely nicely with docker because docker then uses BTRFS’ native snapshotting functionality instead of overlay, which isn’t fully supported by LXD when transferring the container between hosts/pools.

See