Low Orbit Flux Logo 2 F

Docker Zfs

Also see these:

Docker ZFS Storage Driver Setup

Stop the docker daemon:



sudo systemctl stop docker

Backup and remove the contents of /var/lib/docker:



sudo cp -au /var/lib/docker /var/lib/docker.bak
sudo rm -rf /var/lib/docker/*

Create a new zpool mounted on /var/lib/docker:



sudo zpool create -f zpool-docker -m /var/lib/docker mirror /dev/sda /dev/sdb

Verify that it is setup and mounted:



sudo zfs list

Enable the ZFS storage driver in the docker daemon config:

vi /etc/docker/daemon.json
{ "storage-driver": "zfs" }

Start docker back up:



sudo systemctl start docker

Verify that docker is using the ZFS storage driver as expected:



docker info