Schedule ZFS Scrubs on Rocky Linux 10

Infrastructure

By Jennifer Webb

Updated on Aug 24, 2026

Schedule ZFS Scrubs on Rocky Linux 10

Learn how to schedule ZFS scrubs on Rocky Linux 10, verify the timer, and confirm scrub execution for reliable storage maintenance.

Introduction

This tutorial shows how to schedule ZFS scrubs on Rocky Linux 10 for a dedicated server, then verify that the timer or cron job runs and that scrub activity is reported correctly.

You will confirm the target pool name, create or adjust the automated schedule, start a manual scrub for validation, and check the resulting status and logs.

Prerequisites

  • Rocky Linux 10 installed on the dedicated server
  • Root access or a normal administrative user with sudo privileges
  • Installed and configured ZFS utilities
  • Network access if package installation or repository access is required
  • The target ZFS pool name identified before scheduling

Verify ZFS pool and current status

Start by confirming the exact pool name you want to schedule. This avoids attaching the scrub timer or cron entry to the wrong storage pool.

sudo zpool status

Review the output for the pool name, health state, and any existing scrub activity. Keep the pool name available for the remaining steps; the examples below use poolname.

Create a scheduled scrub using systemd timer

On systems that use the built-in ZFS scrub timer template, inspect the existing timer unit before making changes.

sudo systemctl cat [email protected]

If you need to adjust the timer schedule for your environment, edit the full unit so the change is explicit and persistent.

sudo systemctl edit --full [email protected]

After confirming the timer definition, enable the instance for your pool and start it immediately.

sudo systemctl enable --now [email protected]

This creates the automated scrub schedule for the selected pool on the dedicated server.

Alternative: schedule with cron if required by the environment

If your environment requires cron instead of the systemd timer, edit the root crontab and add the scrub command on the schedule you want.

sudo crontab -e

Add the appropriate zpool scrub entry for the selected pool, then save the file. Use only the schedule your environment requires.

Verify the schedule and test execution

First, confirm that the timer is enabled and has a next run time.

sudo systemctl list-timers

Look for the [email protected] entry and verify that the next run column is populated.

Next, test a manual scrub to confirm the pool accepts the operation.

sudo zpool scrub poolname

Check live status to confirm that the scrub starts or completes without errors.

sudo zpool status poolname

If you enabled the systemd timer, you can also start the associated service directly and inspect its status.

sudo systemctl start [email protected]
sudo systemctl status [email protected]

Review the journal to confirm the scrub service ran at the expected time.

sudo journalctl -u [email protected]

If you used cron instead, confirm the root crontab contains the expected entry.

sudo crontab -l

Troubleshooting

If the timer does not appear in systemctl list-timers, confirm that the timer instance name matches the exact pool name and that the unit was enabled successfully.

If zpool scrub poolname fails, re-check the pool name from sudo zpool status and make sure the pool is imported and healthy enough to accept a scrub.

If the service status shows an error, inspect the journal output for the failing unit and look for permission issues, missing pool names, or ZFS command failures.

If cron is used and no scrub occurs, confirm the crontab entry was saved in the root crontab and that the command references the correct pool name.

Rollback

If you need to undo the scheduled scrub, disable the systemd timer instance for the pool or remove the cron entry that was added for it.

After rollback, verify that the timer no longer appears in the active schedule and that no cron line remains for the scrub job.

Conclusion

You have scheduled ZFS scrubs on Rocky Linux 10 for a dedicated server, verified the timer or cron-based schedule, and confirmed that scrub execution is visible in pool status and logs.

After completing this procedure, you can verify the next scrub run, observe manual scrub progress, and confirm the pool reports a completed or in-progress scrub without unexpected errors.