Ubuntu/Debian: Add a /var/lib dataset

This makes it cleaner to add datasets under /var/lib.
Richard Laager 2019-03-17 13:44:27 -05:00
parent 760b6c9622
commit 1fc890ed19
2 changed files with 14 additions and 16 deletions

@ -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 mountpoint=/root rpool/home/root
# zfs create -o canmount=off rpool/var # zfs create -o canmount=off rpool/var
# zfs create -o com.sun:auto-snapshot=false rpool/var/cache # 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/log
# zfs create rpool/var/spool # zfs create rpool/var/spool
# zfs create -o com.sun:auto-snapshot=false rpool/var/tmp # 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: If this system will store local email in /var/mail:
# zfs create rpool/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: If this system will use Snap packages:
# zfs create rpool/var/snap # zfs create rpool/var/snap
If you use /var/www on this system: If you use /var/www on this system:
# zfs create rpool/var/www # 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): If you want a separate /tmp dataset (choose this now or tmpfs later):
# zfs create -o com.sun:auto-snapshot=false rpool/tmp # zfs create -o com.sun:auto-snapshot=false rpool/tmp
# chmod 1777 /mnt/tmp # chmod 1777 /mnt/tmp

@ -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 mountpoint=/root rpool/home/root
# zfs create -o canmount=off rpool/var # zfs create -o canmount=off rpool/var
# zfs create -o com.sun:auto-snapshot=false rpool/var/cache # 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/log
# zfs create rpool/var/spool # zfs create rpool/var/spool
# zfs create -o com.sun:auto-snapshot=false rpool/var/tmp # 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: If this system will store local email in /var/mail:
# zfs create rpool/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: If this system will use Snap packages:
# zfs create rpool/var/snap # zfs create rpool/var/snap
If you use /var/www on this system: If you use /var/www on this system:
# zfs create rpool/var/www # 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): If you want a separate /tmp dataset (choose this now or tmpfs later):
# zfs create -o com.sun:auto-snapshot=false rpool/tmp # zfs create -o com.sun:auto-snapshot=false rpool/tmp
# chmod 1777 /mnt/tmp # chmod 1777 /mnt/tmp