Bug 55495 - Can't (re)mount ext3 with data=writeback or journal
Summary: Can't (re)mount ext3 with data=writeback or journal
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Stephen Tweedie
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-01 10:26 UTC by fred-m
Modified: 2007-04-18 16:37 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-07-08 13:21:16 UTC
Embargoed:


Attachments (Terms of Use)

Description fred-m 2001-11-01 10:26:05 UTC
Description of problem:
I can't (re)mount my root file system with data=writeback or data=journal, 
only with data=ordered (BTW, the root file system is my only ext3 
partition, so it's the only one that I have to test).

Example:
[fred@tornado kernel]# mount -o remount,data=ordered /
[fred@tornado kernel]# mount -o remount,data=writeback /
mount: / not mounted already, or bad option
[fred@tornado kernel]# mount -o remount,data=journal /
mount: / not mounted already, or bad option

Also, adding "data=writeback"  or "data=journal" to the / (root 
filesystem) entry in /etc/fstab results in the same error on boot when the 
file system is to be re-mounted read-write (it remains read-only).

BTW, I have all updates up to November 1st. (Also: I specified mount as 
the component, but the problem could be in the kernel).

How reproducible:
Always

Steps to Reproduce:
Run the commands above. Or, specify "data=writeback" or "data=journal" 
to /etc/fstab and reboot.

Comment 1 Todd Warner 2001-12-07 20:15:05 UTC
Reproduced on my 7.2 machine. 
[taw@trixie taw]$ uname -a
Linux trixie.meridian.redhat.com 2.4.9-13smp #1 SMP Tue Oct 30 19:57:16 EST 2001
i686 unknown

I simply added data=journal to my /etc/fstab (for the / partition) and got
simular results. And therefore boot process fails.



Comment 2 Stephen Tweedie 2001-12-07 20:40:43 UTC
Right --- changing the data mode after mount is not a supported function.  All
sorts of things can go wrong if you change journal semantics live while the
filesystem is running.

Having said that, there _is_ locking inside ext3 which would help to achieve
this: we'd have to suspend the entire filesystem, sync everything to disk, flush
the cache, flush the journal, and _then_ change the mode, but it should be
possible.  

I'll re-categorise this as a RFE (request for enhancement), but it's not an ext3
bug.

Comment 3 fred-m 2001-12-09 06:44:06 UTC
First of all, thanks!!! This explains everything.

IMHO, two things need to be done before we touch ext3 itself:
- Improving the documentation ("mount" manual, Red Hat web site, etc.), to say 
that "changing the data mode after mount is not (yet) a supported function".
- Include a selection of the mode in the Red Hat installer (on "expert" mode 
*only*), in case ext3 is not enchanced until the next release.


Comment 4 Craig Lawson 2002-02-05 21:18:02 UTC
In response to the comment by sct on 12/17: in the general case, all the stuff
you mentioned (sync & flush) would need to take place. But in the specific case
of remounting / during boot-up, it doesn't really apply because / was mounted
read-only! Even the default mode of "data=ordered" isn't necessary because
nothing will be written to the disk. Clever observation, I must say, and it's
too bad I can't take credit for it myself: I found in on the vger.kernel.org
mail list.

There is a secondary problem in that after the remount fails, the other file
systems are mounted normally but "mount" will not show them as mounted
(mount-2.11g).

For the reader who finds themself unable to boot because of a non-default mount
option for their root file system, yet somehow able to read this bug report, you
can get out of your predicament this way:
  1. Reboot linux in "single" mode.
  2. Remount / with: mount -t ext3 -o defaults,remount,rw /dev/hda5 /
     (change /dev/hda5 as appropriate). If you don't spell out the options,
     some versions of mount try to get them from /etc/fstab.
  3. Edit /etc/fstab to remove "data=journal" for /
  4. Reboot.

I have all of my file systems as ext3, and / is the only one I have this trouble
with. /boot is OK as data=journal.


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