Mastering the foundations of ZFS on FreeBSD: the pool and vdev concepts, creating a pool with zpool create, and datasets and properties such as compression, dedup, and checksum. You will also learn about snapshots, rollback, clones, zfs send/receive for replication, and boot environments with bectl.

In the previous episode 7, you understood FreeBSD filesystems and how to mount them. Now we get to one of the biggest reasons people choose FreeBSD: ZFS. Combining a volume manager and a filesystem into a single layer, ZFS changes the way you think about data.
ZFS is not just a filesystem — it's a data management system with end-to-end checksums, instant snapshots, built-in compression, and multi-disk pooling. This episode builds the foundation: pools, vdevs, datasets, properties, then snapshots, clones, replication, and boot environments.
A pool is a collection of storage space from one or more disks managed by ZFS. You create a pool with zpool create:
zpool create tank /dev/ada1
zpool statusThe pool named tank above is the classic example. Pool names are free-form, but choose something descriptive and short.
Inside a pool, storage is organized into vdevs (virtual devices). The vdev type determines how data is distributed:
zpool create tank mirror /dev/ada1 /dev/ada2A mirror is a great starting point for both learning and small-scale production. RAID-Z2 suits large capacities with tolerance for two failed disks.
Warning
The vdev structure can't be changed after the pool is created — vdevs can only be added, never removed or converted to another type. Decide carefully from the start, because adding a vdev to an existing pool does not increase the pool's overall redundancy.
A dataset is a logical unit inside a pool that can be mounted, given properties, and snapshotted. Datasets are created with zfs create:
zfs create tank/data
zfs create tank/data/www
zfs listDatasets form a hierarchy like directories — tank/data/www is a child of tank/data. Each dataset can have its own properties and snapshots.
Properties are parameters that control the behavior of a dataset or pool.
ZFS compression saves space with minimal overhead:
zfs set compression=lz4 tank/data
zfs get compression tank/datalz4 is the modern choice: fast and efficient. For highly compressible data, zstd (episode 9) offers a better ratio.
ZFS checksums are on by default and need no activation — every data block is verified on read. Dedup is different: this feature stores a single copy of identical blocks, very space-efficient but memory-hungry:
zfs get checksum tank
zfs get dedup tankInfo
ZFS dedup works per block, not per file, so the savings are real. However, dedup requires large amounts of memory (DRAM or SSD L2ARC) — for most systems, lz4 compression already delivers nearly the same results with far less risk.
Some properties you'll adjust often:
zfs get mountpoint,atime,recordsize tank/dataatime=off reduces writes on read access, recordsize controls the block size (covered in episode 18), and mountpoint determines where the dataset is mounted.
A snapshot is an instant image of a dataset at a point in time, without copying data:
zfs snapshot tank/data@before-upgrade
zfs list -t snapshotSnapshots are the cheapest way to create recovery points. They're created instantly and take almost no space until data changes.
To return to a snapshot state:
zfs rollback tank/data@before-upgradezfs rollback discards all changes made after the snapshot. Snapshots newer than the target are deleted, so use it with care.
A clone is a new dataset starting from a snapshot, sharing data blocks with its source:
zfs clone tank/data@before-upgrade tank/dev
zfs listClones are very useful for development environments — creating an instant copy without duplicating data.
Snapshots can be sent to another machine for backup or replication:
zfs send tank/data@before-upgrade | ssh backup-host zfs receive backup/dataIncremental replication is done by sending only the difference between two snapshots (details in episode 9). This is the foundation of reliable disaster recovery.
Boot environments are a feature that makes FreeBSD + ZFS extremely powerful for updates. Every boot environment is a snapshot of the root system that can be booted. If an update fails, you simply boot into the old environment.
bectl list
bectl create sebelum-update
bectl activate sebelum-updateSuccess
Before running freebsd-update or a major upgrade, create a boot environment first with bectl create. If something goes wrong, reboot and select the old environment from the boot menu — your system returns to normal without drama.
A few habits that keep your pool healthy:
zpool scrub periodically (episode 9).zpool status regularly.zpool status
zfs list
bectl listIn this episode 8, you mastered the foundations of ZFS: pools as containers, vdevs for storage organization, datasets as logical units, properties like compression, checksum, and dedup, plus snapshots, rollback, clones, send/receive replication, and boot environments with bectl.
Key takeaways:
zpool create; the vdev structure can't be changed afterward.zfs send/receive enables replication; bectl manages boot environments.In the next episode, episode 9, we'll cover ZFS advanced — dataset encryption with AES-256-GCM, pool maintenance with scrub and clear, monitoring, plus incremental replication and tools like sanoid and syncoid for automated backups.