https://ext4.wiki.kernel.org/api.php?action=feedcontributions&user=Sandeen&feedformat=atomExt4 - User contributions [en]2024-03-29T01:20:41ZUser contributionsMediaWiki 1.19.24https://ext4.wiki.kernel.org/index.php/TODO_listTODO list2010-11-04T21:51:19Z<p>Sandeen: /* EXT4 TODO list */</p>
<hr />
<div>=== EXT4 TODO list ===<br />
<br />
* Better recovery from a bad per-transaction checksum in the journal<br />
** Teach e2fsck to request permission to skip a bad transaction, but to replay subsequent transactions, and then force a full fsck afterwards. (If we are lucky the subsequent transactions will contain newer versions of the blocks that were skipped when the transaction with the bad checksum was skipped.)<br />
** Add per-block checksums in the journal.<br />
<br />
* test journal checksums under power fail conditions so we can turn it on by default<br />
<br />
* Lazy inode table initialization code (to speed up mke2fs)<br />
** See http://marc.info/?l=linux-ext4&m=125313617916585&w=2<br />
<br />
* Add inode checksums in the inode table (another way to speed up mke2fs; also useful for detecting when a disk writes an inode table block to the wrong part of disk)<br />
<br />
* Improve on-line resize<br />
** Need a new ioctl that can support adding multiple block groups at a time, so we can lay out new block groups that respects flex_bg.<br />
** Add support for meta_bg resizing, which is needed to support 64-bit block resizing<br />
<br />
* SSD Trim support (we should test using OCZ Vertex and Intel X25-M)<br />
<br />
* Improve merging of adjacent extents in the extent tree (i.e., both to the left and to the right)<br />
** Investigate better code factorization in all of the places that manipulate the extent tree (ext4_get_blocks, fallocate, direct I/O, uninit-to-init conversion code)<br />
<br />
* Defragmentation support<br />
** Audit and clean up existing code<br />
** Add interfaces to control block allocation decisions to kernel (other users for this functionality? boot speedup, package installation, fancy database code, etc. This may impact how we design this interface if it becomes more than just an internal defrag interface)<br />
** Make defrag userspace code smart enough to use this to make holistic defrag decisions and be able to defrag free space, not just reduce the number of contiguous extents in a file.<br />
<br />
* Patches from Lustre<br />
** MMP -- Prevent multiple mounts as a last-ditch failsafe when HA management software goes insane when STONITH fails, etc. (shipping to Lustre Customers)<br />
** Large Extended Attributes (shipping to Lustre Customers)<br />
** flexible storage of new metadata in directories<br />
** journal-guided RAID resync <br />
** badness inode heuristic for e2fsck<br />
<br />
* Better e2image (raw) sparse image support<br />
<br />
* Directory truncation on entry removal</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/TODO_listTODO list2010-11-04T21:45:12Z<p>Sandeen: /* EXT4 TODO list */</p>
<hr />
<div>=== EXT4 TODO list ===<br />
<br />
* Better recovery from a bad per-transaction checksum in the journal<br />
** Teach e2fsck to request permission to skip a bad transaction, but to replay subsequent transactions, and then force a full fsck afterwards. (If we are lucky the subsequent transactions will contain newer versions of the blocks that were skipped when the transaction with the bad checksum was skipped.)<br />
** Add per-block checksums in the journal.<br />
<br />
* test journal checksums under power fail conditions so we can turn it on by default<br />
<br />
* Lazy inode table initialization code (to speed up mke2fs)<br />
** See http://marc.info/?l=linux-ext4&m=125313617916585&w=2<br />
<br />
* Add inode checksums in the inode table (another way to speed up mke2fs; also useful for detecting when a disk writes an inode table block to the wrong part of disk)<br />
<br />
* Improve on-line resize<br />
** Need a new ioctl that can support adding multiple block groups at a time, so we can lay out new block groups that respects flex_bg.<br />
** Add support for meta_bg resizing, which is needed to support 64-bit block resizing<br />
<br />
* SSD Trim support (we should test using OCZ Vertex and Intel X25-M)<br />
<br />
* Improve merging of adjacent extents in the extent tree (i.e., both to the left and to the right)<br />
** Investigate better code factorization in all of the places that manipulate the extent tree (ext4_get_blocks, fallocate, direct I/O, uninit-to-init conversion code)<br />
<br />
* Defragmentation support<br />
** Audit and clean up existing code<br />
** Add interfaces to control block allocation decisions to kernel (other users for this functionality? boot speedup, package installation, fancy database code, etc. This may impact how we design this interface if it becomes more than just an internal defrag interface)<br />
** Make defrag userspace code smart enough to use this to make holistic defrag decisions and be able to defrag free space, not just reduce the number of contiguous extents in a file.<br />
<br />
* Patches from Lustre<br />
** MMP -- Prevent multiple mounts as a last-ditch failsafe when HA management software goes insane when STONITH fails, etc. (shipping to Lustre Customers)<br />
** Large Extended Attributes (shipping to Lustre Customers)<br />
** flexible storage of new metadata in directories<br />
** journal-guided RAID resync <br />
** badness inode heuristic for e2fsck<br />
<br />
* Better e2image (raw) sparse image support</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/TODO_listTODO list2010-08-20T18:08:40Z<p>Sandeen: /* EXT4 TODO list */</p>
<hr />
<div>=== EXT4 TODO list ===<br />
<br />
* Better recovery from a bad per-transaction checksum in the journal<br />
** Teach e2fsck to request permission to skip a bad transaction, but to replay subsequent transactions, and then force a full fsck afterwards. (If we are lucky the subsequent transactions will contain newer versions of the blocks that were skipped when the transaction with the bad checksum was skipped.)<br />
** Add per-block checksums in the journal.<br />
<br />
* test journal checksums under power fail conditions so we can turn it on by default<br />
<br />
* Lazy inode table initialization code (to speed up mke2fs)<br />
** See http://marc.info/?l=linux-ext4&m=125313617916585&w=2<br />
<br />
* Add inode checksums in the inode table (another way to speed up mke2fs; also useful for detecting when a disk writes an inode table block to the wrong part of disk)<br />
<br />
* Improve on-line resize<br />
** Need a new ioctl that can support adding multiple block groups at a time, so we can lay out new block groups that respects flex_bg.<br />
** Add support for meta_bg resizing, which is needed to support 64-bit block resizing<br />
<br />
* SSD Trim support (we should test using OCZ Vertex and Intel X25-M)<br />
<br />
* Improve merging of adjacent extents in the extent tree (i.e., both to the left and to the right)<br />
** Investigate better code factorization in all of the places that manipulate the extent tree (ext4_get_blocks, fallocate, direct I/O, uninit-to-init conversion code)<br />
<br />
* Defragmentation support<br />
** Audit and clean up existing code<br />
** Add interfaces to control block allocation decisions to kernel (other users for this functionality? boot speedup, package installation, fancy database code, etc. This may impact how we design this interface if it becomes more than just an internal defrag interface)<br />
** Make defrag userspace code smart enough to use this to make holistic defrag decisions and be able to defrag free space, not just reduce the number of contiguous extents in a file.<br />
<br />
* Patches from Lustre<br />
** MMP -- Prevent multiple mounts as a last-ditch failsafe when HA management software goes insane when STONITH fails, etc. (shipping to Lustre Customers)<br />
** Large Extended Attributes (shipping to Lustre Customers)<br />
** flexible storage of new metadata in directories<br />
** journal-guided RAID resync <br />
** badness inode heuristic for e2fsck</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/TODO_listTODO list2010-08-20T18:07:21Z<p>Sandeen: /* EXT4 TODO list */</p>
<hr />
<div>=== EXT4 TODO list ===<br />
<br />
* Better recovery from a bad per-transaction checksum in the journal<br />
** Teach e2fsck to request permission to skip a bad transaction, but to replay subsequent transactions, and then force a full fsck afterwards. (If we are lucky the subsequent transactions will contain newer versions of the blocks that were skipped when the transaction with the bad checksum was skipped.)<br />
** Add per-block checksums in the journal.<br />
<br />
* test journal checksums under power fail conditions so we can turn it on by default<br />
<br />
* Lazy inode table ininitialization code (to speed up mke2fs)<br />
** See http://marc.info/?l=linux-ext4&m=125313617916585&w=2<br />
<br />
* Add inode checksums in the inode table (another way to speed up mke2fs; also useful for detecting when a disk writes an inode table block to the wrong part of disk)<br />
<br />
* Improve on-line resize<br />
** Need a new ioctl that can support adding multiple block groups at a time, so we can lay out new block groups that respects flex_bg.<br />
** Add support for meta_bg resizing, which is needed to support 64-bit block resizing<br />
<br />
* SSD Trim support (we should test using OCZ Vertex and Intel X25-M)<br />
<br />
* Improve merging of adjacent extents in the extent tree (i.e., both to the left and to the right)<br />
** Investigate better code factorization in all of the places that manipulate the extent tree (ext4_get_blocks, fallocate, direct I/O, uninit-to-init conversion code)<br />
<br />
* Defragmentation support<br />
** Audit and clean up existing code<br />
** Add interfaces to control block allocation decisions to kernel (other users for this functionality? boot speedup, package installation, fancy database code, etc. This may impact how we design this interface if it becomes more than just an internal defrag interface)<br />
** Make defrag userspace code smart enough to use this to make holistic defrag decisions and be able to defrag free space, not just reduce the number of contiguous extents in a file.<br />
<br />
* Patches from Lustre<br />
** MMP -- Prevent multiple mounts as a last-ditch failsafe when HA management software goes insane when STONITH fails, etc. (shipping to Lustre Customers)<br />
** Large Extended Attributes (shipping to Lustre Customers)<br />
** flexible storage of new metadata in directories<br />
** journal-guided RAID resync <br />
** badness inode hueristic for e2fsck</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4:News_ContentsExt4:News Contents2009-06-01T15:42:47Z<p>Sandeen: </p>
<hr />
<div>2009-06-01: [http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.6.tar.gz e2fsprogs version 1.41.6] has been released.<br />
<br />
2009-04-24: [http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.5.tar.gz e2fsprogs version 1.41.5] has been released.<br />
<br />
2009-03-14: openSuSE 11.2 [http://lists.opensuse.org/opensuse-project/2009-03/msg00029.html will use] Ext4 as a file system. It will probably even be the default one.<br />
<br />
2009-01-22: Fedora 11 [http://www.heise-online.co.uk/news/Ext4-to-be-standard-for-Fedora-11-Btrfs-also-included--/112467 will use] Ext4 as the default filesystem. Ext4 will also be available optionally [http://arstechnica.com/journals/linux.ars/2009/01/12/super-fast-ext4-filesystem-arrives-in-ubuntu-9-04 in Ubuntu 9.04], [http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Release_Notes/sect-Release_Notes-Technology_Previews.html Red Hat 5.3], [http://wiki.mandriva.com/en/2009.1_Alpha_2#ext4_file_system Mandriva 2009.1] and others.<br />
<br />
2008-12-24: [http://lkml.org/lkml/2008/12/24/105 Linux 2.6.28] was released, including the first stable version of Ext4.<br />
<br />
2008-10-13: [http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.3.tar.gz e2fsprogs version 1.41.3] has been released.<br />
<br />
2008-09-01: [http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.1.tar.gz e2fsprogs version 1.41.1] has been released.<br />
<br />
2008-08-20: The [http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/2.6.26-ext4-7 2.6.26-ext4-7] patchset has been released. People who are using ext4 wih 2.6.26 should really take this patch.</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/TODO_listTODO list2009-06-01T15:38:35Z<p>Sandeen: Created page with '=== EXT4 TODO list === == Kernelspace == * Handle lazy itable init in kernelspace * Better merging of adjacent extents == Userspace == * 64-bit support * Less memory-intensive ...'</p>
<hr />
<div>=== EXT4 TODO list ===<br />
<br />
== Kernelspace ==<br />
* Handle lazy itable init in kernelspace<br />
* Better merging of adjacent extents<br />
<br />
== Userspace ==<br />
* 64-bit support<br />
* Less memory-intensive bitmap representation in fsck</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Main_PageMain Page2009-06-01T15:35:47Z<p>Sandeen: /* Development */</p>
<hr />
<div>__NOTOC__<br />
{|<br />
|-<br />
| nowrap style="vertical-align: top; font: bold xx-large sans-serif; " |<br />
Ext4 (and Ext2/Ext3) Wiki<br />
|}<br />
<br />
<!-- Welcome Block --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#fff0e0; align:right;"><br />
Welcome to the '''[[Ext4:About|Ext4 Wiki]]''', the Wiki for users and developers of the ext2, ext3, and ext4 filesystems. If you are trying to find out how to get started with ext4, please see the [[Ext4 Howto]].<br />
<br />
Please [[Ext4:Support|support us]] and [[:Category:NeedsEditing|help to extend]] this wiki. Thank you!<br />
<br />
<div align="right"><small>'''[[Ext4:About|More about the Ext4 Wiki]]'''</small></div><br />
</div><br />
<br />
{| width="100%"<br />
|-<br />
|style="vertical-align:top" |<br />
<br />
<!-- Documentation Block --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#dcf5ff; align:right;"><br />
=== Documentation ===<br />
* [[Ext4_Howto | Getting started with Ext4]]<br />
* [[Considerations when creating ext3 filesystems]]<br />
* [[Frequently Asked Questions]]<br />
* [http://kernelnewbies.org/Ext4 Kernelnewbie.org's Ext4 article (description of Ext4 features and instructions on how to use it)]<br />
* [[Ext4_Design| Ext4 design]] (WIP)<br />
</div><br />
<br />
<!-- Utilities Block : DO NOT EDIT HERE --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#F8F8FF; align:right;"><br />
<br />
=== Utilities ===<br />
* [http://e2fsprogs.sourceforge.net E2fsprogs]<br />
* [[Filesystem Testing Tools]]<br />
</div><br />
<br />
<!-- Development Block --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#fffff0; align:right; "><br />
=== Development ===<br />
* [[Ext4 patchsets]] <br />
* [[New ext4 features]]<br />
* [[e2fsprogs features and patches]]<br />
* [[Ext4 Developer's Conference Call]]<br />
* [[Testing Results]]<br />
* [[Bugs]]<br />
* [[TODO list]] <br />
</div><br />
<br />
| width="50%" style="vertical-align:top" |<br />
<br />
<!-- Wiki News Block : DO NOT EDIT HERE --><br />
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 3em; background-color:#f0e0d0; align:left; text-indent:-2em;"><br />
<br />
=== News ===<br />
<div style="font-size:small">{{Ext4:News_Contents}}<br />
</div><br />
<div align="right"><small>'''More [[Ext4:News|News]]'''</small></div><br />
</div><br />
<br />
<!-- Further Information Block --><br />
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px"><br />
=== Further Information ===<br />
* [[publications|Articles and Publications ]]<br />
* [[:Category:Glossary|Glossary]]<br />
* [[mailinglists|Mailing Lists ]]<br />
*[[links|Links to other ext2/3/4 resources on the web]]<br />
* [[IRC|IRC Channels ]]<br />
</div><br />
<br />
|}<br />
----<br />
Information about editing this wiki: [[Help:Editing]]</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4_HowtoExt4 Howto2009-05-16T17:15:12Z<p>Sandeen: /* For people who are running Fedora */</p>
<hr />
<div>= General Information =<br />
<br />
Ext4 was released as a functionally complete and stable filesystem in Linux 2.6.28, and it's getting included in all the modern distros (in some cases as the default fs), so if you are using a modern distro, it's possible that you already have Ext4 support and you don't need to modify your system to run Ext4.<br />
<br />
<br />
It's safe to use it in production environments, but as any piece of software, it has bugs (which are more likely to be hit in the first stable versions). Any known critical bug will be quickly fixed. If you find one, you can contact the Ext4 developers at the [http://vger.kernel.org/vger-lists.html#linux-ext4 ext4 mailing list]. They sometimes also can be found on [[IRC]].<br />
<br />
= Getting Ext4 code =<br />
<br />
== For people who build their own kernel ==<br />
<br />
1. Start with a 2.6.28 or later kernel. It is highly recommended that you apply the latest [http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/ patchset] (if available) to get the latest bug fixes. In your kernel's <tt>.config</tt> file, enable <tt>EXT4_FS</tt> (along with <tt>EXT4_FS_XATTR</tt> and <tt>EXT4_FS_POSIX_ACL</tt> if you like).<br />
<br />
2. Compile the latest version of e2fsprogs (as of this writing 1.41.4) from [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs kernel.org] or from [http://sourceforge.net/project/showfiles.php?group_id=2406 Sourceforge]. Note that it is highly important to install the mke2fs.conf file that comes with the e2fsprogs 1.41.x sources in /etc/mke2fs.conf. If you have edited the /etc/mke2fs.conf file, you will need to merge your changes with the version from e2fsprogs 1.41.x.<br />
<br />
== For people who are running Fedora ==<br />
<br />
Recent Fedora is generally very up to date with respect to ext4 code in kernelspace and userspace.<br />
<br />
Fedora 11 uses the ext4 filesystem as the default root filesystem, and as such should generally contain the most uptodate code, features, and fixes. It will initially be based on the 2.6.29.x kernel series.<br />
<br />
Fedora 10 currently has a kernel based on 2.6.27 that has working ext4 support. It is missing some of the latest fixes and performance optimizations. A 2.6.29 kernel update should be available soon, with more up-to-date ext4 code.<br />
<br />
Fedora 10 and later has all of the basic infrastructure needed to be able to run ext4, including updated udev, blkid, and other bits needed for ext4 to be a transparently recognized filesystem.<br />
<br />
Fedora 9 has only rudimentary ext4 support, and no significant ext4 updates are planned in that release.<br />
<br />
No version of Fedora at this time (including F11) has support in grub for booting from ext4, so /boot must be ext3 or some other supported filesystem. The anaconda installer enforces this restriction.<br />
<br />
== For people who are running RHEL ==<br />
<br />
ext4 is currently included as a Technology Preview in [http://www.redhat.com/rhel/ RHEL 5.3]. To use it, update to 5.3 or later, boot into 2.6.18-128.el5 or higher, and yum install e4fsprogs. <br />
<br />
The e4fsprogs package is designed to install alongside stock e2fsprogs without overlapping, so some utilities are renamed; for example e4fsck, debuge4fs, e4image, etc. rpm -q e4fsprogs | grep bin will give a good summary of what is included.<br />
<br />
The ext4 code in RHEL5.3 does not support delayed allocation, as it is a backport of an older ext4 snapshot (2.7.27). The RHEL5.4 kernel is expected to have an update, based on the 2.6.29 ext4 codebase with several post-2.6.29 fixes.<br />
<br />
== For people who are running openSuSE ==<br />
<br />
Although [http://lists.opensuse.org/opensuse-project/2009-03/msg00029.html planned], openSuSE still installs with ext3 as a default. But the [http://software.opensuse.org/developer openSuSE 11.2 Milestone 1] (Javascript needed) is already in place and comes with a 2.6.29 kernel. Here's how I converted my ext3 rootfs into ext4:<br />
<br />
# Run <tt>tune2fs -O extents,uninit_bg /dev/ROOT</tt><br />
# Change ext3 to ext4 in <tt>/etc/fstab</tt><br />
# Add "ext4" to <tt>INITRD_MODULES</tt> in <tt>/etc/sysconfig/kernel</tt><br />
## Run <tt>sudo mkinitrd</tt> (takes about 2 min here, dunno why)<br />
# Run <tt>e2fsck</tt> on the ROOT fs. As this is currently mounted, you might want to change into single user mode (<tt>init 1</tt>) and remount read-only (<tt>mount -o remount,ro /</tt>) or just reboot and the bootprocess will complain a bit and run <tt>e2fsck</tt> anyway - don't know if this is The Right Thing To Do though...<br />
<br />
'''Note''': Booting off an ext4 partition is still [https://features.opensuse.org/305162 unsupported] with the GrUB version currently available for openSuSE, so be sure to have <tt>/boot</tt> as an extra partition ''before'' converting your rootfs to ext4!<br />
<br />
== For people who are running Ubuntu ==<br />
<br />
Ubuntu 9.04 and later include ext4 as a manual partitioning option at installation time, including support for ext4 as the root filesystem.<br />
<br />
For people who are running Ubuntu, it is *highly* recommended that you download a set of modified util-linux packages and install them. Packages for Ubuntu Hardy are available [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux here]. These packages revert a [http://changelogs.ubuntu.com/changelogs/pool/main/u/util-linux/util-linux_2.12r-19ubuntu1/changelog change made by Ubuntu] to use the volid library instead of the blkid library. The volid library has a number of shortcomings, including that they don't work on freshly created filesystems or swap devices until after you reboot (since it is tied to udev probing) and the volid library doesn't understand ext4dev filesystems. The blkid library is much better, and Debian uses the blkid library for util-linux. Unfortunately, Ubuntu chose to make this decision for some unknown reason. For other versions of Ubuntu, the patch that was applied can be found [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux/util-linux-patch here].<br />
<br />
== For people who are running Debian ==<br />
<br />
In Debian Lenny (Testing), the following current packages provide ext4 support:<br />
* ext4dev module in the linux-image package (2.6.26-10)<br />
* e2fsprogs (1.41.3-1)<br />
<br />
It should be noted that the stock 2.6.26 ext4 has problems with [[DelayedAllocation|delayed allocation]] and with filesystems with non-extent based files. So until Debian starts shipping a 2.6.27 based kernel or a 2.6.26 kernel with at least the 2.6.26-ext4-7 patchset, you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "<tt>mke2fs -t ext4dev</tt>". (Without these fixes, if you try to use an ext3 filesystem which was converted using "<tt>tune2fs -E test_fs -o extents /dev/DEV</tt>", you will probably hit a kernel '''BUG''' the moment you try to delete or truncate an old non-extent based file.)<br />
<br />
== For people who are running Ark Linux ==<br />
Ark Linux dockyard-devel has ext4 support, including ext4 support during installation. grub is also patched to boot from ext4 /boot partitions.<br />
To install an Ark Linux system with ext4 as main filesystem, get the dockyard-devel image (or, once released, any 2009.x release), and type "fs=ext4" at the CD boot prompt to override the default setting.<br />
Depending the outcome of (pending) performance tests, fs=ext4 may be made the default for 2009.1.<br />
<br />
If you're on the stable branch, install the kernel, kernel-filesystem-ext4 and e2fsprogs packages from dockyard-devel.<br />
<br />
= Creating ext4 filesystems =<br />
<br />
Creating a new ext4 filesystem is very easy once you have upgraded to e2fsprogs 1.41 or later. Simply type:<br />
<br />
{{cmdroot|mke2fs -t ext4 /dev/''DEV''}}<br />
<br />
or <br />
<br />
{{cmdroot|mkfs.ext4 /dev/''DEV''}}<br />
<br />
Once the filesystem is created, it can be mounted as follows:<br />
<br />
{{cmdroot|mount -t ext4 /dev/''DEV'' /wherever}}<br />
<br />
If you have a sufficiently new system, the "-t ext4" should not be needed.<br />
<br />
NOTE: Although very large fileystems are on ext4's feature list, current e2fsprogs currently still limits the filesystem size to 2^32 blocks (16T for a 4k block filesystem). Filesystems larger than 16T is one of the very next high-priority features to complete for ext4.<br />
<br />
= Booting from an ext4 filesystem =<br />
<br />
Right now there's not a stable version of grub that supports booting a kernel from a ext4 partition. It's recommended that you keep /boot in a ext3 partition.<br />
<br />
Preliminary ext4 support seems to have been [http://svn.savannah.gnu.org/viewvc?view=rev&root=grub&revision=1699 added] to the 1.97 version of the GRUB2 development branch.<br />
<br />
There's also a Google Summer of Code [http://code.google.com/soc/2008/suse/appinfo.html?csaid=91DC4C762E7EE6D7 project] (from opensuse) which seem to have [http://code.google.com/p/grub4ext4/ developed] ext4 grub support. Both projects -GRUB2 and the GSoC projects- seem (sadly) to be different efforts.<br />
<br />
The grub package in Ubuntu 9.04 and later includes a patch to support booting from ext4 filesystems (see [https://bugs.edge.launchpad.net/bugs/314350 bug 314350]).<br />
<br />
= Converting an ext3 filesystem to ext4 =<br />
<br />
It is possible to mount both ext3 (and ext2, in kernels 2.6.28 and later) filesystems directly using the ext4 filesystem driver. This will allow you to use many of the in-core performance enhancements such as delayed allocation (delalloc) and multi-block allocation (mballoc), and large inodes if your ext3 filesystem have been formatted with large inodes as is the default with newer versions of e2fsprogs. Simply mounting an ext3 (or ext2) filesystem with a modern (2.6.27+) version of ext4 will not change the on-disk structures, and it is possible to revert to the ext3 (or ext2) driver should there be any problem with ext4.<br />
<br />
In addition to the in-core performance enhancements, there are additional features which modify the on-disk format from what ext3 understands, such as extents, which can significantly improve the ext4 filesystem performance, but mean the filesystem cannot be mounted by kernels that do not support ext4. There are additional ext4 features, such as flex_bg and > 16TB filesystem support that can only be enabled at format time via mke2fs.<br />
<br />
To change an ext2 filesystem (should you still have one) to ext3 (enabling the journal feature), use the command:<br />
<br />
{{cmdroot|tune2fs -j /dev/''DEV''}}<br />
<br />
To enable the ext4 features on an existing ext3 filesystem, use the command:<br />
<br />
{{cmdroot|tune2fs -O extents,uninit_bg,dir_index /dev/''DEV''}}<br />
<br />
WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!<br />
<br />
After running this command, you MUST run fsck to fix up some on-disk structures that tune2fs has modified:<br />
<br />
{{cmdroot|e2fsck -fD /dev/''DEV''}}<br />
<br />
Notes:<br />
* by enabling the '''extents''' feature new files will be created in extents format, but this will not convert existing files to use extents. Non-extent files can be transparently read and written by Ext4.<br />
* If you convert your root filesystem ("/") to ext4, and you use the GRUB boot loader, you will need to install a version of GRUB which understands ext4. Your system may boot OK the first time, but when your kernel is upgraded, it will become unbootable.<br />
* WARNING: It is NOT recommended to resize the inodes using <tt>resize2fs</tt> with e2fsprogs 1.41.0 or later, as this is known to corrupt some filesystems.</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4_HowtoExt4 Howto2009-05-16T17:13:42Z<p>Sandeen: /* For people who are running RHEL */</p>
<hr />
<div>= General Information =<br />
<br />
Ext4 was released as a functionally complete and stable filesystem in Linux 2.6.28, and it's getting included in all the modern distros (in some cases as the default fs), so if you are using a modern distro, it's possible that you already have Ext4 support and you don't need to modify your system to run Ext4.<br />
<br />
<br />
It's safe to use it in production environments, but as any piece of software, it has bugs (which are more likely to be hit in the first stable versions). Any known critical bug will be quickly fixed. If you find one, you can contact the Ext4 developers at the [http://vger.kernel.org/vger-lists.html#linux-ext4 ext4 mailing list]. They sometimes also can be found on [[IRC]].<br />
<br />
= Getting Ext4 code =<br />
<br />
== For people who build their own kernel ==<br />
<br />
1. Start with a 2.6.28 or later kernel. It is highly recommended that you apply the latest [http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/ patchset] (if available) to get the latest bug fixes. In your kernel's <tt>.config</tt> file, enable <tt>EXT4_FS</tt> (along with <tt>EXT4_FS_XATTR</tt> and <tt>EXT4_FS_POSIX_ACL</tt> if you like).<br />
<br />
2. Compile the latest version of e2fsprogs (as of this writing 1.41.4) from [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs kernel.org] or from [http://sourceforge.net/project/showfiles.php?group_id=2406 Sourceforge]. Note that it is highly important to install the mke2fs.conf file that comes with the e2fsprogs 1.41.x sources in /etc/mke2fs.conf. If you have edited the /etc/mke2fs.conf file, you will need to merge your changes with the version from e2fsprogs 1.41.x.<br />
<br />
== For people who are running Fedora ==<br />
<br />
Recent Fedora is generally very up to date with respect to ext4 code in kernelspace and userspace.<br />
<br />
Fedora 11 uses the ext4 filesystem as the default root filesystem, and as such should generally contain the most uptodate code, features, and fixes. It will initially be based on the 2.6.29.x kernel series.<br />
<br />
Fedora 10 currently has a kernel based on 2.6.27 that has working ext4 support. It is missing some of the latest fixes and performance optimizations. A 2.6.29 kernel update should be available soon, with more up-to-date ext4 code.<br />
<br />
Fedora 10 and later has all of the basic infrastructure needed to be able to run ext4, including updated udev, blkid, and other bits needed for ext4 to be a transparently recognized filesystem.<br />
<br />
Fedora 9 has only rudimentary ext4 support, and no significant ext4 updates are planned in that release.<br />
<br />
== For people who are running RHEL ==<br />
<br />
ext4 is currently included as a Technology Preview in [http://www.redhat.com/rhel/ RHEL 5.3]. To use it, update to 5.3 or later, boot into 2.6.18-128.el5 or higher, and yum install e4fsprogs. <br />
<br />
The e4fsprogs package is designed to install alongside stock e2fsprogs without overlapping, so some utilities are renamed; for example e4fsck, debuge4fs, e4image, etc. rpm -q e4fsprogs | grep bin will give a good summary of what is included.<br />
<br />
The ext4 code in RHEL5.3 does not support delayed allocation, as it is a backport of an older ext4 snapshot (2.7.27). The RHEL5.4 kernel is expected to have an update, based on the 2.6.29 ext4 codebase with several post-2.6.29 fixes.<br />
<br />
== For people who are running openSuSE ==<br />
<br />
Although [http://lists.opensuse.org/opensuse-project/2009-03/msg00029.html planned], openSuSE still installs with ext3 as a default. But the [http://software.opensuse.org/developer openSuSE 11.2 Milestone 1] (Javascript needed) is already in place and comes with a 2.6.29 kernel. Here's how I converted my ext3 rootfs into ext4:<br />
<br />
# Run <tt>tune2fs -O extents,uninit_bg /dev/ROOT</tt><br />
# Change ext3 to ext4 in <tt>/etc/fstab</tt><br />
# Add "ext4" to <tt>INITRD_MODULES</tt> in <tt>/etc/sysconfig/kernel</tt><br />
## Run <tt>sudo mkinitrd</tt> (takes about 2 min here, dunno why)<br />
# Run <tt>e2fsck</tt> on the ROOT fs. As this is currently mounted, you might want to change into single user mode (<tt>init 1</tt>) and remount read-only (<tt>mount -o remount,ro /</tt>) or just reboot and the bootprocess will complain a bit and run <tt>e2fsck</tt> anyway - don't know if this is The Right Thing To Do though...<br />
<br />
'''Note''': Booting off an ext4 partition is still [https://features.opensuse.org/305162 unsupported] with the GrUB version currently available for openSuSE, so be sure to have <tt>/boot</tt> as an extra partition ''before'' converting your rootfs to ext4!<br />
<br />
== For people who are running Ubuntu ==<br />
<br />
Ubuntu 9.04 and later include ext4 as a manual partitioning option at installation time, including support for ext4 as the root filesystem.<br />
<br />
For people who are running Ubuntu, it is *highly* recommended that you download a set of modified util-linux packages and install them. Packages for Ubuntu Hardy are available [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux here]. These packages revert a [http://changelogs.ubuntu.com/changelogs/pool/main/u/util-linux/util-linux_2.12r-19ubuntu1/changelog change made by Ubuntu] to use the volid library instead of the blkid library. The volid library has a number of shortcomings, including that they don't work on freshly created filesystems or swap devices until after you reboot (since it is tied to udev probing) and the volid library doesn't understand ext4dev filesystems. The blkid library is much better, and Debian uses the blkid library for util-linux. Unfortunately, Ubuntu chose to make this decision for some unknown reason. For other versions of Ubuntu, the patch that was applied can be found [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux/util-linux-patch here].<br />
<br />
== For people who are running Debian ==<br />
<br />
In Debian Lenny (Testing), the following current packages provide ext4 support:<br />
* ext4dev module in the linux-image package (2.6.26-10)<br />
* e2fsprogs (1.41.3-1)<br />
<br />
It should be noted that the stock 2.6.26 ext4 has problems with [[DelayedAllocation|delayed allocation]] and with filesystems with non-extent based files. So until Debian starts shipping a 2.6.27 based kernel or a 2.6.26 kernel with at least the 2.6.26-ext4-7 patchset, you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "<tt>mke2fs -t ext4dev</tt>". (Without these fixes, if you try to use an ext3 filesystem which was converted using "<tt>tune2fs -E test_fs -o extents /dev/DEV</tt>", you will probably hit a kernel '''BUG''' the moment you try to delete or truncate an old non-extent based file.)<br />
<br />
== For people who are running Ark Linux ==<br />
Ark Linux dockyard-devel has ext4 support, including ext4 support during installation. grub is also patched to boot from ext4 /boot partitions.<br />
To install an Ark Linux system with ext4 as main filesystem, get the dockyard-devel image (or, once released, any 2009.x release), and type "fs=ext4" at the CD boot prompt to override the default setting.<br />
Depending the outcome of (pending) performance tests, fs=ext4 may be made the default for 2009.1.<br />
<br />
If you're on the stable branch, install the kernel, kernel-filesystem-ext4 and e2fsprogs packages from dockyard-devel.<br />
<br />
= Creating ext4 filesystems =<br />
<br />
Creating a new ext4 filesystem is very easy once you have upgraded to e2fsprogs 1.41 or later. Simply type:<br />
<br />
{{cmdroot|mke2fs -t ext4 /dev/''DEV''}}<br />
<br />
or <br />
<br />
{{cmdroot|mkfs.ext4 /dev/''DEV''}}<br />
<br />
Once the filesystem is created, it can be mounted as follows:<br />
<br />
{{cmdroot|mount -t ext4 /dev/''DEV'' /wherever}}<br />
<br />
If you have a sufficiently new system, the "-t ext4" should not be needed.<br />
<br />
NOTE: Although very large fileystems are on ext4's feature list, current e2fsprogs currently still limits the filesystem size to 2^32 blocks (16T for a 4k block filesystem). Filesystems larger than 16T is one of the very next high-priority features to complete for ext4.<br />
<br />
= Booting from an ext4 filesystem =<br />
<br />
Right now there's not a stable version of grub that supports booting a kernel from a ext4 partition. It's recommended that you keep /boot in a ext3 partition.<br />
<br />
Preliminary ext4 support seems to have been [http://svn.savannah.gnu.org/viewvc?view=rev&root=grub&revision=1699 added] to the 1.97 version of the GRUB2 development branch.<br />
<br />
There's also a Google Summer of Code [http://code.google.com/soc/2008/suse/appinfo.html?csaid=91DC4C762E7EE6D7 project] (from opensuse) which seem to have [http://code.google.com/p/grub4ext4/ developed] ext4 grub support. Both projects -GRUB2 and the GSoC projects- seem (sadly) to be different efforts.<br />
<br />
The grub package in Ubuntu 9.04 and later includes a patch to support booting from ext4 filesystems (see [https://bugs.edge.launchpad.net/bugs/314350 bug 314350]).<br />
<br />
= Converting an ext3 filesystem to ext4 =<br />
<br />
It is possible to mount both ext3 (and ext2, in kernels 2.6.28 and later) filesystems directly using the ext4 filesystem driver. This will allow you to use many of the in-core performance enhancements such as delayed allocation (delalloc) and multi-block allocation (mballoc), and large inodes if your ext3 filesystem have been formatted with large inodes as is the default with newer versions of e2fsprogs. Simply mounting an ext3 (or ext2) filesystem with a modern (2.6.27+) version of ext4 will not change the on-disk structures, and it is possible to revert to the ext3 (or ext2) driver should there be any problem with ext4.<br />
<br />
In addition to the in-core performance enhancements, there are additional features which modify the on-disk format from what ext3 understands, such as extents, which can significantly improve the ext4 filesystem performance, but mean the filesystem cannot be mounted by kernels that do not support ext4. There are additional ext4 features, such as flex_bg and > 16TB filesystem support that can only be enabled at format time via mke2fs.<br />
<br />
To change an ext2 filesystem (should you still have one) to ext3 (enabling the journal feature), use the command:<br />
<br />
{{cmdroot|tune2fs -j /dev/''DEV''}}<br />
<br />
To enable the ext4 features on an existing ext3 filesystem, use the command:<br />
<br />
{{cmdroot|tune2fs -O extents,uninit_bg,dir_index /dev/''DEV''}}<br />
<br />
WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!<br />
<br />
After running this command, you MUST run fsck to fix up some on-disk structures that tune2fs has modified:<br />
<br />
{{cmdroot|e2fsck -fD /dev/''DEV''}}<br />
<br />
Notes:<br />
* by enabling the '''extents''' feature new files will be created in extents format, but this will not convert existing files to use extents. Non-extent files can be transparently read and written by Ext4.<br />
* If you convert your root filesystem ("/") to ext4, and you use the GRUB boot loader, you will need to install a version of GRUB which understands ext4. Your system may boot OK the first time, but when your kernel is upgraded, it will become unbootable.<br />
* WARNING: It is NOT recommended to resize the inodes using <tt>resize2fs</tt> with e2fsprogs 1.41.0 or later, as this is known to corrupt some filesystems.</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4_HowtoExt4 Howto2009-05-16T17:10:15Z<p>Sandeen: /* For people who are running Fedora */</p>
<hr />
<div>= General Information =<br />
<br />
Ext4 was released as a functionally complete and stable filesystem in Linux 2.6.28, and it's getting included in all the modern distros (in some cases as the default fs), so if you are using a modern distro, it's possible that you already have Ext4 support and you don't need to modify your system to run Ext4.<br />
<br />
<br />
It's safe to use it in production environments, but as any piece of software, it has bugs (which are more likely to be hit in the first stable versions). Any known critical bug will be quickly fixed. If you find one, you can contact the Ext4 developers at the [http://vger.kernel.org/vger-lists.html#linux-ext4 ext4 mailing list]. They sometimes also can be found on [[IRC]].<br />
<br />
= Getting Ext4 code =<br />
<br />
== For people who build their own kernel ==<br />
<br />
1. Start with a 2.6.28 or later kernel. It is highly recommended that you apply the latest [http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/ patchset] (if available) to get the latest bug fixes. In your kernel's <tt>.config</tt> file, enable <tt>EXT4_FS</tt> (along with <tt>EXT4_FS_XATTR</tt> and <tt>EXT4_FS_POSIX_ACL</tt> if you like).<br />
<br />
2. Compile the latest version of e2fsprogs (as of this writing 1.41.4) from [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs kernel.org] or from [http://sourceforge.net/project/showfiles.php?group_id=2406 Sourceforge]. Note that it is highly important to install the mke2fs.conf file that comes with the e2fsprogs 1.41.x sources in /etc/mke2fs.conf. If you have edited the /etc/mke2fs.conf file, you will need to merge your changes with the version from e2fsprogs 1.41.x.<br />
<br />
== For people who are running Fedora ==<br />
<br />
Recent Fedora is generally very up to date with respect to ext4 code in kernelspace and userspace.<br />
<br />
Fedora 11 uses the ext4 filesystem as the default root filesystem, and as such should generally contain the most uptodate code, features, and fixes. It will initially be based on the 2.6.29.x kernel series.<br />
<br />
Fedora 10 currently has a kernel based on 2.6.27 that has working ext4 support. It is missing some of the latest fixes and performance optimizations. A 2.6.29 kernel update should be available soon, with more up-to-date ext4 code.<br />
<br />
Fedora 10 and later has all of the basic infrastructure needed to be able to run ext4, including updated udev, blkid, and other bits needed for ext4 to be a transparently recognized filesystem.<br />
<br />
Fedora 9 has only rudimentary ext4 support, and no significant ext4 updates are planned in that release.<br />
<br />
== For people who are running RHEL ==<br />
<br />
ext4 is currently included as a Technology Preview in [http://www.redhat.com/rhel/ RHEL 5.3]. To use it, update to 5.3, boot into 2.6.18-128.el5 or higher, and yum install e4fsprogs.<br />
<br />
<br />
== For people who are running openSuSE ==<br />
<br />
Although [http://lists.opensuse.org/opensuse-project/2009-03/msg00029.html planned], openSuSE still installs with ext3 as a default. But the [http://software.opensuse.org/developer openSuSE 11.2 Milestone 1] (Javascript needed) is already in place and comes with a 2.6.29 kernel. Here's how I converted my ext3 rootfs into ext4:<br />
<br />
# Run <tt>tune2fs -O extents,uninit_bg /dev/ROOT</tt><br />
# Change ext3 to ext4 in <tt>/etc/fstab</tt><br />
# Add "ext4" to <tt>INITRD_MODULES</tt> in <tt>/etc/sysconfig/kernel</tt><br />
## Run <tt>sudo mkinitrd</tt> (takes about 2 min here, dunno why)<br />
# Run <tt>e2fsck</tt> on the ROOT fs. As this is currently mounted, you might want to change into single user mode (<tt>init 1</tt>) and remount read-only (<tt>mount -o remount,ro /</tt>) or just reboot and the bootprocess will complain a bit and run <tt>e2fsck</tt> anyway - don't know if this is The Right Thing To Do though...<br />
<br />
'''Note''': Booting off an ext4 partition is still [https://features.opensuse.org/305162 unsupported] with the GrUB version currently available for openSuSE, so be sure to have <tt>/boot</tt> as an extra partition ''before'' converting your rootfs to ext4!<br />
<br />
== For people who are running Ubuntu ==<br />
<br />
Ubuntu 9.04 and later include ext4 as a manual partitioning option at installation time, including support for ext4 as the root filesystem.<br />
<br />
For people who are running Ubuntu, it is *highly* recommended that you download a set of modified util-linux packages and install them. Packages for Ubuntu Hardy are available [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux here]. These packages revert a [http://changelogs.ubuntu.com/changelogs/pool/main/u/util-linux/util-linux_2.12r-19ubuntu1/changelog change made by Ubuntu] to use the volid library instead of the blkid library. The volid library has a number of shortcomings, including that they don't work on freshly created filesystems or swap devices until after you reboot (since it is tied to udev probing) and the volid library doesn't understand ext4dev filesystems. The blkid library is much better, and Debian uses the blkid library for util-linux. Unfortunately, Ubuntu chose to make this decision for some unknown reason. For other versions of Ubuntu, the patch that was applied can be found [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux/util-linux-patch here].<br />
<br />
== For people who are running Debian ==<br />
<br />
In Debian Lenny (Testing), the following current packages provide ext4 support:<br />
* ext4dev module in the linux-image package (2.6.26-10)<br />
* e2fsprogs (1.41.3-1)<br />
<br />
It should be noted that the stock 2.6.26 ext4 has problems with [[DelayedAllocation|delayed allocation]] and with filesystems with non-extent based files. So until Debian starts shipping a 2.6.27 based kernel or a 2.6.26 kernel with at least the 2.6.26-ext4-7 patchset, you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "<tt>mke2fs -t ext4dev</tt>". (Without these fixes, if you try to use an ext3 filesystem which was converted using "<tt>tune2fs -E test_fs -o extents /dev/DEV</tt>", you will probably hit a kernel '''BUG''' the moment you try to delete or truncate an old non-extent based file.)<br />
<br />
== For people who are running Ark Linux ==<br />
Ark Linux dockyard-devel has ext4 support, including ext4 support during installation. grub is also patched to boot from ext4 /boot partitions.<br />
To install an Ark Linux system with ext4 as main filesystem, get the dockyard-devel image (or, once released, any 2009.x release), and type "fs=ext4" at the CD boot prompt to override the default setting.<br />
Depending the outcome of (pending) performance tests, fs=ext4 may be made the default for 2009.1.<br />
<br />
If you're on the stable branch, install the kernel, kernel-filesystem-ext4 and e2fsprogs packages from dockyard-devel.<br />
<br />
= Creating ext4 filesystems =<br />
<br />
Creating a new ext4 filesystem is very easy once you have upgraded to e2fsprogs 1.41 or later. Simply type:<br />
<br />
{{cmdroot|mke2fs -t ext4 /dev/''DEV''}}<br />
<br />
or <br />
<br />
{{cmdroot|mkfs.ext4 /dev/''DEV''}}<br />
<br />
Once the filesystem is created, it can be mounted as follows:<br />
<br />
{{cmdroot|mount -t ext4 /dev/''DEV'' /wherever}}<br />
<br />
If you have a sufficiently new system, the "-t ext4" should not be needed.<br />
<br />
NOTE: Although very large fileystems are on ext4's feature list, current e2fsprogs currently still limits the filesystem size to 2^32 blocks (16T for a 4k block filesystem). Filesystems larger than 16T is one of the very next high-priority features to complete for ext4.<br />
<br />
= Booting from an ext4 filesystem =<br />
<br />
Right now there's not a stable version of grub that supports booting a kernel from a ext4 partition. It's recommended that you keep /boot in a ext3 partition.<br />
<br />
Preliminary ext4 support seems to have been [http://svn.savannah.gnu.org/viewvc?view=rev&root=grub&revision=1699 added] to the 1.97 version of the GRUB2 development branch.<br />
<br />
There's also a Google Summer of Code [http://code.google.com/soc/2008/suse/appinfo.html?csaid=91DC4C762E7EE6D7 project] (from opensuse) which seem to have [http://code.google.com/p/grub4ext4/ developed] ext4 grub support. Both projects -GRUB2 and the GSoC projects- seem (sadly) to be different efforts.<br />
<br />
The grub package in Ubuntu 9.04 and later includes a patch to support booting from ext4 filesystems (see [https://bugs.edge.launchpad.net/bugs/314350 bug 314350]).<br />
<br />
= Converting an ext3 filesystem to ext4 =<br />
<br />
It is possible to mount both ext3 (and ext2, in kernels 2.6.28 and later) filesystems directly using the ext4 filesystem driver. This will allow you to use many of the in-core performance enhancements such as delayed allocation (delalloc) and multi-block allocation (mballoc), and large inodes if your ext3 filesystem have been formatted with large inodes as is the default with newer versions of e2fsprogs. Simply mounting an ext3 (or ext2) filesystem with a modern (2.6.27+) version of ext4 will not change the on-disk structures, and it is possible to revert to the ext3 (or ext2) driver should there be any problem with ext4.<br />
<br />
In addition to the in-core performance enhancements, there are additional features which modify the on-disk format from what ext3 understands, such as extents, which can significantly improve the ext4 filesystem performance, but mean the filesystem cannot be mounted by kernels that do not support ext4. There are additional ext4 features, such as flex_bg and > 16TB filesystem support that can only be enabled at format time via mke2fs.<br />
<br />
To change an ext2 filesystem (should you still have one) to ext3 (enabling the journal feature), use the command:<br />
<br />
{{cmdroot|tune2fs -j /dev/''DEV''}}<br />
<br />
To enable the ext4 features on an existing ext3 filesystem, use the command:<br />
<br />
{{cmdroot|tune2fs -O extents,uninit_bg,dir_index /dev/''DEV''}}<br />
<br />
WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!<br />
<br />
After running this command, you MUST run fsck to fix up some on-disk structures that tune2fs has modified:<br />
<br />
{{cmdroot|e2fsck -fD /dev/''DEV''}}<br />
<br />
Notes:<br />
* by enabling the '''extents''' feature new files will be created in extents format, but this will not convert existing files to use extents. Non-extent files can be transparently read and written by Ext4.<br />
* If you convert your root filesystem ("/") to ext4, and you use the GRUB boot loader, you will need to install a version of GRUB which understands ext4. Your system may boot OK the first time, but when your kernel is upgraded, it will become unbootable.<br />
* WARNING: It is NOT recommended to resize the inodes using <tt>resize2fs</tt> with e2fsprogs 1.41.0 or later, as this is known to corrupt some filesystems.</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4_HowtoExt4 Howto2009-01-17T04:34:49Z<p>Sandeen: /* Creating ext4 filesystems */</p>
<hr />
<div>= General Information =<br />
<br />
Ext4 was released as a functionally complete and stable filesystem in Linux 2.6.28, hence it's safe to use it in production environments, but as any piece of software, it has bugs (which are more likely to be hit in the first stable versions). Any know critical bug will be quickly fixed. If you find one, you can contact with the Ext4 developers at the [http://vger.kernel.org/vger-lists.html#linux-ext4 ext4 mailing list]. They are sometimes also can be found on [[IRC]].<br />
<br />
= Getting Ext4 code =<br />
<br />
== For people who build their own kernel ==<br />
<br />
1. Start with a 2.6.28 kernel. It is highly recommended that you apply the latest [http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/ patchset] (if available) to get the latest bug fixes. In your kernel's <tt>.config</tt> file, enable <tt>EXT4_FS</tt> (along with <tt>EXT4_FS_XATTR</tt> and <tt>EXT4_FS_POSIX_ACL</tt> if you like).<br />
<br />
2. Compile the latest version of e2fsprogs (as of this writing 1.41.3) from [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs kernel.org] or from [http://sourceforge.net/project/showfiles.php?group_id=2406 Sourceforge]. Note that it is highly important to install the mke2fs.conf file that comes with the e2fsprogs 1.41.x sources in /etc/mke2fs.conf. If you have edited the /etc/mke2fs.conf file, you will need to merge your changes with the version from e2fsprogs 1.41.x.<br />
<br />
== For people who are running Fedora ==<br />
<br />
Fedora 9 currently has a kernel based on 2.6.25 that has basic ext4 support. (It is missing some of the latest fixes and performance optimizations, such as delayed allocation.) A 2.6.26 kernel update should be available reasonably soon, with more up-to-date ext4 code, though still missing delayed allocation, which should arrive in 2.6.27.<br />
<br />
Fedora 9 has all of the basic infrastructure needed to be able to run ext4, including updated udev, blkid, and other bits needed for ext4 to be a transparently recognized filesystem.<br />
<br />
e2fsprogs-1.41.0 is currently in the [http://fedoraproject.org/wiki/Testing#Fedora_Proposed_Updates Fedora 9 updates-testing repository], and users wishing to utilize ext4 should use this version of e2fsprogs.<br />
<br />
== For people who are running Ubuntu ==<br />
<br />
For people who are running Ubuntu, it is *highly* recommended that you download a set of modified util-linux packages and install them. Packages for Ubuntu Hardy are available [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux here]. These packages revert a [http://changelogs.ubuntu.com/changelogs/pool/main/u/util-linux/util-linux_2.12r-19ubuntu1/changelog change made by Ubuntu] to use the volid library instead of the blkid library. The volid library has a number of shortcomings, including that they don't work on freshly created filesystems or swap devices until after you reboot (since it is tied to udev probing) and the volid library doesn't understand ext4dev filesystems. The blkid library is much better, and Debian uses the blkid library for util-linux. Unfortunately, Ubuntu chose to make this reason for some unknown reason. For other versions of Ubuntu, the patch that was applied can be found [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ubuntu-fixed-util-linux/util-linux-patch here].<br />
'''Update''': From 9 January [http://cdimage.ubuntu.com/daily/current/ daily builds] of Jaunty will include ext4 as a partitioning option. As far as I can tell, it installs and boots fine (including full ext4 /; you don't need a separate /boot). [http://ubuntuforums.org/showthread.php?p=6520952&posted=1#post6520952 Here] is the announcement, It will be included in 9.04 and maybe it will be by default option in 9.10 [http://brainstorm.ubuntu.com/idea/16854/]<br />
<br />
== For people who are running Debian ==<br />
<br />
In Debian Lenny (Testing), the following current packages provide ext4 support:<br />
* ext4dev module in the linux-image package (2.6.26-10)<br />
* e2fsprogs (1.41.3-1)<br />
<br />
It should be noted that the stock 2.6.26 ext4 has problems with delayed allocation and with filesystems with non-extent based files. So until Debian starts shipping a 2.6.27 based kernel or a 2.6.26 kernel with at least the 2.6.26-ext4-7 patchset, you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "mke2fs -t ext4dev". (Without these fixes, if you try to use an ext3 filesystem which was converted using '''tune2fs -E test_fs -o extents /dev/DEV''', you will probably hit a kernel '''BUG''' the moment you try to delete or truncate an old non-extent based file.)<br />
<br />
= Creating ext4 filesystems =<br />
<br />
Creating a new ext4 filesystem is very easy once you have upgraded to e2fsprogs 1.41 or later. Simply type:<br />
<br />
$ mke2fs -t ext4 /dev/DEV<br />
or <br />
$ mkfs.ext4 /dev/DEV<br />
<br />
Once the filesystem is created, it can be mounted as follows:<br />
<br />
$ mount -t ext4 /dev/DEV /wherever<br />
<br />
If you have a sufficiently new system, the "-t ext4" should not be needed.<br />
<br />
NOTE: Although very large fileystems are on ext4's feature list, current e2fsprogs currently still limits the filesystem size to 2^32 blocks (16T for a 4k block filesystem). Filesystems larger than 16T is one of the very next high-priority features to complete for ext4.<br />
<br />
= Booting from an ext4 filesystem =<br />
<br />
Right now there's not a stable version of grub that supports booting a kernel from a ext4 partition. It's recommended that you keep /boot in a ext3 partition.<br />
<br />
Preliminary ext4 support seems to have been [http://svn.savannah.gnu.org/viewvc?view=rev&root=grub&revision=1699 added] to the 1.97 version of the GRUB2 development branch.<br />
<br />
There's also a Google Summer of Code [http://code.google.com/soc/2008/suse/appinfo.html?csaid=91DC4C762E7EE6D7 project] (from opensuse) which seem to have [http://code.google.com/p/grub4ext4/ developed] ext4 grub support. Both projects -GRUB2 and the GSoC projects- seem (sadly) to be different efforts.<br />
<br />
= Converting an ext3 filesystem to ext4 =<br />
<br />
To convert an existing ext3 filesystem to use ext4, use the command<br />
<br />
$ tune2fs -O extents,uninit_bg,dir_index /dev/DEV<br />
<br />
<br />
WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!<br />
<br />
After running this command, you MUST run fsck:<br />
<br />
$ fsck -pf /dev/DEV<br />
<br />
NOTE: by doing so, new files will be created in extents format, but this will not convert existing files. However, they can be transparently read by Ext4.<br />
<br />
WARNING: It is NOT recommended to resize the inodes using <tt>resize2fs</tt>, as this is known to corrupt some filesystems.</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4:News_ContentsExt4:News Contents2008-11-29T06:29:58Z<p>Sandeen: </p>
<hr />
<div>2008-10-13: [http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.3.tar.gz e2fsprogs version 1.41.3] has been released.<br />
<br />
2008-09-01: [http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.1.tar.gz e2fsprogs version 1.41.1] has been released.<br />
<br />
2008-08-20: The [http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/2.6.26-ext4-7 2.6.26-ext4-7] patchset has been released. People who are using ext4 wih 2.6.26 should really take this patch.<br />
<br />
2008-07-15: Delayed allocation has been merged into Linus's ext4 git tree! We have started maintaining patches against the latest 2.6 mainline kernel for make it easier for people to try out ext4.<br />
<br />
2008-07-14: The [[Ext4 Howto]] page has been updated so it is fully up to date with how to get started using ext4.<br />
<br />
2008-07-10: [http://e2fsprogs.sf.net E2fsprogs] version 1.41.0 was released, with full ext4 support<br />
<br />
2008-04-13: Fedora Core 9 has been released with [http://fedoraproject.org/wiki/Features/Ext4 ext4 preview support].</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4_HowtoExt4 Howto2008-07-14T19:53:04Z<p>Sandeen: </p>
<hr />
<div>= General Information =<br />
<br />
As of this writing (mid-July, 2008, just after the release of 2.6.26), the ext4 code is functionally complete and functional enough that a few people are using it in production. However, it is still being tested and although the developers haven't lost any data yet, please be cautious and keep plenty of backups!<br />
<br />
The ext4 developers can be contacted at the [http://vger.kernel.org/vger-lists.html#linux-ext4 ext4 mailing list]. They are sometimes also can be found on [[IRC]].<br />
<br />
= Getting Ext4 code =<br />
<br />
== For people who build their own kernel ==<br />
<br />
1. Start with a 2.6.26 kernel. It is highly recommended that you apply the [http://www.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/2.6.26-ext4-1 2.6.26-ext4-1 patchset] to get improved performance through delayed allocation as well as the latest bug fixes. In your kernel's <tt>.config</tt> file, enable <tt>EXT4DEV_FS</tt> (along with <tt>EXT4DEV_FS_XATTR</tt> and <tt>EXT4DEV_FS_POSIX_ACL</tt> if you like).<br />
<br />
2. Compile the latest version of e2fsprogs (as of this writing 1.41.0) from [ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs kernel.org] or from [http://sourceforge.net/project/showfiles.php?group_id=2406 Sourceforge].<br />
<br />
== For people who are running Fedora ==<br />
<br />
Fedora 9 currently has a kernel based on 2.6.25 that has basic ext4 support. (It is missing some of the latest fixes and performance optimizations, such as delayed allocation.) A 2.6.26 kernel update should be available reasonably soon, with more up-to-date ext4 code, though still missing delayed allocation, which should arrive in 2.6.27.<br />
<br />
Fedora 9 has all of the basic infrastructure needed to be able to run ext4, including updated udev, blkid, and other bits needed for ext4 to be a transparently recognized filesystem.<br />
<br />
e2fsprogs-1.41.0 is currently in the Fedora 9 updates-testing repository, and users wishing to utilize ext4 should use this version of e2fsprogs.<br />
<br />
= Creating ext4 filesystems =<br />
<br />
Creating a new ext4 filesystem is very easy once you have upgraded to e2fsprogs 1.41 or later. Simply type:<br />
<br />
$ mke2fs -t ext4dev /dev/DEV<br />
<br />
Once the filesystem is created, it can be mounted as follows:<br />
<br />
$ mount -t ext4dev /dev/DEV /wherever<br />
<br />
NOTE: Although very large fileystems are on ext4's feature list, current e2fsprogs currently still limits the filesystem size to 2^32 blocks (16T for a 4k block filesystem). > 16T support is one of the very next high-priority features to complete for ext4.<br />
<br />
= Converting an ext3 filesystem to ext4 =<br />
<br />
To convert an existing ext3 filesystem to use ext4, use the command<br />
<br />
$ tune2fs -O extents -E test_fs /dev/DEV<br />
<br />
NOTE: by doing so, new files will be created in extents format, but this will not convert existing files. However, they can be transparently read from and written to in the old ext3 format.<br />
<br />
If the filesystem was created with 128 byte inodes, it can be<br />
converted to use 256 byte for greater efficiency via:<br />
<br />
$ tune2fs -I 256 /dev/DEV<br />
<br />
NOTE: Recent mkfs.ext3 now defaults to 256-byte inodes, so newer distributions (Fedora 9 included) will have already created 256-byte inode filesystems.<br />
<br />
WARNING: Once the <tt>extent</tt> feature has been turned on, the filesystem will no longer be mountable using the ext3 filesystem!</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Main_PageMain Page2007-11-08T17:55:52Z<p>Sandeen: add bugzilla links</p>
<hr />
<div>{|<br />
|-<br />
| nowrap style="vertical-align: top; font: bold xx-large sans-serif; " |<br />
Ext4 (and Ext2/Ext3) Wiki<br />
|}<br />
<br />
<!-- Welcome Block --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#fff0e0; align:right;"><br />
Welcome to the '''[[Ext4:About|Ext4 Wiki]]''', the Wiki for users and developers of the ext2, ext3, and ext4 filesystems.<br />
<br />
Please [[Ext4:Support|support us]] and [[:Category:NeedsEditing|help to extend]] this wiki. Thank you!<br />
<br />
<div align="right"><small>'''[[Ext4:About|More about the Ext4 Wiki]]'''</small></div><br />
</div><br />
<br />
{| width="100%"<br />
|-<br />
|style="vertical-align:top" |<br />
<br />
<!-- Documentation Block --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#dcf5ff; align:right;"><br />
'''Documentation'''<br />
* [[Considerations when creating ext3 filesystems]]<br />
* [[Frequently Asked Questions]]<br />
</div><br />
<br />
<!-- Utilities Block : DO NOT EDIT HERE --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#F8F8FF; align:right;"><br />
'''Utilities'''<br />
</div><br />
<br />
<!-- Development Block --><br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#fffff0; align:right; "><br />
'''Development'''<br />
* [[Ext4 patchsets]] <br />
* [[New ext4 features]]<br />
* [[e2fsprogs features and patches]]<br />
* [[Ext4 Developer's Conference Call]]<br />
* [[Testing Results]]<br />
* [http://bugzilla.kernel.org/buglist.cgi?product=File+System&bug_status=NEW&bug_status=REOPENED&bug_status=ASSIGNED&component=ext4 ext4 bugs on bugzilla.kernel.org]<br />
* [http://bugzilla.kernel.org/buglist.cgi?product=File+System&bug_status=NEW&bug_status=REOPENED&bug_status=ASSIGNED&component=ext3 ext3 bugs on bugzilla.kernel.org]<br />
* [http://bugzilla.kernel.org/buglist.cgi?product=File+System&bug_status=NEW&bug_status=REOPENED&bug_status=ASSIGNED&component=ext2 ext2 bugs on bugzilla.kernel.org]<br />
</div><br />
<br />
| width="50%" style="vertical-align:top" |<br />
<br />
<!-- Wiki News Block : DO NOT EDIT HERE --><br />
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 3em; background-color:#f0e0d0; align:left; text-indent:-2em;"><br />
'''News'''<br />
<div style="font-size:small">{{Ext4:News Contents}}<br />
</div><br />
<div align="right"><small>'''More [[Ext4:News|News]]'''</small></div><br />
</div><br />
<br />
<!-- Further Information Block --><br />
<div style="margin:0; margin-top:10px; border:1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#dfefdf; align:left; margin-top:10px"><br />
'''Further Information'''<br />
* [[publications|Articles and Publications ]]<br />
* [[:Category:Glossary|Glossary]]<br />
* [[mailinglists|Mailing Lists ]]<br />
*[[links|Links to other ext2/3/4 resources on the web]]<br />
* [[IRC|IRC Channels ]]<br />
</div><br />
<br />
|}<br />
----<br />
Information about editing this wiki: [[Help:Editing]]</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/IRCIRC2007-10-31T16:55:53Z<p>Sandeen: </p>
<hr />
<div>Server: irc.oftc.net<br />
<br />
Channels: #linuxfs, #ext4</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4_patchsetsExt4 patchsets2007-09-24T16:34:56Z<p>Sandeen: add url to ext4 gitweb</p>
<hr />
<div>'''patch repository'''<br />
<br />
http://repo.or.cz/w/ext4-patch-queue.git<br />
<br />
'''git tree'''<br />
<br />
http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git<br />
<br />
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git<br />
<br />
'''quilt patches'''<br />
<br />
http://www2.kernel.org/pub/linux/kernel/people/tytso/ext4-patches</div>Sandeenhttps://ext4.wiki.kernel.org/index.php/Ext4_Developer%27s_Conference_CallExt4 Developer's Conference Call2007-01-31T19:15:18Z<p>Sandeen: /* Developer Interlock Call Minutes */</p>
<hr />
<div>=== Developer Interlock Call Minutes ===<br />
<br />
December 6, 2006: [[ Minutes12-06-2006 ]] <br><br />
December 13, 2006: [[ Minutes12-13-2006 ]] <br><br />
January 10, 2007: [[ Minutes01-10-2007 ]] <br><br />
January 17, 2007: [[ Minutes01-17-2007 ]] <br><br />
January 24, 2007: [[ Minutes01-24-2007 ]] <br></div>Sandeen