PDA

View Full Version : Filesystem checks in Ubuntu 9.10 seem much too fast


Ocky
November 22nd, 2009, 02:47 AM
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 ?

Mrkvonic
November 22nd, 2009, 09:32 AM
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

chronomatic
November 22nd, 2009, 03:26 PM
-{ Quote: "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 ?" }-

It's the ext4 filesystem. It has a new and much improved (http://thunk.org/tytso/blog/2009/02/26/fast-ext4-fsck-times-revisited/)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 (http://kernelnewbies.org/Ext4)is a list of all the improvements ext4 brings.

So, yes, it's normal. Enjoy.

Judge Dee
November 22nd, 2009, 04:17 PM
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.

Ocky
November 23rd, 2009, 02:11 AM
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:~$

Mrkvonic
November 23rd, 2009, 03:19 AM
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

Nick Rhodes
November 23rd, 2009, 06:38 AM
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.

Ocky
November 23rd, 2009, 07:24 AM
-{ Quote: "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" }-
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.

Mrkvonic
November 23rd, 2009, 08:41 AM
time fsck whatever or time <any command>. time is an actual utility. Run man time to see more info on this one :)
Mrk

Ocky
November 23rd, 2009, 09:03 AM
-{ Quote: "time fsck whatever or time <any command>. time is an actual utility. Run man time to see more info on this one :)
Mrk" }-
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 ?

Mrkvonic
November 23rd, 2009, 09:17 AM
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

Ocky
November 23rd, 2009, 09:25 AM
-{ Quote: "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" }-
OK - good advice fo the less proficient users like me. :)

wilbertnl
November 23rd, 2009, 11:33 AM
-{ Quote: "To be honest this is the first time I have done a manual fsck - out of curiosity re. the very fast times." }- 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.

Ocky
November 23rd, 2009, 12:33 PM
-{ Quote: "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." }-
Hah ! .. I'm proud to report that is one thing I did know. ;D The learning continues ..