Convert ext3 to ext4

From Birnam Designs Wiki

Jump to: navigation, search

Perform a system update to make sure you have the latest kernel and grub boot loader.

$ sudo apt-get update
$ sudo apt-get upgrade

Enable the Ext4 features (Once you run this command you will no longer be able to mount this partition using the Ext3 file system!)

$ sudo tune2fs -O extents,uninit_bg,dir_index /dev/sdb1

Run fsck to fix the disk structure we modified in the previous step with tune2fs

$ sudo e2fsck -fpDC0 /dev/sdb1

Update your fstab file to reflect our changes

/dev/sdb1 /media/sdb1 ext4 relatime,errors=remount-ro 0 1

When converting a drive with extents enabled, only new files will be created in the extents format. It will not convert existing files to use extents. However Ext4 can read both of them transparently.

source

Share This!
This page was last modified on 24 February 2010, at 03:45. This page has been accessed 362 times.