Example desktop filesys layout

Howdy, I’ve heard that it’s not a great idea to stick everything in a single pool. Also, I once did a trial install of Ubuntu back when ZFS was an option and I seem to remember it created a thousand pools.

I’ve looked around, but haven’t seen this type of elementary topic documented. Does anyone have any links handy?

First, some terminology—and I found this very confusing when I started with ZFS. The pool is made up of vdevs (the physical grouping of disks) and it houses datasets of various types. So substitute ‘dataset’ in place of ‘pool’ in your question.

Basically, you want a separate dataset for any boundary where you need different properties (like maybe you want some parts encrypted or a different block size for database storage or you want to take backups on a different schedule). For a desktop machine, I think the most important thing is to have the /home directory and all of its subdirectories be separate datasets. That would make it trivial to keep really frequent backups of your user’s data without storing the whole operating system.

One great place to get a perspective on desktop-focused dataset structure would be the zfsbootmenu guide: Debian (UEFI) — ZFSBootMenu 3.0.1 documentation

That early zsys setup was a nightmare. Just because you can create a dataset for every little thing doesn’t mean you should do it …

I’ve found simple partitioning works well

  • pool/ROOT : container for root filesystems
  • pool/ROOT/noble : root filesystem for Ubuntu 24.04/noble
  • pool/home : container for home dirs
  • pool/home/root : root home dir
  • pool/home/alice : user home dir
  • pool/docker : for docker mounted at /var/lib/docker
  • pool/virtualbox : for Virtualbox VMs - mounted at /Virtualbox and usually with a symlink in ~/Virtualbox for me

etc.

Understood. Thanks.

I get the picture now. Thanks.

A few months ago, I used the installer for Ubuntu 25.04 (as a basis for my Kubuntu with root-on-OpenZFS). Here’s the filesystems layout of the two pools that were produced by the installer:

grahamperrin@mowa219-gjp4 ~> zfs list -t fs -o name,mountpoint,canmount -r bpool
NAME                      MOUNTPOINT  CANMOUNT
bpool                     /boot       off
bpool/BOOT                none        off
bpool/BOOT/ubuntu_v0hpws  /boot       on
grahamperrin@mowa219-gjp4 ~> zfs list -t fs -o name,mountpoint,canmount -r rpool
NAME                                              MOUNTPOINT                CANMOUNT
rpool                                             /                         off
rpool/ROOT                                        none                      off
rpool/ROOT/ubuntu_v0hpws                          /                         on
rpool/ROOT/ubuntu_v0hpws/srv                      /srv                      on
rpool/ROOT/ubuntu_v0hpws/usr                      /usr                      off
rpool/ROOT/ubuntu_v0hpws/usr/local                /usr/local                on
rpool/ROOT/ubuntu_v0hpws/var                      /var                      off
rpool/ROOT/ubuntu_v0hpws/var/games                /var/games                on
rpool/ROOT/ubuntu_v0hpws/var/lib                  /var/lib                  on
rpool/ROOT/ubuntu_v0hpws/var/lib/AccountsService  /var/lib/AccountsService  on
rpool/ROOT/ubuntu_v0hpws/var/lib/NetworkManager   /var/lib/NetworkManager   on
rpool/ROOT/ubuntu_v0hpws/var/lib/apt              /var/lib/apt              on
rpool/ROOT/ubuntu_v0hpws/var/lib/dpkg             /var/lib/dpkg             on
rpool/ROOT/ubuntu_v0hpws/var/log                  /var/log                  on
rpool/ROOT/ubuntu_v0hpws/var/mail                 /var/mail                 on
rpool/ROOT/ubuntu_v0hpws/var/snap                 /var/snap                 on
rpool/ROOT/ubuntu_v0hpws/var/spool                /var/spool                on
rpool/ROOT/ubuntu_v0hpws/var/www                  /var/www                  on
rpool/USERDATA                                    none                      off
rpool/USERDATA/home_dz7uxs                        /home                     on
rpool/USERDATA/root_dz7uxs                        /root                     on
rpool/var                                         /var                      off
rpool/var/lib                                     /var/lib                  off
rpool/var/lib/docker                              /var/lib/docker           on
grahamperrin@mowa219-gjp4 ~>