View previous topic :: View next topic |
Author |
Message |
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Thu Aug 09, 2007 7:59 pm Post subject: Why does ext3 still need to be checked? |
|
|
I remember when rieserfs came out that there was big talk about not having to do filesystem checks because it was a journaled filesystem. But I use ext3 which should also be a journaling filesystem as far as I know. But it still checks every 25 startups or whatever and it fsck does find errors occasionally.
Why is that? Isn't that the point of a journaled filesystem? So you don't have to spend 10 minuted watching it check every once and a while? |
|
Back to top |
|
|
adsmith Veteran
Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Thu Aug 09, 2007 8:03 pm Post subject: |
|
|
It doesn't have to, of course. Do tune2fs -c 0 /dev/whatever to turn off periodic checking.
However, it is still a good idea to do a fsck every once in a while, since things can go wrong in hardware that you might never know about.
Of course, the periodic fsck always happens at 11pm when you *really* need to get the server up now! |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Thu Aug 09, 2007 8:04 pm Post subject: Re: Why does ext3 still need to be checked? |
|
|
Xamindar wrote: | I remember when rieserfs came out that there was big talk about not having to do filesystem checks because it was a journaled filesystem. But I use ext3 which should also be a journaling filesystem as far as I know. But it still checks every 25 startups or whatever and it fsck does find errors occasionally.
Why is that? Isn't that the point of a journaled filesystem? So you don't have to spend 10 minuted watching it check every once and a while? |
No, the point of journal is that you actually CAN recover the information if something goes wrong. No filesystem can ensure that nothing is going to be wrong because:
1.- hardware failure happens
2.- electrical blackouts happens
3.- operations are not truly atomic, at hardware level, so, no fs can guarantee that they will be (even if Reiser says another thing).
Considering that, and that magic is not an issue when talking about data structures, the possibility of a fail can never be erradicated. The only thing that a journal guarantees is that data losing is minimized, and you don't have to wait two days to fsck a filesystem (like happened with big drives under non-journalised filesystems. like ext2).
There is a lot of myth around filesystems, being this and the non-fragmentable filesystems the more widespread ones. Both are false, of course. |
|
Back to top |
|
|
bobobo Tux's lil' helper
Joined: 24 Nov 2005 Posts: 122
|
Posted: Thu Aug 09, 2007 8:09 pm Post subject: |
|
|
The point of the journal is that the fs knows what happened (recently), as a result it doesn't need to check everything in case of a problem, making checks much faster. Normally, it should only do a check when the fs wans't correctly unmounted, and it should be fast. The check that you are getting every 25 mount is most likely a parameter which can be changed with tune2fs, check "man tune2fs". For example "tune2fs -i 300d /dev/<hd here>" will set the check to a 300 days interval. I've set mine on 300 days just in case, but it has never been really needed.
edit: oh, and "tune2fs -c 0 /dev/whatever" like said on an earlier post. -c is for mount-dependant checking, -i is for time dependant checking. |
|
Back to top |
|
|
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Thu Aug 09, 2007 9:13 pm Post subject: |
|
|
Thanks for the information guys. That clarifies it a lot. |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Thu Aug 09, 2007 9:19 pm Post subject: |
|
|
i have luck, i had errors on these checks. So i replaced my western disk with a new samsung disk and everthing was gone. The old disk was 1 year old. |
|
Back to top |
|
|
|