Gentoo Archives: gentoo-user

From: Vaeth <vaeth@××××××××××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Ext4 status - Alternative to ext2/3 for gentoo portage and more
Date: Fri, 15 Feb 2008 19:41:09
Message-Id: Pine.LNX.4.64.0802152022410.17004@wmax001.mathematik.uni-wuerzburg.de
1 On Fri, 15 Feb 2008, Uwe Thiem wrote:
2
3 > Second, no journalled filesystem in the whole wide world can prevent
4 > occurences of inconsisteny in case of a power cut. None, try as they
5 > might.
6
7 This is correct.
8
9 > If the journal change still resides in the
10 > harddrive cache while your power cut occurs, boooom - inconsistency.
11
12 But this isn't the reason. Harddrives know a "flush" command which -
13 when properly used by the filesystem (and I guess reiserfs and ext3
14 use it properly) - forces the journal to be written before the actual
15 change in the main file system occurs. Whence, no loss of consistency.
16 [Of course, there are some harddrives which ignore the "flush", but
17 this should be counted as faulty hardware. Of course, on broken
18 hardware, no software can work as it should.]
19
20 If the power loss occurs *during* flushing the journal (and thus
21 the journal might contain nonsense) the filesystem might still use
22 a checksum over the journal to detect this and thus preserves
23 consistency (although I don't know whether any existing filesystem
24 currently does this).
25
26 The real problem is that during power cut the harddrive might be
27 writing complete nonsense *somewhere* - this is not related with
28 any caching, and no software can safe you from this problem
29 (and what is even worse is that there is no way to detect it...)
30 --
31 gentoo-user@l.g.o mailing list