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