public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Add a norecovery option to ext3/4?
@ 2007-04-09  0:05 Samuel Thibault
  2007-04-09  3:24 ` Eric Sandeen
  2007-04-09 15:43 ` Phillip Susi
  0 siblings, 2 replies; 24+ messages in thread
From: Samuel Thibault @ 2007-04-09  0:05 UTC (permalink / raw)
  To: linux-ext4, linux-kernel

Hi,

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.

Samuel

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: Add a norecovery option to ext3/4?
@ 2007-05-03  9:07 Tomasz Chmielewski
  0 siblings, 0 replies; 24+ messages in thread
From: Tomasz Chmielewski @ 2007-05-03  9:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: davidsen

Bill Davidsen wrote:

> I wonder what happens if the device is really read-only and the o/s 
> tries to replay the journal as part of a r/o mount? I suspect the system 
> will refuse totally with an i/o error, not what you want.

I exported a ext3 volume via iSCSI, in read-only mode.
It is mounted on the iSCSI target already, so it makes sense to mount it 
*really* read-only on iSCSI initiator.

It is accessible to the iSCSI initiator as /dev/sdat - let's try to use it:


# mount /dev/sdat /mnt/1
mount: block device /dev/sdat is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdat,
        missing codepage or other error
        In some cases useful info is found in syslog - try
        dmesg | tail  or so


# dmesg -c
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access unavailable, cannot proceed.



So, no go.

What about ext2 mount?

# mount -t ext2 /dev/sdat /mnt/1
mount: block device /dev/sdat is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdat,
        missing codepage or other error
        In some cases useful info is found in syslog - try
        dmesg | tail  or so

# dmesg -c
EXT2-fs: sdat: couldn't mount because of unsupported optional features (4).

Still, we're not able to mount the partition.


Now, we umount it on iSCSI target, and try to mount it again on the 
initiator - ext3 works:

# mount /dev/sdat /mnt/1
mount: block device /dev/sdat is write-protected, mounting read-only


ext2 works, too:

# umount /mnt/1
# mount -t ext2 /dev/sdat /mnt/1
mount: block device /dev/sdat is write-protected, mounting read-only


So, the only way to see data from an already mounted ext3 partition is 
(iSCSI target exports it to multiple iSCSI initiators):

- export it read-only
- umount it
- mount it as ext2
- mount on iSCSI initiators as either ext2 or ext3 (will be forced 
read-only)


Or:

- export it as read-only
- mount on iSCSI initiators as either ext2 or ext3 (will be forced 
read-only)
- mount it as ext3 on iSCSI target


Both ways can be certainly unwanted in some cases.


Certainly, I would like the "norecovery" option.



-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2007-05-03  9:08 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-09  0:05 Add a norecovery option to ext3/4? Samuel Thibault
2007-04-09  3:24 ` Eric Sandeen
2007-04-09  3:31   ` Samuel Thibault
2007-04-09  3:42     ` Eric Sandeen
2007-04-09 14:00       ` Theodore Tso
2007-04-09  4:29   ` Brad Campbell
2007-04-09 10:14   ` Andreas Dilger
2007-04-09 13:42   ` Valdis.Kletnieks
2007-04-09 16:37   ` Jan Engelhardt
2007-04-11 20:06   ` Pavel Machek
2007-04-09 15:43 ` Phillip Susi
2007-04-09 16:20   ` Kyle Moffett
2007-04-09 17:21   ` Eric Sandeen
2007-04-10  7:22     ` Jörn Engel
2007-04-10 11:27       ` Theodore Tso
2007-04-10 12:08         ` Jörn Engel
2007-04-10 16:44           ` Matt Mackall
2007-04-10 18:54     ` Phillip Susi
2007-04-10 19:18       ` Eric Sandeen
2007-04-10 22:04         ` Phillip Susi
2007-04-11 20:09         ` Bill Davidsen
2007-04-12 13:54           ` Benny Amorsen
2007-04-15 18:49           ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2007-05-03  9:07 Tomasz Chmielewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox