Russell Cattelan wrote:
> "Stephen C. Tweedie" wrote:
> > Hi,
> > On Wed, Apr 05, 2000 at 03:11:44PM -0400, Lyle Seaman wrote:
> > >
> > > How does a readonly filesystem become inconsistent?
> > > (esp: "how does ext3 on readonly media" become inconsistent?)
> > >
> > > The obvious answer is "well, it *wasn't* readonly when it
> > > became inconsistent".
> > >
> > > If that's the case, then why do you care? Naively, I wouldn't
> > > think this is a big deal. Why am I wrong?
> > Because (a) existing Linux installations expect to mount the
> > root filesystem readonly until basic consistency checking has
> > been done; and (b) after a cold reboot, the filesystem will
> > need recovery before it can be mounted.
> > In practice there is no problem mounting the root filesystem
> > read-write if you have journaling, with one important exception:
> > if you detect actual errors on the fs such that a constency
> > check is required, mounting the fs read-write is dangerous.
> > (Ext2/ext3 mark an error flag in the superblock if they detect
> > dangerous inconsistencies in the fs so that a subsequent fsck
> > will be forced. I don't know if xfs does this or not.)
> XFS doesn't actually try to detect file system inconstancies at mount
> (this would defeat quick recovery)
> If it can successfully replay the the log and complete all outstanding
> data requests it assumes the file system is clean, if not it simply
> If at any time a live XFS file system detects and error XFS will
> immediately halt
> all IO to the device. It is then up to the administrator to do manual
> checks and
> or repairs.
Linux mount root fs read-only during boot so that it could do a fsck
the boot up process to make it consistance automatically (well, as far as
possible that is.) I believe mounting XFS read-write has the same effect.
But, it would be good to define under what condition/situation would a
XFS fs be in-consistance and under that condition, is it possible to fsck
it if it is mounted read-write or read-only.