All of lore.kernel.org
 help / color / mirror / Atom feed
* Question on Reiser4 regarding power failures
@ 2004-11-25 15:37 Bernhard Prell
  2004-11-25 15:59 ` Kerin Millar
  2004-11-25 17:18 ` Christian Mayrhuber
  0 siblings, 2 replies; 8+ messages in thread
From: Bernhard Prell @ 2004-11-25 15:37 UTC (permalink / raw)
  To: reiserfs-list

Hello everybody,

I have a simple question about Reiser4. I already tried to find the answer in 
http://www.namesys.com/v4/v4.html but I'm not completly sure if I understood 
everything :-)

*Background:
I 'm administrating about 20 computers. The installed Linux/Reiser is quite 
old: SuSE Linux with kernel 2.4.7(SMP) (dmesg tells me reiser 3.5.x disk 
format, ReiserFS version 3.6.25).

Obviously people often pull the plug without cleanly shutting down the 
systems, because maybe twice per month I have to setup a system again because 
it doesn't want to boot anymore. The reason is always a somehow corrupted 
root-filesystem. Sometimes reiserfsck can repair it, sometimes not because of 
I/O-read-errors. If that's the case I also have a look at the disk with 
"smartctl -t short /dev/hda" and it also reports read-errors. Then I usually 
do a "dd if=/dev/zero of=/dev/hda", repartition, reformat, setup the system 
from a tar file and everything is fine again (smartctl doesn't report 
read-errors anymore).

*Now my question, you may have guessed it:
Will the corruption caused by partially written sectors or other problems 
caused by _power failures_ be still a problem under reiser4 or are they gone 
forever because of the "atomic transactions" (at least in theory)?
(That would mean that reiserfsck is only existing to repair problems caused by 
bugs in reiser4...)

Sorry if this has been asked before, I tried to find an answer in the 
list-archive.

Thanks in advance

Bernhard

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Question on Reiser4 regarding power failures
@ 2004-11-29  9:25 Bernhard Prell
  2004-11-29 13:16 ` Christian Mayrhuber
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bernhard Prell @ 2004-11-29  9:25 UTC (permalink / raw)
  To: reiserfs-list


Thank you very much for your feedback so far!

Kerin Millar wrote:
> For this reason, and because I believe that the stability of reiserfs
> was improved drastically in later revisions of the 2.4 kernel, I would
> urge that you consider using a modern 2.4 kernel and the latest reiserfs
> tools if possible!

I don't want to describe why we are still using such an outdated system :-) 
but we will move to Gentoo with a current 2.6.x kernel and reiser4 soon. I 
just wanted to know if this will eliminate the problem once and for all - at 
least in theory - because of the new concepts in reiser4 (atomic 
transactions).  

------

Christian Mayrhuber wrote:
> I'd suggest to do the following for pull the plug scenarios on productive
> systems with reiserfs:

> 1) Disable write caching for ide drives with "hdparm -W 0 /dev/hdX"
>    This is the most important thing to do.

Will this really help to protect against partially written sectors and from 
there resulting read-errors (If a disk loses power while writing a sector the 
CRC-Check will fail and the disk reports an read-error that's not caused by a 
real hardware defect)? Changing the write cache strategy just "moves" the 
problem "in time" - maybe the propability that something happens is lower, 
because the amount of data that gets written at a certain point of time is 
smaller. 

> 4) If you want to prevent data corruption and not just filesystem
>    corruption, use a recent 2.6.x kernel which incoporates Chris Mason's
>    data logging patches.
>    Alternatively you could use a newer SuSE which has the data logging
>    patches in the 2.4 kernel series, too. Maybe the installation of a
>    a newer 2.4.x kernel rpm from ftp.suse.com will work for you.

> As reiser4 is atomic in it's operations it should protect your data even 
more 
> than ext3/reiserfs with the data=journal mount option, unless you don't have
> write cache for ide drives enabled. Reiser4 is still beta.

I am not concerned about the current beta quality, we will migrate early next 
year and someday the bugs will be fixed. Updating a SuSE system is quite a 
pain I experienced (without reinstalling), it will be easier with Gentoo to 
keep a reasonable current system.

> Since 2.6.9 the write barrier patches are in the kernel. These should
> protect better from data loss with disks that have write caching enabled.
> The only two filesystems supporting write barrier are ext3 with the mount
> option "barrier=1" and reiserfs with the mount option "barrier=flush".

Our problem is not loss of (user) data. If someone pulls the plug before all 
unsaved data is written or before the write cache is flushed - I don't care. 
But it would be nice if the system would boot again... and all system files 
are sane. As I understand it, reiser4 recognizes if a certain transaction was 
completed successfully. But will it fix a partially written sector?

Bye,

Bernhard


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-29 18:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-25 15:37 Question on Reiser4 regarding power failures Bernhard Prell
2004-11-25 15:59 ` Kerin Millar
2004-11-25 17:18 ` Christian Mayrhuber
  -- strict thread matches above, loose matches on Subject: below --
2004-11-29  9:25 Bernhard Prell
2004-11-29 13:16 ` Christian Mayrhuber
2004-11-29 13:31 ` Dieter Nützel
2004-11-29 13:48   ` Christian Mayrhuber
2004-11-29 18:15 ` Matt Stegman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.