1

I have a somewhat bizzare problem at the moment with my Debian-system (mainly testing).

I used to have a root-partition on lvm that was formatted as ext3.

I now booted a live-system and converted the ext3 into ext4 (via tune2fs...) and also did a fsck.ext4. In the live-system I can mount the partition as ext4.

Then I changed the entry in /etc/fstab from ext3 to ext4 and rebooted my Debian.

The problem is that the partition (even though it says ext4 in /etc/fstab) seems still be to mounted as ext3 - at least that is what mount says.

When I try to determine the filesystem-type I get inconsistent results:

fsck -N reports ext4:

sudo fsck -N /dev/mapper/hed-root 
fsck from util-linux 2.20.1
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 /dev/mapper/hed-root 

but blkid says ext3

sudo blkid -o value -s TYPE /dev/mapper/hed-root 
ext3

As I said the filesystem resides in a lvm-volume. I changed nothing there.

What can I do to resolve this?

Many thanks!

morgon
  • 11
  • 1
  • "at least that is what mount says" – :-) The truth is hidden in `cat /proc/mounts`. Can you mount other volumes as ext4? How old is the kernel? Does the initrd maybe need explicit ext4 support? – Hauke Laging May 07 '13 at 00:51
  • In /proc/mounts: /dev/mapper/hed-root / ext3 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0 – morgon May 07 '13 at 01:00
  • Kernel is 3.2.0 – morgon May 07 '13 at 01:01
  • What is the output of `dumpe2fs -h /dev/mapper/hed-root | grep "^Filesystem features:"`? I guess your `tune2fs` operation has failed (what exactly did you do with it?) because in case of success the volume would be supposed to not be mountable any more as ext3 at all. – Hauke Laging May 07 '13 at 01:13
  • Yeah agree with Hauke, as ext4 is not back ported after successful conversion and would never be able to mount as ext3, looks like something went wrong. – Danila Ladner May 07 '13 at 01:20
  • Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file – morgon May 07 '13 at 01:20
  • I tried to add ext4 to /etc/initramfs-tools/modules, ran update-initramfs -u and rebooted but to no avail – morgon May 07 '13 at 01:21
  • It wasn't there before; what lsmod | grep "ext4" shows once logged in? – Danila Ladner May 07 '13 at 01:25
  • It seems to me that the relevant features are `extents` and `uninit_bg`. Yours are available with ext3, too. So run `tune2fs` again (`-O extents,uninit_bg`) and check with `dumpe2fs` afterwards. – Hauke Laging May 07 '13 at 02:46

2 Answers2

1

blkid might still be using old cache entry for that LV.

You can make sure that blkid is reporting correct information by bypassing cache:

sudo blkid -p /dev/mapper/hed-root

Also can do a garbage collection pass on cache:

sudo blkid -g /dev/mapper/hed-root

Hope this helps.

Danila Ladner
  • 5,241
  • 21
  • 30
  • blkid -p (after garbage collection) reports "/dev/mapper/hed-root: UUID="9a8d1cc1-3dba-4fc7-9329-45fba5ff3f7e" VERSION="1.0" TYPE="ext3" USAGE="filesystem" " – morgon May 07 '13 at 01:03
  • Oh i did not see this one: In /proc/mounts: /dev/mapper/hed-root / ext3 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0 . Can you do "mount -o rw,remount,defaults /dev/mapper/hed-root /"? – Danila Ladner May 07 '13 at 01:10
  • I ran the remount, no errors but changes nothing. – morgon May 07 '13 at 01:15
0

Based on your filesystem features output, you didn't actually convert your filesystem to ext4.

To resolve the issue, convert the filesystem to ext4. Reboot your live CD and run the appropriate commands:

tune2fs -O extents,uninit_bg,dir_index /dev/mapper/hed-root
e2fsck -fDC0 /dev/mapper/hed-root

(Note that the ext4 driver is capable of mounting ext2 and ext3 filesystems, which is why your system is currently usable.)

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940