#1125314 xfs_scrub_all.service: does not work (report errors in log)

Package:
xfsprogs
Source:
xfsprogs
Description:
Utilities for managing the XFS filesystem
Submitter:
Michael Tokarev
Date:
2026-10-19 15:37:01 UTC
Severity:
normal
#1125314#5
Date:
2026-01-12 12:15:20 UTC
From:
To:
The way how xfs_scrub is run from within xfs_scrib_all script
seems to be wrong.  Here's an example log output from xfs_scrub_all.service:

Dec 21 03:10:41 host systemd[1]: Starting xfs_scrub_all.service - Online XFS Metadata Check for All Filesystems>
Dec 21 03:10:41 host xfs_scrub_all[174771]: Automatically enabling file data scrub.
Dec 21 03:10:41 host xfs_scrub_all[174771]: Scrubbing /fs1...
Dec 21 03:10:41 host xfs_scrub_all[174771]: Scrubbing /fs2...
Dec 21 03:10:41 host xfs_scrub_all[174779]: EXPERIMENTAL xfs_scrub program in use! Use at your own risk!
Dec 21 03:10:41 host xfs_scrub_all[174780]: EXPERIMENTAL xfs_scrub program in use! Use at your own risk!
Dec 21 03:10:41 host xfs_scrub_all[174779]: Cannot use -p with -n.
Dec 21 03:10:41 host xfs_scrub_all[174779]: Usage: xfs_scrub [OPTIONS] mountpoint
Dec 21 03:10:41 host xfs_scrub_all[174779]: Options:
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -a count     Stop after this many errors are found.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -b           Background mode.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -C fd        Print progress information to this fd.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -e behavior  What to do if errors are found.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -k           Do not FITRIM the free space.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -m path      Path to /etc/mtab.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -n           Dry run.  Do not modify anything.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -p           Only optimize, do not fix corruptions.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -T           Display timing/usage information.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -v           Verbose output.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -V           Print version.
Dec 21 03:10:41 host xfs_scrub_all[174779]:   -x           Scrub file data too.
Dec 21 03:10:41 host xfs_scrub_all[174780]: Cannot use -p with -n.
Dec 21 03:10:41 host xfs_scrub_all[174780]: Usage: xfs_scrub [OPTIONS] mountpoint
Dec 21 03:10:41 host xfs_scrub_all[174780]: Options:
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -a count     Stop after this many errors are found.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -b           Background mode.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -C fd        Print progress information to this fd.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -e behavior  What to do if errors are found.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -k           Do not FITRIM the free space.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -m path      Path to /etc/mtab.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -n           Dry run.  Do not modify anything.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -p           Only optimize, do not fix corruptions.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -T           Display timing/usage information.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -v           Verbose output.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -V           Print version.
Dec 21 03:10:41 host xfs_scrub_all[174780]:   -x           Scrub file data too.
Dec 21 03:10:41 host xfs_scrub_all[174771]: Scrubbing /fs1 done, (err=8)
Dec 21 03:10:41 host xfs_scrub_all[174771]: Scrubbing /fs2 done, (err=8)

So actually scrubbing isn't done, instead, the service tries to report
error and fails due to #1116595.

It'd be nice if scribbing is actually happening.

Thanks,

/mjt

#1125314#10
Date:
2026-10-13 20:22:10 UTC
From:
To:
I am seeing the same thing on trixie.

Additionally, if I try running xfs_scrub_all manually, it simply fails with:

Error: /fs1: Kernel metadata scrubbing facility is not available.

Suggesting that the kernel that Debian ships cannot use this anyway.

Indeed:

$ grep XFS.*SCRUB /boot/config-6.12.111+deb13-amd64
# CONFIG_XFS_ONLINE_SCRUB is not set

#1125314#15
Date:
2026-10-19 15:36:14 UTC
From:
To:
I did more investigating, since this was only happening on one of my
servers.

Looking at the code for xfs_scrub_all, it's clear that it interacts with
systemd via dbus.

Upon updating to trixie, I normally install libpam-systemd so that the
old "w" command works. This pulls in dbus. I failed to do this on one
server.

After installing libpam-systemd and then doing a reboot or simply
"systemctl start dbus", you will find that xfs_scrub_all starts working
correctly.