# error: couldn't mount because of unsupported optional featur

## Helena

I have been using ext4 as a filesystem for some time now and experienced no problems so far. However a bootup message puzzles me. Here's my disk layout. I have 2 disks, sda and sdb. Only sdb is relevant to this topic and it's subdivided into 1 primary partition and a couple of logical partitions as follows (printed from cfdisk):

```
Partition Table for /dev/sdb

               First       Last

 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag

-- ------- ----------- ----------- ------ ----------- -------------------- ----

 1 Primary           0   915337215*    63   915337216*HPFS/NTFS/exFAT (07) None

   Pri/Log   915337216*  915339261*     0        2046*Free Space           None

 2 Primary   915339262*  976771071*     0    61431810*Extended (05)        None

 5 Logical   915339262*  915542015*     2#     202754*Linux (83)           None

 6 Logical   915542016*  936046591*  2048#   20504576*Linux (83)           None

 7 Logical   936046592*  936249343*  2048#     202752*Linux (83)           None

 8 Logical   936249344*  956755967*  2048#   20506624*Linux (83)           None

 9 Logical   956755968*  956948479*  2048#     192512*Linux (83)           None

10 Logical   956948480*  976771071*  2048#   19822592*Linux (83)           None

   Pri/Log   976771072*  976773167*     0        2096*Free Space           None

```

Now I have formatted /dev/sdb1 with NTFS, and the other partitions with ext* filesystems:sdb5: ext2sdb6: ext4sdb7: ext2sdb8: ext4sdb9: ext2sdb10: ext4

my /etc/fstab has been modified to reflect this

```
# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>                  <mountpoint>            <type>          <opts>                  <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sdb8               /                       ext4            noatime                 0 1

/dev/sdb7               /boot                   ext2            noatime                 1 2

# /dev/SWAP             none                    swap            sw                      0 0

# /dev/cdrom            /mnt/cdrom              auto            noauto,ro               0 0

#/dev/fd0               /mnt/floppy             auto            noauto                  0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm                tmpfs           nodev,nosuid,noexec     0 0

/dev/sdb6               /mnt/gentoo             ext4            noauto,noatime          0 0

/dev/sdb5               /mnt/gentoo/boot        ext2            noauto,noatime          0 0

/dev/sdb10              /mnt/Ubuntu             ext4            noauto,noatime          0 0

/dev/sdb9               /mnt/Ubuntu/boot        ext2            noauto,noatime          0 0
```

ext4 is definitely supported:

```
TitanGentoo2 ~ # cat /proc/filesystems 

nodev   sysfs

nodev   rootfs

nodev   bdev

nodev   proc

nodev   tmpfs

nodev   binfmt_misc

nodev   sockfs

nodev   pipefs

nodev   anon_inodefs

nodev   devpts

        ext3

        ext2

        ext4

nodev   ramfs

nodev   hugetlbfs

        vfat

        msdos

        iso9660

        ntfs

nodev   autofs

        udf
```

Now why is it that the system always first tries to mount sdb8 with ext3, then ext2 and only then ext4? Watch my dmesg:

```
[    0.967945] scsi 2:0:0:0: Direct-Access     ATA      SAMSUNG HD501LJ  CR10 PQ: 0 ANSI: 5

[    0.968453] sd 2:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)

[    0.968698] sd 2:0:0:0: [sdb] Write Protect is off

[    0.968847] sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00

[    0.968858] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

[    1.047743]  sdb: sdb1 sdb2 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 >

[    1.048523] sd 2:0:0:0: [sdb] Attached SCSI disk

[    1.066734] EXT3-fs (sdb8): error: couldn't mount because of unsupported optional features (240)

[    1.075312] EXT2-fs (sdb8): error: couldn't mount because of unsupported optional features (240)

[    1.100967] EXT4-fs (sdb8): mounted filesystem with ordered data mode. Opts: (null)

[    1.101213] VFS: Mounted root (ext4 filesystem) readonly on device 8:24.

```

----------

## Randy Andy

Hoi Helena.

It's few month and kernel versions ago, i've had the same messages seen on some of my boxes.

As far as i remember, it depends to the kernel.config or the kernel version you are using.

To get rid of this messages, you have to config your kernel like this way:

```

Use ext4 for ext2/ext3 file systems (EXT4_USE_FOR_EXT23)

CONFIG_EXT4_USE_FOR_EXT23:

Allow the ext4 file system driver code to be used for ext2 or

ext3 file system mounts. This allows users to reduce their

compiled kernel size by using one file system driver for

ext2, ext3, and ext4 file systems.

Symbol: EXT4_USE_FOR_EXT23 [=n]

Type : boolean

Prompt: Use ext4 for ext2/ext3 file systems

Defined at fs/ext4/Kconfig:29

Depends on: BLOCK [=y] && EXT4_FS [=y] && (EXT3_FS [=y]=n || EXT2_FS [=y]=n)

Location:

-> File systems

-> The Extended 4 (ext4) filesystem (EXT4_FS [=y])

```

But it's not a fault, only a hint.

If you say yes to this option, you should be able to deselect seperate FS3 and FS2 support modules to reduce kernel size.

But you are able furthermore to mount these filesystems.

Can't remember where i read this, eventually in a kernel change.log.

Regards, Andy.

----------

## Helena

Andy,

You're right, this solves the "problem". I had to deselect ext3 support (or ext2 support, or both) in the kernel config before this option became visible. Still, it does not explain why a filesystem that is clearly marked as ext4 is first tried with other filesystems...

Regards,

Andre.

----------

## Randy Andy

Hi Andre,

fine that i could help you.

You're right with your statement. 

Eventually its the preferred way of the dev.  to make us aware of these changes AFAIR. That's why i told, its not a fault, only a hint.

AFAIK this hints not longer given in later kernel versions (2.6.38x), although if you're using the same old .config.

Seems not longer necessary, cause now we're knowing that new option to support old ext 2+3 version with only one downward compatible module for ext4   :Wink: 

Best regards, Andy.

----------

