-   Linux - Newbie (
-   -   ext3...doubts (

mohit.saha 02-25-2008 01:35 AM

If journaling can be used to recover file system after crashes, why does ext3 still ask for file system check during system boot up?:confused:

chrism01 02-25-2008 01:48 AM

Because it's optional ie if it asks you, it thinks it needs doing, but it's your decision...

H_TeXMeX_H 02-25-2008 01:51 PM

Well, you see, on boot up, a journaled filesystem will analyze its log file, if the filesystem was not unmounted properly there's probably some lost data, so it looks through the log and tries to recover it, it also looks for possible data corruption. It typically only does this after a crash or when the filesystem is not unmounted properly (i.e. the power goes out before you can shutdown the computer properly).

mohit.saha 02-26-2008 12:12 AM

I will give what i found out till now...

e2fsck is used to check a Linux second extended file system (ext2fs). E2fsck also supports ext2 filesystems containing a journal, which are also sometimes known as ext3 filesystems, by first applying the journal to the filesystem before continuing with normal e2fsck processing. After the journal has been applied, a filesystem will normally be marked as clean. Hence, for ext3 filesystems, e2fsck will normally run the journal and exit, unless its superblock indicates that further checking is required.

How much time the check takes? 5 secs or an hour.

If it takes 5 seconds, then it's using the journal. The fsck that's used for ext3 replays the journal to make the filesystem consistent then assumes that everything's OK and continues.

If it takes an hour, then one of the time-between-fscks or mounts-between-fscks counters has expired, and it's doing a full fsck because a journal does not protect against corrupted data.

All times are GMT -5. The time now is 05:56 AM.