* xfs_scrub_all.service
@ 2025-04-17 9:35 David White
2025-04-17 15:00 ` xfs_scrub_all.service Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: David White @ 2025-04-17 9:35 UTC (permalink / raw)
To: linux-xfs
Hi there,
I'm on Ubuntu 24.10 which has a secondary mount xfs filesystem.
I have installed xfsprogs. Which installs a /usr/sbin/xfs_scrub_all
python script, and a systemd service and timer to run it. xfsprogs
version 6.8.0 (same on 6.9.0 built from source too)
However, looking at the code for xfs_scrub_all, it's broken. It fails
on a non-existent "debug" global, and the run_scrub thread target has
a call to path_to_serviceunit with a "path" parameter that doesn't
exist. (I'm assuming this is supposed to be "mnt")
I've disabled this service, (and the timer that runs it) and added it
to my system presets for future installs not to enable this unit.
What is going on here? What is the purpose?
Thanks,
David.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: xfs_scrub_all.service
2025-04-17 9:35 xfs_scrub_all.service David White
@ 2025-04-17 15:00 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2025-04-17 15:00 UTC (permalink / raw)
To: David White; +Cc: linux-xfs
On Thu, Apr 17, 2025 at 10:35:58AM +0100, David White wrote:
> Hi there,
>
> I'm on Ubuntu 24.10 which has a secondary mount xfs filesystem.
>
> I have installed xfsprogs. Which installs a /usr/sbin/xfs_scrub_all
> python script, and a systemd service and timer to run it. xfsprogs
> version 6.8.0 (same on 6.9.0 built from source too)
>
> However, looking at the code for xfs_scrub_all, it's broken. It fails
> on a non-existent "debug" global, and the run_scrub thread target has
> a call to path_to_serviceunit with a "path" parameter that doesn't
> exist. (I'm assuming this is supposed to be "mnt")
Yes, and both bugs were fixed in 6.10.
> I've disabled this service, (and the timer that runs it) and added it
> to my system presets for future installs not to enable this unit.
>
> What is going on here? What is the purpose?
xfs_scrub_all schedules xfs_scrub@ services to run background online
fsck of mounted XFS filesystems. That said, xfs_scrub_all before
xfsprogs 6.10 has some of serious bugs in it (as you note!). Back in
the 6.8 days days the kernel portion was not yet complete, and the
userspace part didn't fully catch up until late last year.
The strange part is that none of that stuff should be active in the
xfsprogs 6.8 package for Debian or Ubuntu, unless I seriously
misunderstand what this line in debian/rules does:
dh_installsystemd -p xfsprogs --no-enable --no-start --no-restart-after-upgrade --no-stop-on-upgrade
which (AFAIK) installs the units but does not enable or start any of
them. But I'm guessing it got activated on your system anyway? From
the postinst script of the package in question:
https://mirrors.edge.kernel.org/ubuntu/pool/main/x/xfsprogs/xfsprogs_6.8.0-2.2ubuntu1_amd64.deb
# Automatically added by dh_installsystemd/13.18ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if deb-systemd-helper debian-installed 'xfs_scrub_all.timer'; then
# The following line should be removed in trixie or trixie+1
deb-systemd-helper unmask 'xfs_scrub_all.timer' >/dev/null || true
if deb-systemd-helper --quiet was-enabled 'xfs_scrub_all.timer'; then
# Create new symlinks, if any.
deb-systemd-helper enable 'xfs_scrub_all.timer' >/dev/null || true
fi
fi
# Update the statefile to add new symlinks (if any), which need to be cleaned
# up on purge. Also remove old symlinks.
deb-systemd-helper update-state 'xfs_scrub_all.timer' >/dev/null || true
fi
From my reading, this only enables the timer (but doesn't start it!) if
the debian system helper thought it was already enabled.
On a newer 6.13 package, the --no-enable and --no-start flags are gone,
so postinst gets a new block:
# Automatically added by dh_installsystemd/13.11.4
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
deb-systemd-invoke start 'system-xfs_healer.slice' 'system-xfs_scrub.slice' 'xfs_scrub_all.timer' >/dev/null || true
fi
fi
which actually starts it. But this shouldn't have been started up on
your system.
<confused>
--D
> Thanks,
>
> David.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-17 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 9:35 xfs_scrub_all.service David White
2025-04-17 15:00 ` xfs_scrub_all.service Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox