Product SiteDocumentation Site

7.2. Converting an Ext3 File System to Ext4

Many of the ext4 file system enhancements over ext3 result from modified metadata structures configured on the disk during file system creation. However, an existing ext3 file system can be upgraded to take advantage of other improvements in ext4.


Whenever possible, create a new ext4 file system and migrate your data to it instead of converting from ext3 to ext4. This ensures a better metadata layout, allowing for the enhanced performance natively provided by ext4.
To enable ext4 features on an existing ext3 file system, begin by using the tune2fs command in the following manner:
tune2fs -O extents,uninit_bg /dev/device
The -O option sets, clears, or initializes a comma-delimited list of file system features. With the extents parameter, the file system will now use extents instead of the indirect block scheme for storing data blocks in an inode (but only for files created after activating extents feature). The uninit_bg parameter allows the kernel to mark unused block groups accordingly.
After using tune2fs to modify the file system, perform a file system check using the following command:
e2fsck -f /dev/device
Note that without the file system check, the converted file system cannot be mounted. During the course of conversion, e2fsck may print the following warning:
One or more block group descriptor checksums are invalid
This warning is generally benign, as e2fsck will repair any invalid block group descriptors it encounters during the conversion process.


An ext3 file system converted to ext4 in the manner described in this section can no longer be mounted as ext3. Refer to Section 7.3, “Mounting an Ext4 File System” for information on how to mount an ext3 file system as ext4 without converting.
In addition, an ext2 file system cannot be converted directly to ext4; it should be converted to ext3, at which point it can be converted to ext4 (or mounted using the ext4 driver). For more information on converting an ext2 file system to ext3, refer to Section 6.2, “Converting to an Ext3 File System”.
For more information on converting an ext3 file system to ext4, refer to man tune2fs and man e2fsck.