Ext4 in Fedora 11
|Next action: Get answers to print questions, and set up for podcast.|
Return to Category:F11 in-depth features page
An earlier interview with Eric Sandeen during Fedora 9 timeframe, when Ext4 experimental support was introduced in Fedora was published at
Jack Aboutboul has a newer interview from just before the F11 release, published at
Frequently Asked Questions
What are the benefits of Ext4?
The main ones are improved performance (especially for filesystem checks and file deletions), higher storage capacity and more scalability.
How long has Fedora supported Ext4?
Fedora 9 originally included experimental support for Ext4, if the "ext4dev" anaconda installation-time option was given; in Fedora 10 as well, with the "ext4" option. After extensive feedback, testing, and a number of new Ext4 changes developed in coordination with the lead Red Hat filesystem developer, Eric Sandeen (who hacks on Ext4 as well as XFS), Ext4 is now enabled as the default filesystem in Fedora 11.
Why is Ext4 the default filesystem?
Ext4 offers a number of important performance and scalability improvements and providing this by default is valuable for our users. Ext4 is not a filesystem written from scratch but a extension of the mature and well tested Ext3 codebase which was used by default up until this release. Red Hat has a long history of participating in the development of the Ext2/3/4 codebase. Stephen Tweedie from Red Hat was the lead developer of this codebase in the past and Eric Sandeen from Red Hat is one of the current active developers of the Ext4 filesystem. Ext4 has also been experimentally supported from the Fedora 9 release onwards and has received extensive testing within Fedora as well as from upstream developers and other distributions.
Note that Ext3 is still provided as alternative if you prefer the conservative choice.
Does GRUB support Ext4?
There is a patch in Red Hat Bugzilla to handle this. However it is a very invasive patch and has not been merged into GRUB for this release cycle due to lack of time for comprehensive testing and prioritization of other more important fixes. Since Fedora uses LVM by default and GRUB doesn't support that either, in practice you will need to keep using the Ext3 filesystem for the /boot partition. This is the recommended setup and is how Anaconda sets it up by default. To prevent boot issues, Anaconda will not let you format a /boot partition with Ext4.
The Live CD/DVD installer sets up /boot as a separate partition formatted as Ext3. If this behaviour is not what you want, you can use the regular CD/DVD or network boot images.
I heard about data loss issues with delayed allocation and patches for that. Does Fedora include them?
Yes. They are headed upstream for 2.6.30 kernel and Fedora has backported those fixes to the 2.6.29 kernel in Fedora 11. They have been in the Rawhide development branch for the last few months now.
What about Fedora 10?
Fedora 10 already supports Ext4 (as a non-default option) and the patches to improve the reliability of the filesystem have been backported to the 2.6.29 kernel in updates-testing repository for Fedora 10 as well.
How do I migrate from Ext3 to Ext4?
You can use the Anaconda boot option, "ext4migrate" to automatically migrate from Ext3 to the new Ext4 filesytem when upgrading from a previous release of Fedora. This option configures the system to mount all the existing Ext3 partitions as Ext4 and enables the extents feature so that all new files are written under the Ext4 format. If you do not use this option, Ext3 will be retained as your default filesystem in a upgrade.
If you want to convert a partition to Ext4 post-installation, you can use the following manual process. Do backup your data for safety.
- umount /dev/sdb2 (where sdb2 is the ext3 partition you are about to convert to ext4)
- tune2fs -O extents,uninit_bg,dir_index /dev/sdb2 (converting into Ext4)
- fsck -pf /dev/sdb2 (filesystem check for additional safety)
- mount -t ext4 /dev/sdb2 /media (to verify conversion)
How do I migrate from another filesystem (besides Ext3) to Ext4?
Backup your data, format your partition as Ext4 and restore your data.
Does Fedora still offer the choice of Ext3?
Yes. The regular CD/DVD install or network boot images still lets you choose either Ext4, Ext3 or XFS. The Live CD/DVD images however use Ext4 (except for /boot formatted as Ext3) and essentially transfer the entire image into the hard disk as part of the installation process and does not offer the ability to format the hard disk with any other filesystem. If you must choose a different filesystem, the regular DVD install or network boot images are the recommended alternatives.
What about backward/forward compatibility?
The on-disk format (extents) for Ext4 is new and incompatible with the Ext3 on-disk format. Ext4 provides a number of performance and scalability improvements that were not possible with the older format used by Ext3. If you want to migrate to Ext4, you can mount any Ext3 partition as a Ext4 one. The old files will be in Ext3 format and any new files written will use the Ext4 format (with associated additional performance improvements). If you want to get the other improvements from Ext4 but without changing the disk format, you can use the no extents tune2fs option when mounting a Ext3 partition. You can also mount it as read only if you want to prevent accidental writes under the new format. You can also mount with the no journal option to be compatible with Ext2. Refer to the man page for more details.
If you want to immediately take advantage of all the improvements, you must backup your data and reformat your disk with the new filesystem and thereby changing the disk format. Once you migrate to Ext4, the disk format will change in a incompatible way to Ext3 and you cannot go back to Ext3 without a backup and restore procedure. This is unlike the change from Ext2 to Ext3.
Can I do a online resize of a Ext4 formatted filesystem?
Yes. Use resize2fs command to do it.
Is there a Windows or Macintosh driver for Ext4?
No. Unlike Ext3 which merely extended the Ext2 on-disk format with journalling support, Ext4 is more of a fundamental change and drivers for other operating systems capable of reading the ext2/ext3 format have not been upgraded to recognize the new Ext4 format yet. If you want this ability, stick to the older ext3/ext2 format and do not upgrade to Ext4 yet or use Ext4 but with the no extents tune2fs option.
What are the pending features?
The two major ones are:
- Greater than 16 TB storage
- Live Defragmentation
Has Fedora changed the Ext3 default mount options ?
No. In 2.6.30 kernel, the default option has been switched from ordered to writeback. Since Fedora includes the 2.6.29 kernel, there is no change in the default option. If and when, Fedora does update to 2.6.30 or above, it will still retain the default of writeback mode for Fedora 11.
What about Btrfs ?
Btrfs is a next generation filesystem with many nice features such as snapshots, and is a potential candidate to be the default filesystem for Fedora after a few releases. Red Hat has a number of developers working full time on it including Josef Bacik and Val Henson. However it is under rapid development and the on-disk storage format might still change, so it is not suitable for general users yet. Btrfs has experimental support in Fedora 11 meant only for early testing and feedback. To enable it during installation, pass icantbelieveitsnotbtr as a option to the installer. If you are testing this filesystem, your feedback is very welcome but do not rely on it yet for your data.