Announcement

Collapse
No announcement yet.

No automatic e2fsck at boot-up?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    No automatic e2fsck at boot-up?

    Hi,

    Is it normal for 12.04 not to ever check the disk partitions at startup like previous versions of Ubuntu/Kubuntu did? I shut my system down daily so I expected it to check the disks at some time. I have never seen my Kubuntu 12.04 system ever check the partitions when booting, but I have this entry in my kern.log:
    Code:
    Aug 13 14:49:19 Core2Duo kernel: [   27.106193] EXT4-fs (sdb5): warning: maximal mount count reached, running e2fsck is recommended
    sdb5 is my old Ubuntu home partition that I now use to backup stuff from my new Kubuntu home partition on sda3.

    I first saw this message in my logs some time ago and despite numerous shutdown/startup cycles the check hasn't been performed. I did some checking today and found this:

    Code:
    rod@Core2Duo:~$ sudo dumpe2fs -h /dev/sdb5 | grep -i 'mount count'
    dumpe2fs 1.42 (29-Nov-2011)
    Mount count:              81
    Maximum mount count:      20
    On my current home partition I get this:
    Code:
    rod@Core2Duo:~$ sudo dumpe2fs -h /dev/sda3 | grep -i 'mount count'
    dumpe2fs 1.42 (29-Nov-2011)
    Mount count:              119
    Maximum mount count:      -1
    I see that the Maximum mount count for sda3 is -1. Does this mean that e2fsck will never be run?

    I'm not too worried about all this because I've thought that frequent disk checking isn't really necessary nowadays (it reminds me too much of my Win98 days! ) I think the Linux file systems are robust enough what with journalling and all that, so why check the partitions so often anyway?

    So I am wondering if there has been a change in policy regarding disk checking or is something set wrong in my system? I haven't tweaked any settings in regard to the file systems as far as I know.

    Thanks.
    Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
    Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.


    #2
    Take a look at /etc/fstab. For each mount line, what's the entry in the sixth position?

    From man fstab:

    The sixth field (fs_passno).
    This field is used by the fsck program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
    Last edited by SteveRiley; Aug 12, 2012, 10:51 PM.

    Comment


      #3
      Hi Steve,

      OK, sda3 (/) has an entry of 1 and sda5 (home) has an entry of 2. sdb5 doesn't appear in my fstab and is automounted at login. I'm guessing because sdb5 isn't mounted at boot but after login probably explains why it isn't being checked pre-login? BTW, I'm the only normal user on this PC and I have it auto-logging me on at bootup.
      Last edited by Rod J; Aug 13, 2012, 12:54 AM.
      Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
      Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

      Comment


        #4
        I just checked my "maximum mount count"s and noticed that all partitions are set to -1. A bit of Googling landed me on a post at the OpenSUSE forum, which in turn makes reference to the EXT4 designers concluding that regular fscks are no longer necessary. So you're probably good to go. I wasn't aware of this -1 thing myself.

        Comment


          #5
          OK, thanks for that. I did do a bit of googling before posting on here but I guess I wasn't asking the right question.

          I wondered if there had been a change of policy regarding the checking of EXT4 partitions. Seems to make sense to me, as apparently a check will be done if the file system is not unmounted cleanly. I will mark this thread as solved.
          Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
          Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

          Comment


            #6
            Well, TBH, you first post actually did begin and end with a question about policy. But, alas, that escaped me and I immediately went into diagnosis mode! But it looks like we've both learned something new, so that's cool.

            Comment


              #7
              Bug reports & changelogs

              Linking to: https://www.kubuntuforums.net/showth...l=1#post362170
              Although, after a lot of googling I still can't find a direct reference to the actual change of policy on this.

              Bug #1083985 - fsck routine checks on boot are disabled: https://bugs.launchpad.net/ubuntu/+s...s/+bug/1083985
              --> Comment #3: https://bugs.launchpad.net/ubuntu/+s...985/comments/3
              Dimitri John Ledkov (xnox) wrote on 2013-02-10: #3
              The defaults have changed. One can change the value of enable_periodic_fsck /etc/mke2fs.conf to reenable periodic fsck on newly created filesystems, or use tune2fs to re-enable them. Note that a boot time fsck is still attempted by mountall, so fsck will be run if the settings on the filesystem are correct.
              ----> e2fsprogs changelog: http://changelogs.ubuntu.com/changel...ntu2/changelog
              e2fsprogs (1.42~WIP-2011-07-02-1) unstable; urgency=low
              ...
              * Mke2fs will now create file systems that enable user namespace
              extended attributes and with time- and mount count-based file
              system checks disabled.
              ...
              -- Theodore Y. Ts'o <tytso@****> Sat, 02 Jul 2011 22:38:57 -0400

              At here the partitioning was made before this...looking ( https://www.kubuntuforums.net/showth...l=1#post294673 )


              so the showfsck will tell:

              :~$ sudo showfsck
              [sudo] password for me:
              ***************************
              * -4 * /-1 mount(s) until fsck for /dev/disk/by-uuid/386aa5a3-53aa-420e-af00-1e56c32f567e
              ***************************
              19/37 mount(s) until fsck for /dev/sda1
              17/23 mount(s) until fsck for /dev/sda10
              20/38 mount(s) until fsck for /dev/sda14
              9/27 mount(s) until fsck for /dev/sda2
              9/27 mount(s) until fsck for /dev/sda3
              The root (/dev/disk/by-uuid/386a...) partition has been formatted after the new policy and I have been running the fsck manually for it.

              The tune2fs ( http://manpages.ubuntu.com/manpages/...tune2fs.8.html ) is suggesting:
              OPTIONS
              -c max-mount-counts
              Adjust the number of mounts after which the filesystem will be
              checked by e2fsck(8). If max-mount-counts is 0 or -1, the
              number of times the filesystem is mounted will be disregarded by
              e2fsck(8) and the kernel.

              Staggering the mount-counts at which filesystems are forcibly
              checked will avoid all filesystems being checked at one time
              when using journaled filesystems.

              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
              filesystem 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.

              See also the -i option for time-dependent checking.
              Have you tried ?

              - How to Ask a Question on the Internet and Get It Answered
              - How To Ask Questions The Smart Way

              Comment


                #8
                Thanks for that OneLine! A very informative post.

                I guess the e2fsprogs changelog exerpt was the information I was originally looking for:

                e2fsprogs changelog: http://changelogs.ubuntu.com/changel...ntu2/changelog
                e2fsprogs (1.42~WIP-2011-07-02-1) unstable; urgency=low
                ...
                * Mke2fs will now create file systems that enable user namespace
                extended attributes and with time- and mount count-based file
                system checks disabled.
                ...
                -- Theodore Y. Ts'o <tytso@****> Sat, 02 Jul 2011 22:38:57 -0400
                Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
                Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

                Comment


                  #9
                  Outstanding thread, thanks all

                  Mine were not being checked either.
                  Code:
                  Setting up showfsck (1.4ubuntu4) ...update-rc.d: warning: /etc/init.d/showfsck missing LSB information
                  update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
                  ***************************
                  * -11 * /-1 mount(s) until fsck for /dev/disk/by-uuid/f1395a5e-521e-4d54-aa96-f9700f59b077
                  ***************************
                  ***************************
                  * -11 * /-1 mount(s) until fsck for /dev/sda1
                  ***************************
                  ***************************
                  * -11 * /-1 mount(s) until fsck for /dev/sda6
                  ***************************
                  and now after running something like
                  Code:
                  lee@lee-asrock:~$ sudo tune2fs -c 25 /dev/sda1
                  Code:
                  ee@lee-asrock:~$ sudo showfsck
                  18/28 mount(s) until fsck for /dev/disk/by-uuid/f1395a5e-521e-4d54-aa96-f9700f59b077
                  15/25 mount(s) until fsck for /dev/sda1
                  22/32 mount(s) until fsck for /dev/sda6
                  20/30 mount(s) until fsck for /dev/sdb1

                  Comment

                  Working...
                  X