Aug 26, 2025 · Linux & Servers / Intermediate · ~2 MIN READ
ZFS for Beginners: Snapshots, Pools, and Data Protection
Understand ZFS terminology, redundant pool layouts, snapshots, and scrubs — without overselling what it actually protects against.
Who This Is For
Intermediate.
Think of it like a photo album with dated pages, you can flip back to how things looked last week. But the album still burns if the house catches fire, so you need a real copy stored somewhere else too.
What You’ll Build
A small ZFS pool with one dataset, one snapshot, and one completed scrub run.
Prerequisites
- A Linux host with at least 2 spare disks (real or virtual) for a pool
Critical Warning First
- RAID is not backup
- Snapshots are not off-site backups, they live on the same pool as the data they protect
Core Terms
- Vdev, a group of disks forming one redundancy unit
- Pool, one or more vdevs combined
- Dataset, a mountable filesystem within a pool
- Snapshot, a read-only point-in-time copy
- Scrub, a full data-integrity check across the pool
- Resilver, rebuilding redundancy after a disk replacement
Choose a Pool Layout
- Stripe, no redundancy, maximum space, any disk failure loses everything
- Mirror, simple redundancy, good performance, 50% capacity overhead
- RAIDZ1, single-disk fault tolerance, good for 3-5 disks
- RAIDZ2, two-disk fault tolerance, better for larger arrays
Create a Pool and Dataset
$ sudo zpool create tank mirror /dev/sda /dev/sdb
$ sudo zfs create tank/backups
$ sudo zfs set compression=lz4 tank/backups
Snapshot and Scrub
$ sudo zfs snapshot tank/backups@2026-07-01
$ sudo zpool scrub tank
$ sudo zpool status tank
Monitor Pool Health
$ sudo zpool status -v
Security & Backup Notes
- Snapshots protect against accidental deletion and ransomware-style overwrite, they do not protect against pool-level hardware failure without redundancy, and they don’t replace off-site backup
Troubleshooting
- Pool imported incorrectly, use
zpool importcarefully, and check disk identifiers match what you expect - No redundant storage, a striped pool with no mirror/RAIDZ has zero fault tolerance
- Running out of space because snapshots retain deleted data, old snapshots keep referencing blocks even after files are deleted; prune old snapshots
- Replacing the wrong disk, always confirm the disk’s serial number matches
zpool statusoutput before pulling anything
Lab Finish Line
A small ZFS pool with one dataset, one snapshot, and one scrub run.