xfs_scrub_all(8)

๐Ÿ“ฆ
version 7.2.1 ยท 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

๐ŸŽ€ xfs_scrub_all(8) ๐ŸŽ€ โ€” NAME โœจ

okay so the manual name is xfs_scrub_all, and its whole job is to scrub all mounted XFS filesystems ๐Ÿ’…

๐ŸŒธ NAME ๐ŸŒธ

xfs_scrub_all - scrub all mounted XFS filesystems โœจ

๐Ÿ’– SYNOPSIS ๐Ÿ’–

xfs_scrub_all [ -hxV ]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay bestie, so xfs_scrub_all tries to read and check all the metadata on every mounted XFS filesystem ๐Ÿซถ the online scrub gets done by the xfs_scrub tool, and you can either run it directly or let systemd kick it off in a restricted way ๐Ÿ”ฅ

here's the lowkey clever part ๐Ÿงš every mounted filesystem gets mapped to its physical storage device, so scrubs can run in parallel as long as no two scrubbers are touching the same device at the same time. no cap, that's giving efficiency ๐Ÿ’œ

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • --auto-media-scan-interval โ€” automatically turns on the file data scan (aka the -x flag) if it hasn't run within the interval you give it ๐ŸŒˆ the interval can be a floating point number with an optional unit suffix. the units you can use are y, q, mo, w, d, h, m, and s, which mean years, 90-day quarters, 30-day months, weeks, days, hours, minutes, and seconds, in that order ๐Ÿ“ if you don't specify a unit, it defaults to seconds
  • --auto-media-scan-stamp โ€” the path to a file that records the last time the media scan ran ๐Ÿ“ it defaults to /var/lib/xfsprogs/xfs_scrub_all_media.stamp
  • -h โ€” displays help ๐Ÿ’โ€โ™€๏ธ
  • -x โ€” reads all file data extents to look for disk errors ๐Ÿ”
  • -V โ€” prints the version number and exits ๐Ÿซง

๐ŸŒˆ EXIT CODE ๐ŸŒˆ

okay so the exit code xfs_scrub_all returns is the sum of the following conditions, so you can decode what went wrong by adding up the numbers ๐Ÿงฎ

  • 0 โ€” no errors ๐Ÿฅฐ
  • 4 โ€” file system errors left uncorrected ๐Ÿ˜ญ
  • 8 โ€” operational error ๐Ÿ’€
  • 16 โ€” usage or syntax error ๐Ÿ™ˆ

these are the same error codes that xfs_scrub returns too โœจ

๐Ÿงš SEE ALSO ๐Ÿงš

xfs_scrub(8).


bestie, that's the whole page ๐Ÿซถ this was the xfsprogs manual, from the xfs_scrub_all(8) page of the System Manager's Manual ๐Ÿ’–๐Ÿฆ‹ slay forever ๐Ÿ’…โœจ