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

Re: A question about /srv partition



According to Roberto C. Sanchez,
> Dalibor Straka wrote:
> >On Sat, Apr 02, 2005 at 10:11:21PM -0800, Tony Godshall wrote:
> >
> >>>Note.  You should never use XFS (or JFS or others of that class of
> >>>journaling file system, which I believe are meta data journaling) unless
> >>>the machine is connected to an UPS.  ...
> >>
> >>Huh?  One of the main strengths of journaling filesystems
> >>is that they do recover from poor shutdown better... the
> >
> >
> >Exactly!
> >
> 
> I forget where I read it (I believe it was an old LKML posting),
> but some guy from SGI was trying to explain to people that were
> experiencing corruption with XFS that it should only be used on
> systems with an UPS.  The problem is not the file system, but the
> hardware.  He said when the average system loses power, the RAM
> almost immediately turns to crap (in terms of content), but the
> hard drive (much less voltage sensitive) will continue to write
> long after the RAM has stopped delivering valid bits (his words).
> 
> The issue is that ext3 journals the data (i.e., the actual bits
> you intend to write to disk).  However, XFS (and JFS and ReiserFS)
> journal the metadata (the location, size and checksum of your
> write operation), not the data itself.  If the hard drive writes
> crap to the platter, metadata journalling does you no good.  The
> guy from SGI that posted to LKML said that SGI worked around the
> problem in hardware by enlarging the capacitors between the power
> supply and the RAM and other components as necessary so that in
> the event of a power failure all components go dead at the same
> time.
> 
> So yes, journaling helps you with a crash, but ext3 is best
> suited to handle the poor quality of consumer-grade hardware.

I think you have the facts backwards but they actually make
sense better that way ;-)

I mean, ext3 journals only metadata, so recovering from a
shutdown is unlikely to roll forward garbage in an actual
file.

But xfs journals data as well, so it would be able to
recover partial data, including any gibberish generated.

However, I find it hard to believe that power-loss would
corrupt main RAM faster than hard drive buffer RAM.  And I'd
expect garbage would not have the proper checksums to be
treated as valid journal entries upon restart.

T



Reply to: