Public bug reported:

On a kernel without CONFIG_XFS_ONLINE_SCRUB (all Ubuntu 26.04 kernels,
see LP: #2171359), xfs_scrub_all.service checks nothing but finishes
successfully, and xfs_scrub_all logs err=0 for each filesystem.
xfs_scrub_all.timer is enabled by the package, so this happens every
week without notice. An OnFailure= handler on the unit never runs.

Expected: xfs_scrub_all exits non-zero (or the unit fails) when
xfs_scrub could not check a filesystem, so the failure is visible; or
the timer is not enabled on a kernel that lacks the facility.

Actual, from the journal of the first weekly run (unit names and
messages as logged; the per-filesystem lines repeat for each of three
XFS filesystems):

  systemd[1]: Starting xfs_scrub_all.service - Online XFS Metadata Check for 
All Filesystems...
  xfs_scrub_all[3329763]: Automatically enabling file data scrub.
  xfs_scrub_all[3329763]: Scrubbing /data...
  systemd[1]: Starting [email protected] - Online XFS Metadata and 
Media Check for /data...
  xfs_scrub_media@data[3330639]: Info: /data: Checking per autofsck directive.
  xfs_scrub_media@data[3330639]: Error: /data: Kernel metadata scrubbing 
facility is not available.
  xfs_scrub_media@data[3330639]: Info: /data: Scrub aborted after phase 1.
  xfs_scrub_media@data[3330639]: /data: operational errors found: 1
  systemd[1]: [email protected]: Deactivated successfully.
  xfs_scrub_all[3329763]: /data: Scrubbing done, (err=0)
  systemd[1]: xfs_scrub_all.service: Deactivated successfully.
  systemd[1]: Finished xfs_scrub_all.service - Online XFS Metadata Check for 
All Filesystems.

So xfs_scrub reports "operational errors found: 1", yet the
xfs_scrub_media@ unit deactivates successfully and xfs_scrub_all reports
err=0.

Steps to reproduce:
1. Ubuntu 26.04 with its stock kernel, one mounted XFS v5 filesystem.
2. systemctl start xfs_scrub_all.service
3. systemctl show -p Result xfs_scrub_all.service  ->  Result=success
4. journalctl -u 'xfs_scrub_media@*' shows "Kernel metadata scrubbing facility 
is not available."

Versions:
  Ubuntu 26.04.1 LTS
  xfsprogs 6.18.0-3
  systemd 259.5-0ubuntu3.4
  kernel 7.0.0-31-generic

** Affects: xfsprogs (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: resolute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2171360

Title:
  xfs_scrub_all reports success when the kernel has no online scrub

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2171360/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to