From 6cc2bb83ae5472ae60d1b37888212cfa978963e3 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Wed, 16 Jan 2019 22:51:25 -0600 Subject: [PATCH] Ubuntu/Debian: Create a dataset for docker-ce Beauregard Slim suggested this in #8301, saying: Apparently docker-ce automatically detects if /var/lib/docker is on ZFS and, without asking and with no changes to the default config, starts creating ZFS snapshots and clones of whatever dataset that directory is contained in (i.e. rpool/ROOT/ubuntu). I would recommend that the guide include creation of a docker data set exactly like it does for nfs It is unclear to me if this behavior is specific to docker-ce or applies to the standard docker packages shipped by the distro. --- Debian-Stretch-Root-on-ZFS.md | 3 +++ Ubuntu-18.04-Root-on-ZFS.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Debian-Stretch-Root-on-ZFS.md b/Debian-Stretch-Root-on-ZFS.md index 8fdb20b..b1c95cc 100644 --- a/Debian-Stretch-Root-on-ZFS.md +++ b/Debian-Stretch-Root-on-ZFS.md @@ -130,6 +130,9 @@ Properties are inherited, if you want to create (for example) `rpool/var/lib` yo If this system will store local email in /var/mail: # zfs create rpool/var/mail + If this system will use docker-ce (which creates snapshots by default): + # zfs create -o mountpoint=/var/lib/docker rpool/var/docker + If this system will use NFS (locking): # zfs create -o com.sun:auto-snapshot=false \ -o mountpoint=/var/lib/nfs rpool/var/nfs diff --git a/Ubuntu-18.04-Root-on-ZFS.md b/Ubuntu-18.04-Root-on-ZFS.md index d5a1f41..609484c 100644 --- a/Ubuntu-18.04-Root-on-ZFS.md +++ b/Ubuntu-18.04-Root-on-ZFS.md @@ -151,6 +151,9 @@ With ZFS, it is not normally necessary to use a mount command (either `mount` or If this system will store local email in /var/mail: # zfs create rpool/var/mail + If this system will use docker-ce (which creates snapshots by default): + # zfs create -o mountpoint=/var/lib/docker rpool/var/docker + If this system will use NFS (locking): # zfs create -o com.sun:auto-snapshot=false \ -o mountpoint=/var/lib/nfs rpool/var/nfs