Announcement

Collapse
No announcement yet.

Don't understand boot-time fsck

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

    #16
    OK so just did the e2fsck on it from 12.04 booted back to 12.10 and then did a restart and back to 12.10 ,, agin during boot I see "fsck utill-linux " and it reports clean on /sda5,3&7 (all the partitions that get mounted at boot.

    the info asked for

    Code:
    vinny@vinny-HP-G62:~$  sudo dumpe2fs -h /dev/sda5 | grep -i 'mount count'
    [sudo] password for vinny: 
    dumpe2fs 1.42.5 (29-Jul-2012)
    Mount count:              3
    Maximum mount count:      30
    and

    Code:
    vinny@vinny-HP-G62:~$ cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda5 during installation
    UUID=51916d2f-8366-4c7a-bccf-c40cc9d9b3bc /               ext3    errors=remount-ro,user_xattr 0       1
    # swap was on /dev/sda1 during installation
    UUID=419b2146-8e8a-4d97-90ed-89e519e1dc0d none            swap    sw              0       0
    /dev/sda3 /mnt/disk     ext4    defaults      0       2
    /dev/sda7 /mnt/disk1    ext4    defaults      0       2
    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #17
      You have sda3 and sda7 set to check those file systems after they check your system file system. You can change that by changing the "2" at the end of the fstab line of those partitions to "0". That says these do not need checking when booting. Run that dump2fs command on sda3 and sda7 and see what it says.

      Comment


        #18
        Originally posted by Detonate View Post
        You have sda3 and sda7 set to check those file systems after they check your system file system. You can change that by changing the "2" at the end of the fstab line of those partitions to "0". That says these do not need checking when booting. Run that dump2fs command on sda3 and sda7 and see what it says.
        yes ,,,,,,but every boot?

        Code:
        vinny@vinny-HP-G62:~$  sudo dumpe2fs -h /dev/sda3 | grep -i 'mount count'
        [sudo] password for vinny: 
        dumpe2fs 1.42.5 (29-Jul-2012)
        Mount count:              24
        Maximum mount count:      31
        and

        Code:
        vinny@vinny-HP-G62:~$ sudo dumpe2fs -h /dev/sda7 | grep -i 'mount count'
        dumpe2fs 1.42.5 (29-Jul-2012)                                                                                                
        Mount count:              16
        Maximum mount count:      24
        and should not the mount count get reset if their being checked at boot and pronounced clean ?

        what I dont get is whow it apears as though all the mounted drives are being checked on every boot. instead of just after max mount count?
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #19
          I don't know why the mount count is not being updated. I will check mine after next boot to see if mine are being updated. Maybe this is a bug that needs to be reported.

          Comment


            #20
            Originally posted by vinnywright View Post
            yes ,,,,,,but every boot?
            Are you really sure that fsck runs a (full) check on every boot? (if it does, you should see a message along the lines "checking file system...may take a few minutes" and a changing percentage showing check progress).

            fsck will run a very quick check of the journal on every boot and report if the journal is "clean", this is not the same as a full file system check.

            I don't really see anything out-of-the-ordinary in your output, but you can test it by changing the real mount count with the -C (not -c) option for tune2fs:
            1. sudo tune2fs -C 32 /dev/sda3
            (this will change the mount count for /dev/sda3 over the max mount count for the file system, which should trigger a full file system check on next boot)
            2. boot and watch /dev/sda3 get checked
            3. after boot the mount count for /dev/sda3 should have been reset.
            Last edited by kubicle; Oct 05, 2013, 05:10 PM.

            Comment


              #21
              Originally posted by kubicle View Post
              Are you really sure that fsck runs a (full) check on every boot? (if it does, you should see a message along the lines "checking file system...may take a few minutes" and a changing percentage showing check progress).

              fsck will run a very quick check of the journal on every boot and report if the journal is "clean", this is not the same as a full file system check.
              Aaaa this is probably what I am seeing ,,,,,,,,,but will do the -C option and see if I see a difference in the output.

              VINNY
              i7 4core HT 8MB L3 2.9GHz
              16GB RAM
              Nvidia GTX 860M 4GB RAM 1152 cuda cores

              Comment


                #22
                OK the quick check of the journal is what I was seeing ,,,,,,the first line read somthing like "recovery required on read only file system sda5" and then 3-4 more lines and then reporting the partitions clean ,,,,,,,,setting the mount count to just over max did make it do a "real" check of the 3 file systems which was obviously different from what I had been seeing ,,,,,,,,,,,,,,,,,sorry

                VINNY
                i7 4core HT 8MB L3 2.9GHz
                16GB RAM
                Nvidia GTX 860M 4GB RAM 1152 cuda cores

                Comment


                  #23
                  Following your suggestions. I ran blkid and then reset the max mount counts with tune2fs using the blkid. Now


                  $ sudo dumpe2fs -h /dev/sda6 | grep -i 'mount count'
                  dumpe2fs 1.42.5 (29-Jul-2012)
                  Mount count: 1
                  Maximum mount count: 30

                  $ sudo dumpe2fs -h /dev/sdc7 | grep -i 'mount count'
                  dumpe2fs 1.42.5 (29-Jul-2012)
                  Mount count: 30
                  Maximum mount count: 30

                  $ sudo dumpe2fs -h /dev/sdb3 | grep -i 'mount count'
                  dumpe2fs 1.42.5 (29-Jul-2012)
                  Mount count: 1
                  Maximum mount count: 30

                  I restarted and saw these two llines flash by,

                  /dev/sda6 has been mounted 55 times without being checked, check forced. (system root)
                  our-pix has been mounted 147 times without being checked, check forced.

                  but it all went so fast (seconds) that clearly little checking was done. In /var/boot.log, I see

                  Begin: Running /scripts/init-bottom ... done.
                  fsck from util-linux 2.20.1
                  fsck from util-linux 2.20.1
                  fsck from util-linux 2.20.1
                  fsck from util-linux 2.20.1
                  fsck from util-linux 2.20.1
                  fsck from util-linux 2.20.1
                  /dev/sda6 has been mounted 55 times without being checked, check forced.
                  our-pix has been mounted 147 times without being checked, check forced.
                  samba-transfer: clean, 3767/2523136 files, 2891630/10090820 blocks
                  /dev/sdc5: clean, 22/500960 files, 68662/2000084 blocks
                  /dev/sdc7: clean, 14711/8388608 files, 27442348/33553752 blocks (check after next mount)
                  /dev/sdc6: clean, 361363/8003584 files, 21840107/31999464 blocks
                  /dev/sda6: 231234/6553600 files (0.2% non-contiguous), 2241061/26214055 blocks
                  our-pix: 94745/13115392 files (0.2% non-contiguous), 40452160/52430135 blocks

                  I do not understand.
                  'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

                  Comment


                    #24
                    Originally posted by joneall View Post
                    but it all went so fast (seconds) that clearly little checking was done. In /var/boot.log, I see

                    Begin: Running /scripts/init-bottom ... done.
                    fsck from util-linux 2.20.1
                    fsck from util-linux 2.20.1
                    fsck from util-linux 2.20.1
                    fsck from util-linux 2.20.1
                    fsck from util-linux 2.20.1
                    fsck from util-linux 2.20.1
                    /dev/sda6 has been mounted 55 times without being checked, check forced.
                    our-pix has been mounted 147 times without being checked, check forced.
                    samba-transfer: clean, 3767/2523136 files, 2891630/10090820 blocks
                    /dev/sdc5: clean, 22/500960 files, 68662/2000084 blocks
                    /dev/sdc7: clean, 14711/8388608 files, 27442348/33553752 blocks (check after next mount)
                    /dev/sdc6: clean, 361363/8003584 files, 21840107/31999464 blocks
                    /dev/sda6: 231234/6553600 files (0.2% non-contiguous), 2241061/26214055 blocks
                    our-pix: 94745/13115392 files (0.2% non-contiguous), 40452160/52430135 blocks

                    I do not understand.
                    In your fstab, you have six ext3/ext4 filesystems to check:
                    UUID=331af706-41b2-404e-a771-be1acddd4c39 / ext4 errors=remount-ro 0 1
                    /dev/sdc7 /home/jon/music_mp3 ext3 defaults 0 2
                    /dev/sdb3 /home/jon/our-pix ext4 defaults 0 2
                    /dev/sdc6 /home ext3 defaults 0 2
                    /dev/sdc5 /tmp ext3 defaults 0 2
                    /dev/sdc9 /samba-transfer ext3 defaults 0 2
                    That's why you see fsck run six times in your log.
                    Out of those six, two were over the max mount count triggering a check (/dev/sda6 and /dev/sdb3...or "/" and "/home/jon/our-pix") these two were checked for errors:
                    /dev/sda6: 231234/6553600 files (0.2% non-contiguous), 2241061/26214055 blocks
                    our-pix: 94745/13115392 files (0.2% non-contiguous), 40452160/52430135 blocks
                    The rest (four) were not over max mount count and only a journal check was performed:
                    samba-transfer: clean, 3767/2523136 files, 2891630/10090820 blocks
                    /dev/sdc5: clean, 22/500960 files, 68662/2000084 blocks
                    /dev/sdc7: clean, 14711/8388608 files, 27442348/33553752 blocks (check after next mount)
                    /dev/sdc6: clean, 361363/8003584 files, 21840107/31999464 blocks
                    (note that /dev/sdc7 is scheduled for a check next boot, it's just on max count limit)

                    Comment


                      #25
                      Originally posted by vinnywright View Post
                      OK the quick check of the journal is what I was seeing...
                      Thank you, Vinny, I've been seeing this and wondering what's going on; your willingness to ask the question is helpful, part of what a forum is for.

                      Regards, John Little
                      Regards, John Little

                      Comment


                        #26
                        sudo tune2fs -C 32 /dev/sda6 does not seem to bring about check either

                        I tried

                        sudo tune2fs -C 32 /dev/sda6

                        and confirmed that the count had indeed been reset. On a reboot, I saw

                        /dev/sda6 has been mounted 32 times without being checked, check forced.

                        and maybe 2 seconds later

                        /dev/sda6: 231288/6553600 files (0.2% non-contiguous), 2241191/26214055 blocks

                        and then I got the logon screen. Is fsck on ext4 really that fast?

                        I will try again on an ext3 file system.
                        'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

                        Comment


                          #27
                          On a 32GB ext file system, the boot-time fsck took about almost a minute. But the 100GB ext4 system only took a second or two. Is this normal?
                          'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

                          Comment


                            #28
                            Originally posted by joneall View Post
                            Is fsck on ext4 really that fast?
                            It depends on a few things (like the number of used inodes on the file system, for example) but it can be tens of times faster than ext3.

                            Comment

                            Working...
                            X