The new features of ext4 over ext3 motivated me to migrate my ext3 partitions to the new file system. If you want to do the same, here’s the steps yo have to follow.
Converting from ext3 to ext4
Note: The following commands must be run on not mounted partitions. If you are planning to convert your system root’s partition, do it from a livecd or a system other than yours.
In order to convert a ext3 partition, let’s say /dev/sda5, to ext4 type the following:
tune2fs -O extents,uninit_bg,dir_index /dev/sda5
After doing the above, run e2fsck on the new ext4 file system to fix any inconsistency:
e2fsck -fD /dev/sda5
The /etc/fstab file
Don’t forget to edit the /etc/fstab file by changing the partitions that will be mounted as ext4 instead of ext3:
# <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/sda6 / ext4 errors=remount-ro 0 1 /dev/sda5 /home ext4 defaults 0 2 /dev/sda7 none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
Ext4?s features
But the way, if you want to know what those new features are, check out the following table:
Feature | Description |
Large file system | Support for volumes up to 1 Exbibyte and files up to 16 tebibytes. |
Extents | An extent is a range of contiguous physical blocks, improving large file performance and reducing fragmentation |
Backward compatibility | The ext4 filesystem is backward compatible with ext3 and ext2, making it possible to mount ext3 and ext2 filesystems as ext4 |
Persistent pre-allocation | The space allocated for files would be guaranteed and would likely be contiguous. The full of 0?s method is deprecated. |
Delayed allocation | Ext4 delays block allocation until the data is going to be written to the disk.This improves performance and reduces fragmentation by improving block allocation decisions based on the actual file size. |
Higher subdirectory limit | The number of subdirectories that a directory can contain was raised to 64,000. |
Journal checksumming | Checksums in the journal to improve reliability is used, since the journal is one of the most used files of the disk. |
Faster file system checking | In ext4, unallocated block groups and sections of the inode table are marked as such. This enables e2fsck to skip them entirely on a check and greatly reduces the time it takes to check a file system of the size ext4 is built to support. |
Multiblock allocator | Ext4 allocates multiple blocks for a file in a single operation, which reduces fragmentation by attempting to choose contiguous blocks on the disk. |
Improved timestamps | As computers become faster in general and as Linux becomes used more for mission critical applications, the granularity of second-based timestamps becomes insufficient. To solve this, ext4 provides timestamps measured in nanoseconds. |
Recent Comments