LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Mount of ext4 (created without extents) as ext3 fails on RH6.2 (https://www.linuxquestions.org/questions/red-hat-31/mount-of-ext4-created-without-extents-as-ext3-fails-on-rh6-2-a-936813/)

kavya. 03-28-2012 02:12 AM

Mount of ext4 (created without extents) as ext3 fails on RH6.2
 
My objective is to mount ext4 as ext3 on RH6.2 .Since this operation will not be possible if ext4 is created to make use of extents feature, I created ext4 by explicitly specifying not to use extents. Here on I was expected a smooth sail, but hitting error when I'm trying to do mount operation. Here are the log messages.


mke2fs -t ext4 -O ^extent /dev/sdd1


- I verified if the file system is created without extents by mounting sdd1 as ext4 type and creating a file in the mount. The file does not use extents.


root@fbi5 ~]# lsattr /pkg01a
--------------- /pkg01a/kav.txt


- The file system is clean as verified by fsck.
- After doing umount and other cleanup, I tried mounting ext4 as ext3.

[root@fbi5 ~]# mount -t ext3 -o rw /dev/sdd1 /pkg01a
mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@fbi5 ~]#
[root@fbi5 ~]#
[root@fbi5 ~]# dmesg | tail
EXT3-fs (sdd1): error: couldn't mount because of unsupported optional features (200).


What does the error number 200 stand for? How can I correct this situation ? Any help regarding this will be greatly appreciated.

syg00 03-28-2012 02:41 AM

And why do you want to do this ?. It is not only extents that make ext4 no longer mountable as ext3.

Create as ext3 and mount as ext4 is the safe way to ensure you get the best of both worlds without sacrificing the ability to mount as either.

kavya. 03-28-2012 03:03 AM

I'm trying to do this activity to confirm the support for mounting ext4 to ext3. Our product which is planned to get shipped on RH6.2 needs to get tested on ext4 mounted as ext3. Once I validate this behavior, it gets listed in our release notes as a valid scenario.
I get your point that.

Could you tell me which are those features apart from extents which will not allow ext4 being mounted as ext3 ?

druuna 03-28-2012 04:06 AM

Hi,

To find out which filesystem features are present you can use:
Code:

dumpe2fs /dev/sdd1 | grep "Filesystem features"
Running that command on an ext3 fs shows the following:
Code:

Filesystem features:      has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
An ext4 fs shows:
Code:

Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir nlink extra_isize
Bold parts are unique for ext4 compared to ext3.

Hope this helps.

syg00 03-28-2012 04:26 AM

Ext4 is not the moribund product that many thought it was destined to become once btrfs came out.
Things are still changing.

This is a really bad policy IMHO.

kavya. 03-29-2012 07:51 AM

Thanks druuna and syg00 for your replies.
I used dumpe2fs command to find out the additional features used by ext4. Excluded those new ones while creating ext4 file system.
mount passed successfully.

kavya. 04-09-2012 02:20 AM

Further to the suggestions, though mount command passed successfully, I found another problem.

I created ext4 as following:(by excluding all features not supported by ext3)
mke2fs -t ext4 -O ^extent,^flex_bg,^huge_file,^uninit_bg,^dir_nlink,^extra_isize /dev/vg_dd1/lvol0

I checked the filesystem type getting created(blkid /dev/vg_dd1/lvol0) it was ext3 but not ext4.

Alternately if I try excluding any of the features say,
mke2fs -t ext4 -O ^extent,^flex_bg,^huge_file,^uninit_bg,^dir_nlink /dev/vg_dd1/lvol0

Filesystem getting created is ext4 but mount as ext3 is failing with the following error:


mount -t ext3 /dev/vg_dd1/lvol0 /new_pkg
mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg_dd0-lvol0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@fbi7 ~]# dmesg | tail
EXT3-fs (dm-0): error: couldn't mount RDWR because of unsupported optional features (40)

-----
So either ways I’m not able to achieve the objective.
Let me know your inputs on this.

kavya. 04-09-2012 07:37 AM

Could anybody help me in resolving this.
Let me know if you need additional details.

druuna 04-09-2012 08:11 AM

Hi,

To be frank I think this issue is already resolved.

Quote:

Originally Posted by kavya.
Our product which is planned to get shipped on RH6.2 needs to get tested on ext4 mounted as ext3. Once I validate this behavior, it gets listed in our release notes as a valid scenario.

This is a invalid scenario, put it down as such.

Out of the box this will not work and even if (!!!) you would get this to work you (or others that have to implement the product) need to hack a stable system. Definitely not something I would want/allow.

I would follow syg00's advise:
Quote:

Create as ext3 and mount as ext4 is the safe way to ensure you get the best of both worlds without sacrificing the ability to mount as either.
Not what you wanted to read, I'm sure. But I hope this helps anyway.

kavya. 04-09-2012 02:34 PM

Thanks. Could anybody help me a little more in understanding this.

The wiki page for ext4 also mentions this - ext3 is partially forward compatible with ext4. That is, ext4 can be mounted as ext3 (using "ext3" as the filesystem type when mounting. However, if the ext4 partition uses extents (a major new feature of ext4), then the ability to mount as ext3 is lost.).

What does claims like this convey ?. This seems a contradiction to what druuna is suggesting.(Though this makes sense)


All times are GMT -5. The time now is 01:28 PM.