Debian 12.5 / ZFS 2.1.x / Incus 6.1 / Containers - problem installing docker


Debian 12.5 is using ZFS version 2.1.x. When using ZFS storage pool with Incus, there seems to be a problem related to this driver version that affects containers - problem when trying to installing docker container (docker-compose up -d).

The error message could be different with different dockers. For example:
“ERROR: failed to register layer: unlinkat /var/cache/debconf: invalid argument”.

As far as I understand, it is fixed with ZFS 2.2.x (others have complained similar issues with Proxmox). There seems to be some movement on Debian side [], ( but is there any known solution from Incus for Debian 12.x + ZFS 2.1.x version besides using VM instead of container?


Create a block based volume on the ZFS pool and attach that to the container.

incus storage volume create default docker zfs.block_mode=true size=50GiB
incus config device add YOUR-CONTAINER docker disk pool=default source=docker path=/var/lib/docker

1 Like

Thank you! That did the trick.

Isn’t 2.2 released on Debian 12 now? In Backports.

Yes, it is.

If you want to use it, then modify apt sources:

sh -c 'cat <<EOF >> /etc/apt/sources.list
deb bookworm-backports main contrib non-free
apt update
apt install -t bookworm-backports zfsutils-linux
1 Like