Bug 13992 - ext3 data=ordered in fstab prevents booting
Summary: ext3 data=ordered in fstab prevents booting
Status: RESOLVED INVALID
Alias: None
Product: File System
Classification: Unclassified
Component: ext3 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jan Kara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-16 00:46 UTC by Roger
Modified: 2009-08-19 15:52 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.30.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Roger 2009-08-16 00:46:12 UTC
I ran into a problem when, when setting CONFIG_EXT3_DEFAULTS_TO_ORDERED=n, the system will not complete booting when data=ordered is set on the root filesystem within /etc/fstab.

(Can't remember the exact debug output as I've been muddling over possible e100.c system freezes.)


Some work quick hacks that may help resolve are, fsck the filesystem and removing the filesystem option from the /etc/fstab file.


This will likely occur with people upgrading from 2.6.29 to 2.6.30 with the data=ordered filesystem option set in fstab.

(I personally like a more stable filesystem, so I've set CONFIG_EXT3_DEFAULTS_TO_ORDERED=y due a more severe bug I was tracking down in 2.6.30 concerning e100.c)
Comment 1 Jan Kara 2009-08-19 12:46:59 UTC
Oh, I see what's the problem: You cannot change journalling mode on remount. So if by default a filesystem gets mounted as data=writeback, then mount remounting the fs rw fails because it specifies data=ordered from /etc/fstab. Sorry, this is a userspace issue - either you have to specify rootflags=data=ordered or you should use initrd and initially mount the filesystem with proper options.

I understand this might be nasty to users but there's no better solution...
Comment 2 Eric Sandeen 2009-08-19 15:02:57 UTC
FWIW, the kernel does at least hint at what the error is:

    EXT3-fs: cannot change data mode on remount

though it won't be obvious to everyone that root gets remounted at boot time.

-Eric
Comment 3 Roger 2009-08-19 15:26:49 UTC
Jan Kara: Ditto. Nasty to naive users, which pretty much means every ext3 user who believes in the safety of data=ordered option, but who are likely not extfs developers.

Yes, the kernel at least hints, but this means users need to also know how to read dmesg output.

IMO, stuff should be the other way around and CONFIG_EXT3_DEFAULTS_TO_ORDERED should default to yes, rather then cutting something & breaking box configurations.  Printing repetative warnings during mounting with options could also be extremely effective.

Another option, would be to deactivate or rename the filesystem mount option, avoiding the remount in that mode.

<shrugs>
Comment 4 Jan Kara 2009-08-19 15:52:04 UTC
OTOH, to hit this problem, you have to
a) explicitly specify data=ordered in your /etc/fstab
b) compile your own kernel without CONFIG_EXT3_DEFAULTS_TO_ORDERED
c) don't use initrd

So b) and c) pretty much rules out naive users of a distro and a) rules out most of users as well. I'd at least hope that users able to do b) are also able to read kernel messages, although I agree with you and Eric that understanding what to do based on the ext3 error message is non-trivial. Maybe we could improve the message to write something like:
"EXT3-fs: Cannot change data mode on remount. Current mode is data=<foo> and you try to remount with data=<bar>."
I'd hope that user seeing this would be able to inspect his /etc/fstab / kernel configuration and act accordingly...

Regarding CONFIG_EXT3_DEFAULTS_TO_ORDERED, I also feel it should be on by default but I don't have the guts to argue with Linus about this.

Note You need to log in before you can comment on or make changes to this bug.