summaryrefslogtreecommitdiffstats
path: root/scrub/e2scrub.in
diff options
context:
space:
mode:
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}"