[Gllug] Re: RAID on laptop or xfs?

Bruce Richardson itsbruce at uklinux.net
Fri Apr 1 21:46:55 UTC 2005


On Fri, Apr 01, 2005 at 12:00:50PM +0100, Liam wrote:
> My understanding is that the integrity of the journal itself is not
> that crucial fro the integrity of the filesystem

The journal is critical to the integrity of the filesystem.  With most
fileystems, that's the only thing the journal actually protects; in most
cases they only do metadata journalling, not full data journalling.

> because as soon as
> the journal gets hosed by the drive losing power and the contents of
> the cache dissapearing into the ether, the journal is no longer in a
> postition to write its contents to the rest of the file system.

You are missing the point that with writeback caching enabled, the drive
may reorder the sequence in which blocks are flushed to disk, to improve
performance..  This can be very bad for journalled filesystems, as they
depend on blocks being written to disk in the correct order.  If, as a
result of writeback caching, the journal records indicating a completed
filesystem update are written to disk before the inode changes
themselves (the opposite way round to the way it should be) and there is
a power failure before or during the second write, this is bad.  When
the machine powers up again, the incomplete action will not be replayed
because the journal will have it listed as finished.

If you think about it, there is even a small risk of this happening when
you simply run "shutdown -h now", if the box shuts down quickly enough.

-- 
Bruce

The ice-caps are melting, tra-la-la-la.  All the world is drowning,
tra-la-la-la-la.  -- Tiny Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20050401/ab0efe13/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list