diff --git a/docs/Getting Started/Debian/Debian Bullseye Root on ZFS.rst b/docs/Getting Started/Debian/Debian Bullseye Root on ZFS.rst index b38b3cc..45da65c 100644 --- a/docs/Getting Started/Debian/Debian Bullseye Root on ZFS.rst +++ b/docs/Getting Started/Debian/Debian Bullseye Root on ZFS.rst @@ -439,70 +439,58 @@ Step 3: System Installation #. Create datasets:: - zfs create rpool/home - zfs create -o mountpoint=/root rpool/home/root + zfs create rpool/home + zfs create -o mountpoint=/root rpool/home/root chmod 700 /mnt/root - zfs create -o canmount=off rpool/var - zfs create -o canmount=off rpool/var/lib - zfs create rpool/var/log - zfs create rpool/var/spool + zfs create -o canmount=off rpool/var + zfs create -o canmount=off rpool/var/lib + zfs create rpool/var/log + zfs create rpool/var/spool The datasets below are optional, depending on your preferences and/or software choices. - If you wish to exclude these from snapshots:: + If you wish to separate these to exclude them from snapshots:: - zfs create -o com.sun:auto-snapshot=false rpool/var/cache - zfs create -o com.sun:auto-snapshot=false rpool/var/tmp + zfs create -o com.sun:auto-snapshot=false rpool/var/cache + zfs create -o com.sun:auto-snapshot=false rpool/var/lib/nfs + zfs create -o com.sun:auto-snapshot=false rpool/var/tmp chmod 1777 /mnt/var/tmp - If you use /opt on this system:: - - zfs create rpool/opt - If you use /srv on this system:: - zfs create rpool/srv + zfs create rpool/srv If you use /usr/local on this system:: - zfs create -o canmount=off rpool/usr - zfs create rpool/usr/local + zfs create -o canmount=off rpool/usr + zfs create rpool/usr/local If this system will have games installed:: - zfs create rpool/var/games + zfs create rpool/var/games - If this system will store local email in /var/mail:: + If this system will have a GUI:: - zfs create rpool/var/mail - - 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 GNOME:: - - zfs create rpool/var/lib/AccountsService + zfs create rpool/var/lib/AccountsService + zfs create rpool/var/lib/NetworkManager If this system will use Docker (which manages its own datasets & snapshots):: - zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker + zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker - If this system will use NFS (locking):: + If this system will store local email in /var/mail:: - zfs create -o com.sun:auto-snapshot=false rpool/var/lib/nfs + zfs create rpool/var/mail - Mount a tmpfs at /run:: + If this system will use Snap packages:: - mkdir /mnt/run - mount -t tmpfs tmpfs /mnt/run - mkdir /mnt/run/lock + zfs create rpool/var/snap + + If you use /var/www on this system:: + + zfs create rpool/var/www A tmpfs is recommended later, but if you want a separate dataset for ``/tmp``:: @@ -521,6 +509,12 @@ Step 3: System Installation to limit the maximum space used. Otherwise, you can use a tmpfs (RAM filesystem) later. +#. Mount a tmpfs at /run:: + + mkdir /mnt/run + mount -t tmpfs tmpfs /mnt/run + mkdir /mnt/run/lock + #. Install the minimal system:: debootstrap bullseye /mnt diff --git a/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS for Raspberry Pi.rst b/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS for Raspberry Pi.rst index 3e0b3fa..624f8bb 100644 --- a/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS for Raspberry Pi.rst +++ b/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS for Raspberry Pi.rst @@ -486,32 +486,77 @@ Step 3: System Installation #. Create datasets:: - zfs create -o com.ubuntu.zsys:bootfs=no \ - rpool/ROOT/ubuntu_$UUID/srv zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \ rpool/ROOT/ubuntu_$UUID/usr - zfs create rpool/ROOT/ubuntu_$UUID/usr/local zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \ rpool/ROOT/ubuntu_$UUID/var - zfs create rpool/ROOT/ubuntu_$UUID/var/games zfs create rpool/ROOT/ubuntu_$UUID/var/lib - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager zfs create rpool/ROOT/ubuntu_$UUID/var/log - zfs create rpool/ROOT/ubuntu_$UUID/var/mail - zfs create rpool/ROOT/ubuntu_$UUID/var/snap zfs create rpool/ROOT/ubuntu_$UUID/var/spool - zfs create rpool/ROOT/ubuntu_$UUID/var/www zfs create -o canmount=off -o mountpoint=/ \ rpool/USERDATA zfs create -o com.ubuntu.zsys:bootfs-datasets=rpool/ROOT/ubuntu_$UUID \ -o canmount=on -o mountpoint=/root \ rpool/USERDATA/root_$UUID + chmod 700 /mnt/root - If you want a separate dataset for ``/tmp``:: + The datasets below are optional, depending on your preferences and/or + software choices. + + If you wish to separate these to exclude them from snapshots:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/cache + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/nfs + zfs create rpool/ROOT/ubuntu_$UUID/var/tmp + chmod 1777 /mnt/var/tmp + + If desired (the Ubuntu installer creates these):: + + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg + + If you use /srv on this system:: + + zfs create -o com.ubuntu.zsys:bootfs=no \ + rpool/ROOT/ubuntu_$UUID/srv + + If you use /usr/local on this system:: + + zfs create rpool/ROOT/ubuntu_$UUID/usr/local + + If this system will have games installed:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/games + + If this system will have a GUI:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager + + If this system will use Docker (which manages its own datasets & + snapshots):: + + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/docker + + If this system will store local email in /var/mail:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/mail + + If this system will use Snap packages:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/snap + + If you use /var/www on this system:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/www + + For a mirror or raidz topology, create a dataset for ``/boot/grub``:: + + zfs create -o com.ubuntu.zsys:bootfs=no bpool/grub + + A tmpfs is recommended later, but if you want a separate dataset for + ``/tmp``:: zfs create -o com.ubuntu.zsys:bootfs=no \ rpool/ROOT/ubuntu_$UUID/tmp diff --git a/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS.rst b/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS.rst index 6c667fa..9aa8716 100644 --- a/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS.rst +++ b/docs/Getting Started/Ubuntu/Ubuntu 22.04 Root on ZFS.rst @@ -480,24 +480,13 @@ Step 3: System Installation #. Create datasets:: - zfs create -o com.ubuntu.zsys:bootfs=no \ - rpool/ROOT/ubuntu_$UUID/srv zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \ rpool/ROOT/ubuntu_$UUID/usr - zfs create rpool/ROOT/ubuntu_$UUID/usr/local zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \ rpool/ROOT/ubuntu_$UUID/var - zfs create rpool/ROOT/ubuntu_$UUID/var/games zfs create rpool/ROOT/ubuntu_$UUID/var/lib - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg - zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager zfs create rpool/ROOT/ubuntu_$UUID/var/log - zfs create rpool/ROOT/ubuntu_$UUID/var/mail - zfs create rpool/ROOT/ubuntu_$UUID/var/snap zfs create rpool/ROOT/ubuntu_$UUID/var/spool - zfs create rpool/ROOT/ubuntu_$UUID/var/www zfs create -o canmount=off -o mountpoint=/ \ rpool/USERDATA @@ -506,16 +495,60 @@ Step 3: System Installation rpool/USERDATA/root_$UUID chmod 700 /mnt/root + The datasets below are optional, depending on your preferences and/or + software choices. + + If you wish to separate these to exclude them from snapshots:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/cache + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/nfs + zfs create rpool/ROOT/ubuntu_$UUID/var/tmp + chmod 1777 /mnt/var/tmp + + If desired (the Ubuntu installer creates these):: + + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg + + If you use /srv on this system:: + + zfs create -o com.ubuntu.zsys:bootfs=no \ + rpool/ROOT/ubuntu_$UUID/srv + + If you use /usr/local on this system:: + + zfs create rpool/ROOT/ubuntu_$UUID/usr/local + + If this system will have games installed:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/games + + If this system will have a GUI:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager + + If this system will use Docker (which manages its own datasets & + snapshots):: + + zfs create rpool/ROOT/ubuntu_$UUID/var/lib/docker + + If this system will store local email in /var/mail:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/mail + + If this system will use Snap packages:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/snap + + If you use /var/www on this system:: + + zfs create rpool/ROOT/ubuntu_$UUID/var/www + For a mirror or raidz topology, create a dataset for ``/boot/grub``:: zfs create -o com.ubuntu.zsys:bootfs=no bpool/grub - Mount a tmpfs at /run:: - - mkdir /mnt/run - mount -t tmpfs tmpfs /mnt/run - mkdir /mnt/run/lock - A tmpfs is recommended later, but if you want a separate dataset for ``/tmp``:: @@ -534,6 +567,12 @@ Step 3: System Installation to limit the maximum space used. Otherwise, you can use a tmpfs (RAM filesystem) later. +#. Mount a tmpfs at /run:: + + mkdir /mnt/run + mount -t tmpfs tmpfs /mnt/run + mkdir /mnt/run/lock + #. Install the minimal system:: debootstrap jammy /mnt