2009-01-27 13:42:35

by Nick Warne

[permalink] [raw]
Subject: [QUESTION] root ext4 strange couldn't mount/can mount report

Hi all,

kernel 2.6.28.2
Slamd64 (Slackware 64bit port).

I have been running my /home partition as ext4 for a few weeks, and it
works very well, so today I converted / root partition over too.

All works great, but I saw I was getting a funny error/no error
reported in syslog:

Jan 27 12:54:57 sauron kernel: EXT3-fs: sda2: couldn't mount because of unsupported optional features (40).
Jan 27 12:54:57 sauron kernel: VFS: Mounted root (ext4 filesystem) readonly.

i.e. root / -> /dev/sda2 couldn't mount, but it does mount, and system
boots normally and functions fine.

Reading up I found that passing rootfstype=ext4 to kernel fixes up this
warning/error, but it appears only to apply to initramfs, of which I
do not use.

Searching boot scripts, I can find no mention of ext3 mounts.

Any ideas what makes the kernel try to mount the / as ext3? Is it a
kernel build option I missed?

Thanks,

Nick
--
Free Software Foundation Associate Member 5508
http://linicks.net/


2009-01-27 14:14:30

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [QUESTION] root ext4 strange couldn't mount/can mount report

On Tue, Jan 27, 2009 at 01:42:31PM +0000, Nick Warne wrote:
>
> Jan 27 12:54:57 sauron kernel: EXT3-fs: sda2: couldn't mount because of unsupported optional features (40).
> Jan 27 12:54:57 sauron kernel: VFS: Mounted root (ext4 filesystem) readonly.
>
> i.e. root / -> /dev/sda2 couldn't mount, but it does mount, and system
> boots normally and functions fine.

That's normal; what happens is that the kernel tries to mount it as
ext3 first, which takes a pass since it can't support certain
filesystems features, and then ext4 mounts it. The ext4 filesystem
code will happily mount an ext3 filesystem, so that's why the kernel
tries ext3 first. The idea is that for people who are conservative,
and have some filesystems using ext3 and some using ext4 (to try out,
for example), and then they compile a kernel with both ext3 and ext4,
if the root filesystem only has ext3 features, it should be mounted
with ext3, not ext4; so the kernel tries ext3 first. If however, you
do not compile in ext3 support, the ext4 filesystem code will happily
mount an ext3 filesystem --- and in the latest 2.6.29-rc series, the
ext4 filesystem code can even happily mount an ext2 filesystem.

You will get some of the advantages of ext4's delayed allocation
support with ext2/ext3 filesystems, and it would also allow you to
only have one extX filesystem compiled into the kernel. But of
course, ext4 is still relatively new, and some people like to be
conservative with their filesystem choices, and so that's why it's
unlikely the ext3 filesystem code will be disappearing from the
kernel, even though the ext4 filesystem code is a superset of ext3's
functionality.

- Ted


2009-01-27 14:37:17

by Nick Warne

[permalink] [raw]
Subject: Re: [QUESTION] root ext4 strange couldn't mount/can mount report

On Tue, 27 Jan 2009 09:14:26 -0500
Theodore Tso <[email protected]> wrote:

> On Tue, Jan 27, 2009 at 01:42:31PM +0000, Nick Warne wrote:
> >
> > Jan 27 12:54:57 sauron kernel: EXT3-fs: sda2: couldn't mount
> > because of unsupported optional features (40). Jan 27 12:54:57
> > sauron kernel: VFS: Mounted root (ext4 filesystem) readonly.
> >
> > i.e. root / -> /dev/sda2 couldn't mount, but it does mount, and
> > system boots normally and functions fine.
>
> That's normal; what happens is that the kernel tries to mount it as
> ext3 first, which takes a pass since it can't support certain
> filesystems features, and then ext4 mounts it. The ext4 filesystem
> code will happily mount an ext3 filesystem, so that's why the kernel
> tries ext3 first.

Hi Ted,

I see. I currently build ext3 in the kernel (as well as ext4), as
I keep /boot partition ext3 for bootloader lilo.

So I can remove ext3 now, and lilo and kernel ext4 will happily read
and use /boot partition as ext3 OK?

Nick
--
Free Software Foundation Associate Member 5508
http://linicks.net/

2009-01-27 15:37:11

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [QUESTION] root ext4 strange couldn't mount/can mount report

On Tue, Jan 27, 2009 at 02:37:14PM +0000, Nick Warne wrote:
>
> I see. I currently build ext3 in the kernel (as well as ext4), as
> I keep /boot partition ext3 for bootloader lilo.
>
> So I can remove ext3 now, and lilo and kernel ext4 will happily read
> and use /boot partition as ext3 OK?

The only thing which might not work is automatic type detection with
mount. That is, if you specify:

mount /dev/hda1 /boot

without specifying a filesystem type, /bin/mount will probably do an
automatic type detection, detect that the filesystem is an ext3
filesystem, and attempt to mount it as ext3, and not know to try it
with ext4. Libraries such as blkid and fsid could be made smart
enough to do the right thing, but they don't at the moment.

But if you type "mout -t ext4 /dev/sda1 /boot", you can mount an ext3
filesystem using the ext4 filesystem driver, and with 2.6.29 and up,
you'll be able to mount ext2 filesystems using the ext4 filesystem
code. (You'll also be able to create extent-based filesystems without
a journal, which is why Google contributed the support for this.)

- Ted

2009-01-27 15:45:09

by Nick Warne

[permalink] [raw]
Subject: Re: [QUESTION] root ext4 strange couldn't mount/can mount report

On Tue, 27 Jan 2009 10:37:06 -0500
Theodore Tso <[email protected]> wrote:

> On Tue, Jan 27, 2009 at 02:37:14PM +0000, Nick Warne wrote:
> >
> > I see. I currently build ext3 in the kernel (as well as ext4), as
> > I keep /boot partition ext3 for bootloader lilo.
> >
> > So I can remove ext3 now, and lilo and kernel ext4 will happily read
> > and use /boot partition as ext3 OK?
>
> The only thing which might not work is automatic type detection with
> mount. That is, if you specify:
>
> mount /dev/hda1 /boot
>
> without specifying a filesystem type, /bin/mount will probably do an
> automatic type detection, detect that the filesystem is an ext3
> filesystem, and attempt to mount it as ext3, and not know to try it
> with ext4. Libraries such as blkid and fsid could be made smart
> enough to do the right thing, but they don't at the moment.
>
> But if you type "mout -t ext4 /dev/sda1 /boot", you can mount an ext3
> filesystem using the ext4 filesystem driver, and with 2.6.29 and up,
> you'll be able to mount ext2 filesystems using the ext4 filesystem
> code. (You'll also be able to create extent-based filesystems without
> a journal, which is why Google contributed the support for this.)
>
> - Ted

Many thanks Ted - you cleared up the 'missing link' in any of the docs I
could find.

Nick
--
Free Software Foundation Associate Member 5508
http://linicks.net/