| 1 |
.TH E2SCRUB 8 "March 2025" "E2fsprogs version 1.47.4" |
| 2 |
.SH NAME |
| 3 |
e2scrub - check the contents of a mounted ext[234] file system |
| 4 |
.SH SYNOPSIS |
| 5 |
.B |
| 6 |
e2scrub [OPTION] MOUNTPOINT | DEVICE |
| 7 |
.SH DESCRIPTION |
| 8 |
.B e2scrub |
| 9 |
attempts to check (but not repair) all metadata in a mounted ext[234] |
| 10 |
file system if the file system resides on an LVM logical volume. |
| 11 |
The block device of the LVM logical volume can also be passed in. |
| 12 |
|
| 13 |
This program snapshots the volume and runs a file system check on the snapshot |
| 14 |
to look for corruption errors. |
| 15 |
The LVM volume group must have at least 256MiB of unallocated space to |
| 16 |
dedicate to the snapshot or the logical volume will be skipped. |
| 17 |
The snapshot will be named |
| 18 |
.IR lvname ".e2scrub" |
| 19 |
and |
| 20 |
.B udev |
| 21 |
will not create symbolic links to it under |
| 22 |
.IR /dev/disk . |
| 23 |
Every attempt will be made to remove the snapshots prior to running |
| 24 |
.BR e2scrub , |
| 25 |
but in a dire situation it may be necessary to remove the snapshot manually. |
| 26 |
|
| 27 |
If no errors are found, |
| 28 |
.B fstrim |
| 29 |
can be called on the file system if it is mounted. |
| 30 |
If errors are found, the file system will be marked as having errors. |
| 31 |
The file system should be taken offline and |
| 32 |
.B e2fsck |
| 33 |
run as soon as possible, because |
| 34 |
.B e2scrub |
| 35 |
does not fix corruptions. |
| 36 |
If the file system is not repaired, |
| 37 |
.B e2fsck |
| 38 |
will be run before the next mount. |
| 39 |
.SH OPTIONS |
| 40 |
.TP |
| 41 |
\fB-n\fR |
| 42 |
Print what commands |
| 43 |
.B e2scrub |
| 44 |
would execute to check the file system. (Note: the commands will not |
| 45 |
actually be executed; however, since |
| 46 |
.B e2scrub |
| 47 |
needs to run some commands to query the system to determine what |
| 48 |
commands would be executed, it still needs to be run as root.) |
| 49 |
.TP |
| 50 |
\fB-r\fR |
| 51 |
Remove the e2scrub snapshot and exit without checking anything. |
| 52 |
.TP |
| 53 |
\fB-t\fR |
| 54 |
Run |
| 55 |
.B |
| 56 |
fstrim(1) |
| 57 |
on the mounted file system if no errors are found. |
| 58 |
.TP |
| 59 |
\fB-V\fR |
| 60 |
Print version information and exit. |
| 61 |
.SH EXIT CODE |
| 62 |
The exit codes are the same as in |
| 63 |
.BR e2fsck (8) |
| 64 |
.SH SEE ALSO |
| 65 |
.BR e2fsck (8) |
| 66 |
.SH AUTHOR |
| 67 |
Darrick J. Wong <[email protected]> |
| 68 |
.SH COPYRIGHT |
| 69 |
Copyright \[co]2018 Oracle. License is GPLv2+. <http://www.gnu.org/licenses/gpl-2.0.html> |