Skip to content

ZFS

Load ZFS, choose writable pool mountpoints, schedule scrubs, and configure snapshots and replication.

The ZFS kernel module and tools are installed in every current uCore image, but ZFS is not configured to load by default. Load it when needed with modprobe zfs. For automatic loading at boot, create the module-load configuration:

shellConfigure ZFS module loading
echo zfs | sudo tee /etc/modules-load.d/zfs.conf

Use a writable mountpoint

The host root filesystem is immutable. A newly created pool named tank defaults to /tank, which cannot be created on the immutable root. Choose a writable location under /var when creating the pool:

shellCreate a pool with a writable mountpoint
sudo zpool create -m /var/tank tank /dev/REPLACE_WITH_DEVICE

For an existing pool with an unsuitable mountpoint, change it explicitly:

shellChange an existing pool mountpoint
sudo zfs set mountpoint=/var/tank tank

Confirm the target device before creating a pool. zpool create changes the selected storage device.

Scrub timers

Regular scrubs check pool data integrity. uCore includes weekly and monthly systemd timers; enable one timer for each pool, substituting the pool’s name:

shellEnable a weekly scrub
sudo systemctl enable --now zfs-scrub-weekly@POOL.timer

For a monthly schedule instead:

shellEnable a monthly scrub
sudo systemctl enable --now zfs-scrub-monthly@POOL.timer

Snapshots and replication with Sanoid/Syncoid

Sanoid and Syncoid are included with ucore. Sanoid has a systemd service and timer, but requires a configuration file at /etc/sanoid/sanoid.conf. Start from the upstream template, then configure the datasets you intend to snapshot. Enable the timer after reviewing the configuration:

shellEnable the Sanoid timer
sudo systemctl enable sanoid.timer

Syncoid replication jobs depend on the backup destination and on SSH credentials. The upstream README shows a pull-style systemd service with an accompanying timer. Treat the following as a template: replace remote host, datasets, user/group IDs, and scheduling after reviewing the Sanoid/Syncoid documentation.

referencesyncoid.service
[Unit]Description=Call syncoid to pull backups from source to target[Service]Type=oneshotUser=1000Group=1000ExecStart=/usr/bin/bash -c "syncoid -r core@<remote_source>:<pool/dataset> local pool/dataset"
referencesyncoid.timer
[Unit]Description=Call syncoid to pull backups from source to target[Timer]OnBootSec=1minOnUnitActiveSec=6h[Install]WantedBy=timers.target

Enable the timer after testing the service manually. Snapshots and replication are not a substitute for independently tested backups.

Source: uCore ZFS guidance, OpenZFS Fedora documentation. Checked September 18, 2026.