My understanding of ReiserFS is that by DEFAULT only the metadata is journaled. See http://www.namesys.com/v4/v4.html#crashes_handl. That is to say, when a file is written, the data that goes into the file is NOT journaled, but the data about the file IS journaled. Thus, when your power goes out, the file system should be OK (or easily fixed), but the files themselves may contain corrupt data. Seems counter intuitive, but the goal of Reiserfs is limit the time it takes to fsck after a crash. To protect data you need to protect the machine from adverse events. I believe if you want to journal data and metadata, then you'll have to modify the ReiserFS default behavior (I presume there is a man page on how to do it, but I haven't looked). Ext3 has similar configurations though I don't know the default behavior of ext3 (rtm). ReiserFS is ideal for something like an Oracle database. Where the files are fixed size and the application itself journals its own data. Or possibly a system with a HUGE number of files like a news server. Where the contents of the file aren't as important as the system not taking 4 days to come back up after a crash. In all honesty though, you need a UPS. No matter what file system you have power outages will inevitably cause some sort of data corruption. Andrew McAllister
-----Original Message----- From: Brad Bendily [mailto:brad@selu.edu] Sent: Friday, April 30, 2004 8:59 AM To: suse-linux-e@suse.com Subject: Re: Fw: [SLE] ReiserFS problem? snip This is all well and good, but the machine having the problem is brand new and the drive isn't that big. So I don't really think it's a power supply issue. It works ok, until the power goes out then reiserFS doesn't recover. It's a journaling file system and therefore should be able to survive when it is not shutdown properly. Right? snip
The Friday 2004-04-30 at 09:38 -0500, McAllister, Andrew wrote:
My understanding of ReiserFS is that by DEFAULT only the metadata is journaled. See http://www.namesys.com/v4/v4.html#crashes_handl.
That is to say, when a file is written, the data that goes into the file is NOT journaled, but the data about the file IS journaled. Thus, when your power goes out, the file system should be OK (or easily fixed), but the files themselves may contain corrupt data. Seems counter intuitive, but the goal of Reiserfs is limit the time it takes to fsck after a crash. To protect data you need to protect the machine from adverse events.
That's correct. However, the original poster wrote:
do all that stuff. The first time it happened I recovered and it all worked. Today when it happened it wiped out my /home partition and everything was lost. Mostly.
That shouldn't happen, he lost a partition.
I believe if you want to journal data and metadata, then you'll have to modify the ReiserFS default behavior (I presume there is a man page on Ext3 has similar configurations though I don't know the default behavior of ext3 (rtm).
I think it is not possible with reiserfs, but it is easy with ext3 - but I don't remember how... ah, yes, man mount: Mount options for ext3 ... data=journal / data=ordered / data=writeback ... journal All data is committed into the journal prior to being written into the main file system. ... writeback Data ordering is not preserved - data may be written into the main file system after its metadata has been committed to the journal. This is rumoured to be the highest-throughput option. It guarantees internal file system integrity, however it can allow old data to appear in files after a crash and journal recovery.
In all honesty though, you need a UPS. No matter what file system you have power outages will inevitably cause some sort of data corruption.
Of course! -- Cheers, Carlos Robinson
participants (2)
-
Carlos E. R.
-
McAllister, Andrew