From 1fc890ed195fc3770ebd1c25a015d37a5e6a72c4 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 17 Mar 2019 13:44:27 -0500 Subject: [PATCH] Ubuntu/Debian: Add a /var/lib dataset This makes it cleaner to add datasets under /var/lib. --- Debian-Stretch-Root-on-ZFS.md | 15 +++++++-------- Ubuntu-18.04-Root-on-ZFS.md | 15 +++++++-------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Debian-Stretch-Root-on-ZFS.md b/Debian-Stretch-Root-on-ZFS.md index 155755f..87249b2 100644 --- a/Debian-Stretch-Root-on-ZFS.md +++ b/Debian-Stretch-Root-on-ZFS.md @@ -117,6 +117,7 @@ The primary goal of this dataset layout is to separate the OS from user data. Th # zfs create -o mountpoint=/root rpool/home/root # zfs create -o canmount=off rpool/var # zfs create -o com.sun:auto-snapshot=false rpool/var/cache + # zfs create -o canmount=off rpool/var/lib # zfs create rpool/var/log # zfs create rpool/var/spool # zfs create -o com.sun:auto-snapshot=false rpool/var/tmp @@ -137,20 +138,18 @@ The primary goal of this dataset layout is to separate the OS from user data. Th If this system will store local email in /var/mail: # zfs create rpool/var/mail - If this system will use Docker (which manages its own datasets & snapshots): - # zfs create -o com.sun:auto-snapshot=false \ - -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 - If this system will use Snap packages: # zfs create rpool/var/snap If you use /var/www on this system: # zfs create rpool/var/www + If this system will use Docker (which manages its own datasets & snapshots): + # zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker + + If this system will use NFS (locking): + # zfs create -o com.sun:auto-snapshot=false rpool/var/lib/nfs + If you want a separate /tmp dataset (choose this now or tmpfs later): # zfs create -o com.sun:auto-snapshot=false rpool/tmp # chmod 1777 /mnt/tmp diff --git a/Ubuntu-18.04-Root-on-ZFS.md b/Ubuntu-18.04-Root-on-ZFS.md index e81ae2f..287a6df 100644 --- a/Ubuntu-18.04-Root-on-ZFS.md +++ b/Ubuntu-18.04-Root-on-ZFS.md @@ -141,6 +141,7 @@ With ZFS, it is not normally necessary to use a mount command (either `mount` or # zfs create -o mountpoint=/root rpool/home/root # zfs create -o canmount=off rpool/var # zfs create -o com.sun:auto-snapshot=false rpool/var/cache + # zfs create -o canmount=off rpool/var/lib # zfs create rpool/var/log # zfs create rpool/var/spool # zfs create -o com.sun:auto-snapshot=false rpool/var/tmp @@ -161,20 +162,18 @@ 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 (which manages its own datasets & snapshots): - # zfs create -o com.sun:auto-snapshot=false \ - -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 - If this system will use Snap packages: # zfs create rpool/var/snap If you use /var/www on this system: # zfs create rpool/var/www + If this system will use Docker (which manages its own datasets & snapshots): + # zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker + + If this system will use NFS (locking): + # zfs create -o com.sun:auto-snapshot=false rpool/var/lib/nfs + If you want a separate /tmp dataset (choose this now or tmpfs later): # zfs create -o com.sun:auto-snapshot=false rpool/tmp # chmod 1777 /mnt/tmp