LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Are ext4 file system checks disabled by default on 14.0? (https://www.linuxquestions.org/questions/slackware-14/are-ext4-file-system-checks-disabled-by-default-on-14-0-a-4175433189/)

sparkyhall 10-20-2012 04:53 AM

Are ext4 file system checks disabled by default on 14.0?
 
I have installed Slackware 14.0 on three different systems and if I run tune2fs -l /dev/sdx "Maximum mount count" = -1 and "Check interval" = 0. According to man tune2fs this means that both mount count and time based file system checking is disabled, it also gives warnings about disabling these features.

It is easy to fix this using tune2fs but is this correct, a bug or something I have done during install?

Woodsman 10-20-2012 10:38 PM

I suspect you or somebody else once upon a time made those changes, but I don't imitate Columbo very well. :)

speck 10-20-2012 11:01 PM

I noticed the same thing a couple days ago on the new ext3 partitions (/, /usr) I created during the 14.0 install.

Code:

tune2fs -l /dev/sdb1
.
.
Maximum mount count:      -1
Last checked:            Fri Sep 28 16:03:33 2012
Check interval:          0 (<none>)
.
.

I'll probably update the maximum mount count to 60, but I was surprised as well that it was disabled.

Petri Kaukasoina 10-21-2012 02:05 AM

It's a change made upstream.

Quote:

From: Eric Sandeen <sandeen@redhat.com>
Date: Thu, 17 Feb 2011 15:55:15 -0600
Subject: [PATCH] e2fsprogs: turn off enforced fsck intervals by default

The forced fsck often comes at unexpected and inopportune moments,
and even enterprise customers are often caught by surprise when
this happens. Because a filesystem with an error condition will
be marked as requiring fsck anyway, I submit that the time-based
and mount-based checks are not particularly useful, and that
administrators can schedule fscks on their own time, or tune2fs
the enforced intervals if they so choose. This patch disables the
intervals by default, and I've added a new mkfs.conf option to
turn on the old behavior of random, unexpected, time-consuming
fscks at boot time.
...
He refers to the option "enable_periodic_fsck" in /etc/mke2fs.conf.

sparkyhall 10-21-2012 09:33 AM

Ahhh...now I understand although the patch comments don't seem to match those in man tune2fs which suggests that relying on the kernel to detect file system errors may lead to data loss:
Quote:

You should strongly consider the consequences of disabling
mount-count-dependent checking entirely. Bad disk drives,
cables, memory, and kernel bugs could all corrupt a filesystem
without marking the filesystem dirty or in error. If you are
using journaling on your filesystem, your filesystem will never
be marked dirty, so it will not normally be checked. A filesys‐
tem error detected by the kernel will still force an fsck on the
next reboot, but it may already be too late to prevent data loss
at that point.

It seems strange to me that the default behavior wasn't left alone (periodic fsck checks enabled) as this seems much safer than just disabling this feature for everyone.

I think I'll re-enable in /etc/mk2fs.conf just to be safe.

A big thank you to all who replied:hattip:


All times are GMT -5. The time now is 02:17 AM.