Filesystem checks in Ubuntu 9.10 seem much too fast

Discussion in 'all things UNIX' started by Ocky, Nov 22, 2009.

Thread Status:
Not open for further replies.
  1. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    On booting into Karmic this morning a disk check was carried out (I think it's every 30 or so days). The checks on 2 partitions took about 5 seconds ! Seems way too fast.
    I have seen somewhere that apparently, the scheduled disk-checks do not halt the loading of the desktop in Karmic, whereas it did in previous versions.
    Whether this is correct or not I have no idea, and even if correct still seems too fast.

    Has anyone also noticed this ?
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,221
    Why do you expect the filecheck to be slow :)
    Boot from live cd and run manual check and see what gives.
    Or unmount a non-system partition and try a check.
    Mrk
     
  3. chronomatic

    chronomatic Registered Member

    Joined:
    Apr 9, 2009
    Posts:
    1,343
    It's the ext4 filesystem. It has a new and much improved fsck() on it. My 500 gig disk only takes maybe 3 or 4 seconds to be completely scanned, while the old ext3 would take 30 seconds or more. (The link I provided was written by the guy who wrote ext4 and he goes into detail about the new fsck. fsck() is the function that forces a filesystem check scan, btw.)

    Here is a list of all the improvements ext4 brings.

    So, yes, it's normal. Enjoy.
     
  4. Judge Dee

    Judge Dee Guest

    I'm glad this was posted. I did an fsck 2 days ago and just wouldn't believe it would scan that quick. It's incredible.
     
  5. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    Still hard to believe anything can be checked in such a short time. This check of a +/-100 GB partition took 1 second. Maybe I am doing something wrong ?
    From live cd:-

    fsck from util-linux-ng 2.16
    e2fsck 1.41.9 (22-Aug-2009)
    /dev/sdb5: clean, 37002/6389760 files, 1591709/25555390 blocks
    ubuntu@ubuntu:~$
     
    Last edited: Nov 23, 2009
  6. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,221
    Run the check with time command, so you know the execution time.

    Second, you're not checking every single bit of data, nor the physical disk structure, you're checking the filesystem metadata. If the journal is well, the all is well.

    You need additional flags for extra checks.

    Mrk
     
  7. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,381
    Location:
    West Yorkshire, UK
    Extents and more efficent than block allocation which means that building the map of the partition is faster and in memory requirements (for big partitions and big files in particular), means that its quicker to process the partiton (as less data to chew through).
    Checksumming of the journal means its far faster to check the journal. There is checksumming used elsewhere, that was not used in EXT3 which also helps speed things up.

    Unallocated block groups are skipped, this is the most signifcant improve, as most people do not fill their drives, there are signifcant savings to be made.

    Then there are the metadata optimisations Ted mentions in his blog, (did he mention innode tables are also similary optimised ?)

    Cheers, Nick.
     
  8. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    To be honest this is the first time I have done a manual fsck - out of curiosity re. the very fast times.
    How would I run the check with time command (-C ??) and what flags would you recommend ? Is this a command I could run; (-N to be on safe side as there is nothing wrong with my disks):-
    fsck -CVN -t ext4 /dev/sdb5 (I don't know whether - C will work for ext4)
    (sdb5 is my /home).
    Also are there any advantages/differences when running 'Check' in Gparted ?

    Thanks and regards.
     
  9. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,221
    time fsck whatever or time <any command>. time is an actual utility. Run man time to see more info on this one :)
    Mrk
     
  10. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    Thanks for your time Mrk :argh:
    Will do that. Do you prefer to run fsck from command line or in Gparted -
    by selecting 'Check' - are there differences ?
     
  11. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,221
    I let the system do its checks on boot.
    I never run manual checks on filesystems ... unless something is not working. But if the system is churning fine, I let it be. Minimum tweaks and interference on production system. Just make sure backups and images work.
    Mrk
     
  12. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    OK - good advice fo the less proficient users like me. :)
     
  13. wilbertnl

    wilbertnl Registered Member

    Joined:
    Dec 29, 2004
    Posts:
    1,850
    Location:
    Tulsa, Oklahoma
    Hey, Ocky,
    Since it's your first time, here a little tip:
    Only run fsck on unmounted filesystems. :)
    That's why booting from liveCD makes sense.
     
  14. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    Hah ! .. I'm proud to report that is one thing I did know. :D The learning continues ..
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.