Migrating from Ext3 to Ext4
The first stable version of ext4 is already out and probably a lot of you want to test it a little bit, so I write this article for a smooth conversion from Ext3 to Ext4.
Is possible to have incompatibilities between your GRUB and ext4. Only latest version of Grub supports ext4. So is more healthy to have a /boot partition with Ext3 file system installed.
First time check if your tools and your kernel support ext4. Look at e2fsprogs version 1.41.3 or later and at your kernel if you have ext4dev (I recommend 2.6.28).
Also if you are tring to mount your root filesystem as ext4 through initramfs is possible to fail because fstype is detecting the filesystem as ext3 and not ext4. To solve that just add rootfstype=ext4 in the kernel command line.
Migrating from Ext3 to Ex4
First we need to add the needed features of ext4 filesystem
[root@randombugs]# tune2fs -O extents,uninit_bg,dir_index /dev/yourfilesystem
Now your filesystem need to be cleanead with fsck (probably your journal checksums doesn’t exists).
[root@randombugs]# fsck -fp /dev/yourfilesystem
-f is to force checking even if the filesystem seems clean
-p is to assume y to all your questions (is a little bit risky … so you are not forced to used it)
Usually right now you will need to be able to mount your ext4 filesystem.
[root@randombugs]# mount -t ext4dev /dev/yourfilesystem /mnt
But under Ubuntu trying to mount the filesystem I get this error
[root@randombugs]# mount -t ext4dev /dev/yourfilesystem /mnt
mount: wrong fs type, bad option, bad superblock on /dev/hdd1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so
looking in dmesg I found the real reason of this error
EXT4-fs: sdxx: not marked OK to use with test code.
Googling a little bit I found fix for the test code
[root@randombugs]# tune2fs -E test_fs /dev/yourfilesystem
Just run a lsmod to see if ext4dev module is loaded in kernel
[root@randombugs]# lsmod | grep ext4
ext4dev 251568 1
jbd2 77360 1 ext4dev
crc16 10496 1 ext4dev
mbcache 17924 2 ext4dev,ext3
Now mount your filesystem
[root@randombugs]# mount -t ext4dev /dev/yourfilesystem /mnt
Good Luck.
























Leave your response!