Re: Add a norecovery option to ext3/4?

Phillip Susi wrote:
Samuel Thibault wrote:

Distribution installers usually try to probe OSes for building a suited
grub menu. Unfortunately, mounting an ext3 partition, even in read-only
mode, does perform some operations on the filesystem (log recovery).
This is not a good idea since it may silently garbage data. XFS has a
norecovery option that allows to disable that, I'd say ext3/4 should
have it too.

When the filesystem is told to mount the disk read only, that means it
should not write to it.

It means the filesystem should not be writeable when it is mounted.
This is not the same as saying that the filesystem itself should do no
IO in the course of making that read-only mount available.

The fact that ext3 goes ahead and does anyway
is a bug and should be fixed. There is no need for a norecovery option,
because read only is a sufficient directive to tell the filesystem not
to write to the disk.

I respectfully disagree, see above.

As someone else pointed out, this behavior causes havoc if you hibernate
a system and then boot up another system which mounts the disk of the
hibernated system.

In that case you are mounting the same filesystem uner 2 different
operating systems simultaneously, which is, and always has been, a
recipe for disaster. Flagging the fs as "mounted already" would
probably be a better solution, though it's harder than it sounds at
first glance.

Under all conditions it should be safe to mount a
disk read only, but here it is not because the journal playback trashes
the disk out from under the hibernated system.

Under all conditions it should be safe to mount a read-only block
device, but that is not the same as mounting a filesystem read-only.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at

Relevant Pages

  • cannot boot-up linux, unable to read superblock
    ... mount: error 22 mounting ext3 ... enable lvm and tried fsck for the volumes (one is empty volume? ... Attempt to read block from filesystem resulted in short read while trying to open /dev/VolGroup00/LogVol00 ...
  • Re: multi volume with tar
    ... a disk definitely won't result in a filesystem-like structure. ... won't mount that floppy. ... You *never* write to the raw device node of a mounted filesystem ... because writing directly to the device mangled the ...
  • Re: USB stick access freezing up system?
    ... would expect the application to fail, but the stick is just a mount in ... How can it corrupt a filesystem on a device that's been removed? ... corruption of its filesystem, ... I have transported an MFM disk that had not been parked with the ...
  • Hints for precision benchmarking...
    ... and run into the usual problem of noisy data preventing any ... * Don't mount filesystems you do not need. ... This removes atime updates to disk from your I/O picture. ... This results in a consistent filesystem layout. ...
  • Re: having trouble mounting disk image on loopback device
    ... a dd image taken from a physical disk. ... Therefore, to mount each partition, I used these commands: ... mount command will not suffice...For that matter, ... The device must contain a filesystem recognizable ...