ZFS pool setup
fsbackup v2.0 stores all snapshots as ZFS datasets. This page covers creating and preparing the ZFS pool before running the installer.
Pool topology
Mirrored pool (recommended for 2 disks)
A mirrored vdev keeps both disks in sync at all times. A single disk failure is fully survivable — replace the failed disk and ZFS resilvers automatically.
sudo zpool create -o ashift=12 backup mirror /dev/sdc /dev/sdf
Replace /dev/sdc and /dev/sdf with your actual disk device paths. Use lsblk or ls -l /dev/disk/by-id/ to identify them.
Single disk
If you only have one disk, create a non-redundant pool. There is no protection against disk failure.
sudo zpool create -o ashift=12 backup /dev/sdc
RAIDZ (3+ disks)
For three or more disks, RAIDZ1 provides single-disk fault tolerance with more capacity than a mirror:
sudo zpool create -o ashift=12 backup raidz /dev/sdc /dev/sdf /dev/sdg
Create the snapshots dataset
sudo zfs create backup/snapshots
fsbackup stores all per-target datasets under backup/snapshots/<class>/<target>.
Verify the pool
zpool status backup
zfs list -r backup
You should see the pool healthy and the backup/snapshots dataset listed.
ashift=12
ashift=12 sets the pool's sector size to 4 KB, which is correct for virtually all modern drives (including drives that report 512-byte sectors but use 4K internally — common on WD Red, Seagate IronWolf, etc.). This has no downside and avoids significant write amplification on misaligned pools.
ZFS delegation
The installer runs zfs allow to grant the fsbackup user permission to create, snapshot, and destroy datasets without root:
sudo zfs allow fsbackup create,snapshot,mount,destroy backup/snapshots
sudo chown -R fsbackup:fsbackup /backup/snapshots
If you create the pool after running the installer, run these commands manually.
Verifying ZFS block devices
Use disk-by-id paths to identify disks reliably:
ls -l /dev/disk/by-id/ | grep -v part
Prefer /dev/disk/by-id/... paths over /dev/sdX when creating pools — device letters can change across reboots.
Checking pool health
zpool status -v backup
Run a manual scrub to verify data integrity:
sudo zpool scrub backup
fsbackup schedules an automatic monthly scrub via fsbackup-scrub.timer.