Migration From ext3 to ext4 Need Manually Update Grub on Ubuntu Jaunty (9.04)


If you choose to upgrade the filesystem /or/boot in the place of ext2 to ext3 or ext4 (as documented on the wiki ext4), then you must also use the command grub-install after upgrading to Ubuntu 9:04 to re-install the boot loader. If you do not do this, the version of GRUB installed on the boot sector will not be able to read the kernel of the ext4 file system and your system will boot failed.

Converting your file system from ext3 to ext4

1. boot the computer from the Ubuntu 9.04 Desktop CD
2. Once you are booted into the live environment, run the following command replacing /dev/DEV with the drive partition that you want to upgrade.

tune2fs -O extents,uninit_bg,dir_index /dev/DEV

[NOTE : the -O is the capital letter O, not zero]
3. You then need to run fsck to fix up some on-disk structures that tune2fs has modified.

e2fsck -fD /dev/DEV

4. Next, mount the drive

mount -t ext4 /dev/DEV /mnt

5. Edit fstab and change ext3 to ext4 on the drive you upgraded

UUID=xxxx / ext4 relatime,errors=remount-ro 0 1

6. Finally, you need to run grub-install on your new partition. The version of grub that shipped with Ubuntu 8.10 cannot boot from ext4 partitions so if you skip this step, your computer won't boot.

grub-install /dev/DEV –root-directory=/mnt –recheck

7. Now reboot the computer and enjoy your new ext4 filesystem


EXT4 features
Compatibility

Any existing Ext3 filesystem can be migrated to Ext4 with an easy procedure which consists in running a couple of commands in read-only mode (described in the next section). This means that you can improve the performance, storage limits and features of your current filesystems without reformatting and/or reinstalling your OS and software environment. If you need the advantages of Ext4 on a production system, you can upgrade the filesystem. The procedure is safe and doesn't risk your data (obviously, backup of critical data is recommended, even if you aren't updating your filesystem :). Ext4 will use the new data structures only on new data, the old structures will remain untouched and it will be possible to read/modify them when needed. This means, that, of course, that once you convert your filesystem to Ext4 you won't be able to go back to Ext3 again (although there's a possibility, described in the next section, of mounting a Ext3 filesystem with Ext4 without using the new disk format and you'll be able to mount it with Ext3 again, but you lose many of the advantages of Ext4).
Bigger File System and File Sizes

Currently, Ext3 support 16 TB of maximum file system size and 2 TB of maximum file size. Ext4 adds 48-bit block addressing, so it will have 1 EB1 of maximum file system size and 16 TB of maximum file size. Why 48-bit and not 64-bit? There are some limitations that would need to be fixed before making Ext4 fully 64-bit capable, which have not been addressed in Ext4. The Ext4 data structures have been designed keeping this in mind, so a future update to Ext4 will implement full 64-bit support at some point. 1 EB will be enough (really :)) until that happens.
NOTE!
The code to create file systems bigger than 16 TB is, at the time of writing this article, not in any stable release of e2fsprogs. It will be in future releases.

No comments:

Post a Comment

Please Comment...!!