On 23/02/2009 20:16, NeilBrown wrote:
On Tue, February 24, 2009 6:53 am, Doug Ledford wrote:
Is XFS the only one that does the journal recovery on initial mount
read-only during the initfs step, or do other journaled fses do the same
thing? I didn't think ext3 recovered the journal until you switch to a
read-write mount, but I guess I could be wrong.
This from fs/ext3/super.c
if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER)) {
if (sb->s_flags & MS_RDONLY) {
printk(KERN_INFO "EXT3-fs: INFO: recovery "
"required on readonly filesystem.\n");
if (really_read_only) {
printk(KERN_ERR "EXT3-fs: write access "
"unavailable, cannot proceed.\n");
return -EROFS;
}
printk (KERN_INFO "EXT3-fs: write access will "
"be enabled during recovery.\n");
}
}
suggests that, unfortunately, you are.
Presumably it's not only me that thinks this is insane? If I want to
mount a filesystem read-only, I expect it to be mounted read-only;
perhaps I already know it's damaged, or know the journal's damaged...
I guess I can see the journal recovery normally being the right thing,
and it is the filesystem we asked to have read-only not the disc, but
still there surely has to be a way of saying mount without journal
recovery, or mount without writing to disc, or both, and if there isn't
who do I ask to implement it? (I'm way too rusty as a coder to trust
myself to get it even half right.)
I wonder: in the case of ext3 can I mount it as ext2 and thereby have
the journal ignored rather than recovered? And would this be sufficient
for the initrd context?
Cheers,
John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html