On Monday 29 November 2004 10:25, Bernhard Prell wrote: > 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. I guess it's all about probability. If you can reduce the risk of a non-bootable system from say 50% to 5% it'll often save your day.
If the harddisk is not able to finish writing a sector during a power failure I guess nothing can help you. Maybe some reiserfs guy (lady?) knows how nasty the behavior of ide drives during a power failure still is if the write cache is already disabled. My experience is vastly positive with disabled write caches. I didn't have a corrupted unbootable reiserfs since I disabled the write cache on the harddisk. I must admit I'm not running that old kernels. The 2.4.7 kernel is a rather old beast with reiserfs bugs. You should be using a newer one. I did some tests with kernel 2.6.9, the "barrier=flush" mount option and a enabled write cache. Whilst cp'ing a kernel tree I was switching off and the system survived every time. I'll stick to "barrier=flush" as it seems to be safe enough for me. -- lg, Chris
