How do I configure Docker to use ZFS?
I'm trying to get docker to use an existing zpool. According to the Docker documentation I should set my storage driver in /etc/default/docker
:
DOCKER_OPTS="--storage-driver=zfs"
However when I restart the service Docker will not startup:
level=fatal msg="Error starting daemon: error initializing graphdriver: prerequisites for driver not satisfied (wrong filesystem?)"
When trying docker daemon --storage-driver=zfs
I get a similar error.
I am using Docker 1.5-1 in Xenial.
Solution 1:
you should probably also set zfs.fsName
using --storage-opt zfs.fsName="filesystem name"
alternatively you can mount a zfs filesystem to /var/lib/docker