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
commit857a92991db30f538ea8858a2dfda0fe606353e3 (patch)
treedcf97aa3a41925c05670bb640cdd495fc1083f72 /scrub/e2scrub.in
parentAdding debian version 1.47.0-2.4. (diff)
downloade2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.tar.xz
e2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.zip
Merging upstream version 1.47.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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}"