summaryrefslogtreecommitdiffstats
path: root/scrub/e2scrub.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 04:59:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 04:59:33 +0000
commit73193347133e750faf27f88fd3ab31ce43aff062 (patch)
treee28a6d9512d1787b1fcbe9167188c9d134bf51d9 /scrub/e2scrub.in
parentAdding upstream version 1.47.0. (diff)
downloade2fsprogs-73193347133e750faf27f88fd3ab31ce43aff062.tar.xz
e2fsprogs-73193347133e750faf27f88fd3ab31ce43aff062.zip
Adding upstream version 1.47.1.upstream/1.47.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scrub/e2scrub.in')
-rw-r--r--scrub/e2scrub.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/scrub/e2scrub.in b/scrub/e2scrub.in
index 7ed57f2..043bc12 100644
--- a/scrub/e2scrub.in
+++ b/scrub/e2scrub.in
@@ -159,6 +159,13 @@ if [ ! -e "${dev}" ]; then
exitcode 16
fi
+# Do not scrub unjournalled filesystems; they are inconsistent when mounted
+if [ "${reap}" -eq 0 ] && ! dumpe2fs -h "${dev}" | grep -q 'has_journal'; then
+ echo "${arg}: Filesystem has no journal, cannot check."
+ print_help
+ exitcode 16
+fi
+
# Make sure this is an LVM device we can snapshot
lvm_vars="$(lvs --nameprefixes -o name,vgname,lv_role --noheadings "${dev}" 2> /dev/null)"
eval "${lvm_vars}"