E2SCRUB(8)
๐ e2scrub โ the manual, but make it cute
okay bestie, so this is e2scrub from the System Manager's Manual, and it's literally here to check your mounted ext[234] file system's vibe without touching the actual contents. no cap.
โจ NAME โจ
e2scrub โ check the contents of a mounted ext[234] file system ๐ฆ
๐ธ SYNOPSIS ๐ธ
e2scrub [OPTION] MOUNTPOINT | DEVICE
so you're giving it either a mountpoint or a device, plus maybe an option. that's it. that's the whole thing. periodt.
๐ DESCRIPTION ๐
so like, e2scrub attempts to check (but not repair) all the metadata in a mounted ext[234] file system โ but only if that file system lives on an LVM logical volume. you can also just hand it the block device of the LVM logical volume directly, bestie, it's flexible like that. ๐โโ๏ธ
the way this works is iconic: it snapshots the volume and runs a file system check on the snapshot to hunt down corruption errors. but โ and this is the tea โ the LVM volume group must have at least 256MiB of unallocated space to dedicate to the snapshot, or the logical volume just gets skipped. no space, no scrub, sorry babe. ๐ญ
the snapshot gets named lvname.e2scrub, and heads up: udev will not create symbolic links to it under /dev/disk. every attempt is made to remove the snapshots before running e2scrub, but in a dire situation it might be necessary to remove the snapshot manually. yikes. ๐
if no errors are found, fstrim can be called on the file system โ but only if it's mounted. if errors are found, the file system gets marked as having errors. and bestie, listen: you should take the file system offline and run e2fsck as soon as possible, because e2scrub does not fix corruptions. it's a detective, not a surgeon. ๐ต๏ธโโ๏ธ if the file system isn't repaired, e2fsck will be run before the next mount. fr fr.
โจ OPTIONS โจ
-nโ print what commandse2scrubwould execute to check the file system. so it's giving preview mode. โจ (Note: the commands will not actually be executed; however, sincee2scrubneeds to run some commands to query the system to determine what commands would be executed, it still needs to be run as root. so like, root either way, bestie. ๐)-rโ remove thee2scrubsnapshot and exit without checking anything. it's the "never mind, we're leaving" option. ๐ช-tโ runfstrim(1)on the mounted file system if no errors are found. little treat for a clean bill of health. ๐-Vโ print version information and exit. the classic. ๐
๐ EXIT CODE ๐
the exit codes are the same as in e2fsck(8). so if you know those, you already know these. iykyk. ๐
๐ฆ SEE ALSO ๐ฆ
๐ AUTHOR ๐
Darrick J. Wong <darrick.wong@oracle.com> โ thank you for your service, king ๐ซถ
๐ COPYRIGHT ๐
Copyright ยฉ2018 Oracle. License is GPLv2+.
<http://www.gnu.org/licenses/gpl-2.0.html>
E2fsprogs version 1.47.4 โ March 2025 โ and that's the whole E2SCRUB(8) page, bestie. go check those file systems, stay root, and don't forget to repair with e2fsck before the next mount. slay. ๐
โจ
๐ฆ where this page comes from
- alpine 3.24: e2fsprogs-doc 1.47.4-r0 ยท GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT
- arch rolling: e2fsprogs 1.47.4-1 ยท GPL AND LGPL AND MIT
- nixpkgs unstable: e2fsprogs 1.47.4
- ubuntu stonking: e2fsprogs 1.47.4-1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms