Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why does ext3 still need to be checked?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Xamindar
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1155
Location: California

PostPosted: Thu Aug 09, 2007 7:59 pm    Post subject: Why does ext3 still need to be checked? Reply with quote

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
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Thu Aug 09, 2007 8:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu Aug 09, 2007 8:04 pm    Post subject: Re: Why does ext3 still need to be checked? Reply with quote

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
View user's profile Send private message
bobobo
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2005
Posts: 122

PostPosted: Thu Aug 09, 2007 8:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Xamindar
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1155
Location: California

PostPosted: Thu Aug 09, 2007 9:13 pm    Post subject: Reply with quote

Thanks for the information guys. That clarifies it a lot.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Thu Aug 09, 2007 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum