[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ext3



On Tue, 11 Dec 2001 02:06, Daniel Pittman wrote:
> > With a journaling system, the stability of the fs is granted.
>
> ...once the data is committed to the journal.
>
> > But I will type that in again. If the fs dies, I can't rewrite it from
> > scratch. Of course, if the data I write is important enough, I can
> > always save, and then issue a sync command.
>
> Well, yes. If you defeat the five second journal sync in ext3, though,
> and use something like noflushd or a high bdflush interval to keep data
> in RAM, you lose the reliability.
>
> Seriously, ext3 isn't magic. If you stop it writing data to the journal,
> it is exactly as reliable as ext2.[1]

If you prevent it from writing to the journal while allowing it to write 
other meta-data then it won't offer anything for reliability (but I doubt 
that is possible on most machines).

If it always writes to the journal before writing to the meta-data then it 
will be more reliable as there is less chance of things getting corrupted 
after a failure.

> Now, if you use ext3 and block writes for half an hour, the journal will
> give you an assurance that the data written half an hour ago is all on
> disk. Of course, ext2 will give you exactly the same assurance.
>
> So, ext3 will take less time to replay the journal than a full ext2 fsck
> run, but that's it. No more assurance of anything. Really.

There is an assurance that a renamed file will still exist under either the 
old name or the new name.

There is an assurance that a file who's size is being changed (by write() at 
the end or truncate) will have the old size, or the new size and that the 
meta-data will all match up (not having half the meta-data for one size and 
half for another and let fsck sort it out).

There is an assurance that when you delete a file and create a new file you 
will either have the old file with the old contents or the new file with the 
new contents.  Having the old file name with the new contents or the new file 
name with the old contents will not be possible.  Also having both the old 
and the new file names pointing to the same data should not be possible.

These are all situations that I have experienced with non-journalled file 
systems.  Most of them not with Ext2 because Ext2 is a very well written file 
system and minimises the risk.  But the risk is still there.  Ext3 with 
journalling removes that risk.

-- 
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page



Reply to: