NetBSD-Users archive

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

Re: Which file-system is good for power down?



On Mon, Jan 07, 2008 at 12:35:13AM +0100, Christian Baer wrote:
> On Sun, 6 Jan 2008 17:06:33 +0100 Adam Hamsik wrote:
> 
> > How will ext3 corrupt my data after hard crash ?.
> 
> IIRC ext3 gets its performance the same way a ext2 did: by writing async.
> Ok, the journal has been added.

Please note that with journaling, writing async is no where near as 
dangerous a thing as what ext2fs did. It's actually rather safe.

> > AFAIK soft-dependiences keep filesystem in consistent state with  
> > ordering metadata writes. softdeps keep ordered metadata(which were  
> > not written to fs yet.) in memory. And therefore if you have hard  
> > crash with heavy-io server you can loose more than with journaling fs.  
> > Keep number of softdeps in-memory buffers small is not solution  
> > because it slows your io then.
> 
> Anything in the memory that wasn't written to disk when the power fails is
> lost. It doesn't matter what fs you are using.
> 
> The difference is that soft updates (softdeps) will save any data that
> actually did make it to the disk prior to the power going down. In case of
> ext3 that is not necessarily the case. Especially if the load on the drive
> is heavy and it doesn't support tagged command queuing. I could happen
> that data is actually written to the disk but can't be found because the
> meta data wasn't written in time. The journal only speeds up the checking
> of the filesystem and lowers the chance of it being completely broken.
> It's not a lifeguard for any data.

As Adam indicated, you can actually journal data with ext3fs. I think it's 
kinda silly, but if you need it, it's there.

Please note that you're wrong about softdeps above. If either journaling 
or softdeps don't have everything that's needed on-disk at the time of a 
crash, you don't have all you need to be able to read the file.

The difference is that with journaling, everything that's needed to say 
create or extend a file is in one transaction. So it all either happens or 
doesn't. With softdeps, we still have the standard ffs inconsistencies 
potential, and can end up with space not free and not allocated, or inodes 
not linked into directories even though their use count indicates they 
are.

Take care,

Bill

Attachment: pgpCoi3gpblwD.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index