Ext3
   HOME

TheInfoList



OR:

ext3, or third extended filesystem, is a
journaled file system A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the goal of such changes in a data structure known as a "journal (computing), journal", which is usually a circul ...
that is commonly used by the Linux kernel. It used to be the default file system for many popular
Linux distributions A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one ...
.
Stephen Tweedie Stephen C. Tweedie is a Scottish software developer who is known for his work on the Linux kernel, in particular his work on filesystems. After becoming involved with the development of the ext2 filesystem working on performance issues, he led ...
first revealed that he was working on extending
ext2 The ext2 or second extended file system is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same ...
in ''Journaling the Linux ext2fs Filesystem'' in a 1998 paper, and later in a February 1999 kernel mailing list posting. The filesystem was merged with the mainline Linux kernel in November 2001 from 2.4.15 onward. Its main advantage over ext2 is journaling, which improves reliability and eliminates the need to check the file system after an unclean shutdown. Its successor is
ext4 ext4 (fourth extended filesystem) is a journaling file system for Linux, developed as the successor to ext3. ext4 was initially a series of backward-compatible extensions to ext3, many of them originally developed by Cluster File Systems for ...
.


Advantages

The performance (speed) of ext3 is less attractive than competing Linux filesystems, such as ext4, JFS,
ReiserFS ReiserFS is a general-purpose, journaling file system initially designed and implemented by a team at Namesys led by Hans Reiser and licensed under GPLv2. Introduced in version 2.4.1 of the Linux kernel, it was the first journaling file sys ...
, and
XFS XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3. XFS was ported to the Linux kernel in 2001; as ...
, but ext3 has a significant advantage in that it allows in-place upgrades from ext2 without having to
back up In information technology, a backup, or data backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event. The verb form, referring to the process of doing so, is " back up", ...
and restore data. Benchmarks suggest that ext3 also uses less CPU power than ReiserFS and XFS. It is also considered safer than the other Linux file systems, due to its relative simplicity and wider testing base. ext3 adds the following features to ext2: * A
journal A journal, from the Old French ''journal'' (meaning "daily"), may refer to: *Bullet journal, a method of personal organization *Diary, a record of what happened over the course of a day or other period *Daybook, also known as a general journal, a ...
* Online file system growth *
HTree An HTree is a specialized tree data structure for directory indexing, similar to a B-tree. They are constant depth of either one or two levels, have a high fanout factor, use a hash of the filename, and do not require balancing. The HTree algor ...
indexing for larger directories Without these features, any ext3 file system is also a valid ext2 file system. This situation has allowed well-tested and mature file system maintenance utilities for maintaining and repairing ext2 file systems to also be used with ext3 without major changes. The ext2 and ext3 file systems share the same standard set of utilities,
e2fsprogs e2fsprogs (sometimes called the e2fs programs) is a set of utilities for maintaining the ext2, ext3 and ext4 file systems. Since those file systems are often the default for Linux distributions, it is commonly considered to be essential softwar ...
, which includes an
fsck The system utility fsck (''file system consistency check'') is a tool for checking the consistency of a file system in Unix and Unix-like operating systems, such as Linux, macOS, and FreeBSD. A similar command, CHKDSK, exists in Microsoft Windows ...
tool. The close relationship also makes conversion between the two file systems (both forward to ext3 and backward to ext2) straightforward. ext3 lacks "modern" filesystem features, such as dynamic inode allocation and
extents In computing, an extent is a contiguous area of storage reserved for a file in a file system, represented as a range of block numbers, or tracks on count key data devices. A file can consist of zero or more extents; one file fragment requires on ...
. This situation might sometimes be a disadvantage, but for recoverability, it is a significant advantage. The file system metadata is all in fixed, well-known locations, and data structures have some redundancy. In significant data corruption, ext2 or ext3 may be recoverable, while a tree-based file system may not.


Size limits

The maximum number of blocks for ext3 is 232. The size of a block can vary, affecting the maximum number of files and the maximum size of the file system:


Journaling levels

There are three levels of journaling available in the Linux implementation of ext3: ; Journal (lowest risk): Both metadata and file contents are written to the journal before being committed to the main file system. Because the journal is relatively continuous on disk, this can improve performance, if the journal has enough space. In other cases, performance gets worse, because the data must be written twice—once to the journal, and once to the main part of the filesystem. ; Ordered (medium risk): Only metadata is journaled; file contents are not, but it's guaranteed that file contents are written to disk before associated metadata is marked as committed in the journal. This is the default on many Linux distributions. If there is a power outage or kernel panic while a file is being written or appended to, the journal will indicate that the new file or appended data has not been "committed", so it will be purged by the cleanup process. (Thus appends and new files have the same level of integrity protection as the "journaled" level.) However, files being ''overwritten'' can be corrupted because the original version of the file is not stored. Thus it's possible to end up with a file in an intermediate state between new and old, without enough information to restore either one or the other (the new data never made it to disk completely, and the old data is not stored anywhere). Even worse, the intermediate state might intersperse old and new data, because the order of the write is left up to the disk's hardware. ; Writeback (highest risk): Only metadata is journaled; file contents are not. The contents might be written before or after the journal is updated. As a result, files modified right before a crash can become corrupted. For example, a file being appended to may be marked in the journal as being larger than it actually is, causing garbage at the end. Older versions of files could also appear unexpectedly after a journal recovery. The lack of synchronization between data and journal is faster in many cases. JFS uses this level of journaling, but ensures that any "garbage" due to unwritten data is zeroed out on reboot. XFS also uses this form of journaling. In all three modes, the internal structure of file system is assured to be consistent even after a crash. In any case, only the data content of files or directories which were being modified when the system crashed will be affected; the rest will be intact after recovery.


Disadvantages


Functionality

Because ext3 aims to be
backward-compatible Backward compatibility (sometimes known as backwards compatibility) is a property of an operating system, product, or technology that allows for interoperability with an older legacy system, or with input designed for such a system, especially in ...
with the earlier ext2, many of the on-disk structures are similar to those of ext2. Consequently, ext3 lacks recent features, such as
extents In computing, an extent is a contiguous area of storage reserved for a file in a file system, represented as a range of block numbers, or tracks on count key data devices. A file can consist of zero or more extents; one file fragment requires on ...
, dynamic allocation of inodes, and block sub-allocation. A directory can have at most 31998 ''subdirectories'', because an inode can have at most 32,000 links (each direct subdirectory increases their parent folder inode link counter in the ".." reference). On ext3, like for most current Linux filesystems, the system tool "
fsck The system utility fsck (''file system consistency check'') is a tool for checking the consistency of a file system in Unix and Unix-like operating systems, such as Linux, macOS, and FreeBSD. A similar command, CHKDSK, exists in Microsoft Windows ...
" should not be used while the filesystem is mounted for writing. Attempting to check a filesystem that is already mounted in read/write mode will (very likely) detect inconsistencies in the filesystem metadata. Where filesystem metadata is changing, and fsck applies changes in an attempt to bring the "inconsistent" metadata into a "consistent" state, the attempt to "fix" the inconsistencies will corrupt the filesystem.


Defragmentation

There is no online ext3
defragmentation In the maintenance of file systems, defragmentation is a process that reduces the degree of fragmentation. It does this by physically organizing the contents of the mass storage device used to store files into the smallest number of contigu ...
tool that works on the filesystem level. There is an offline ext2 defragmenter, e2defrag. However, e2defrag may destroy data, depending on the feature bits turned on in the filesystem; it does not know how to handle many of the newer ext3 features. There are userspace defragmentation tools, like Shake and defrag. Shake works by allocating space for the whole file as one operation, which will generally cause the allocator to find contiguous disk space. If there are files which are used at the same time, Shake will try to write them next to one another. Defrag works by copying each file over itself. However, this strategy works only if the file system has enough free space. A true defragmentation tool does not exist for ext3. However, as the Linux System Administrator Guide states, "Modern Linux filesystem(s) keep fragmentation at a minimum by keeping all blocks in a file close together, even if they can't be stored in consecutive sectors. Some filesystems, like ext3, effectively allocate the free block that is nearest to other blocks in a file. Therefore it is not necessary to worry about fragmentation in a Linux system." While ext3 is resistant to file fragmentation, ext3 can get fragmented over time or for specific usage patterns, like slowly writing large files. Consequently, ext4 (the successor to ext3) has an online filesystem defragmentation utility e4defrag and currently supports
extents In computing, an extent is a contiguous area of storage reserved for a file in a file system, represented as a range of block numbers, or tracks on count key data devices. A file can consist of zero or more extents; one file fragment requires on ...
(contiguous file regions).


Undelete

ext3 does not support the recovery of deleted files. The ext3 driver actively deletes files by wiping file inodes for crash safety reasons. There are still several techniques and some free and proprietary software for recovery of deleted or lost files using file system journal analysis; however, they do not guarantee any specific file recovery.


Compression

e3compr is an
unofficial patch An unofficial patch is a patch for a piece of software, created by a third party such as a user community without the involvement of the original developer. Similar to an ordinary patch, it alleviates bugs or shortcomings. Unofficial patches do ...
for ext3 that does transparent
compression Compression may refer to: Physical science *Compression (physics), size reduction due to forces *Compression member, a structural element such as a column *Compressibility, susceptibility to compression * Gas compression *Compression ratio, of a ...
. It is a direct port of e2compr and still needs further development. It compiles and boots well with upstream kernels, but journaling is not implemented yet.


Lack of snapshots support

Unlike a number of modern file systems, ext3 does not have native support for
snapshots Snapshot, snapshots or snap shot may refer to: * Snapshot (photography), a photograph taken without preparation Computing * Snapshot (computer storage), the state of a system at a particular point in time * Snapshot (file format) or SNP, a file ...
, the ability to quickly capture the state of the filesystem at arbitrary times. Instead, it relies on less-space-efficient, volume-level snapshots provided by the Linux LVM. The
Next3 Next3 is a journaling file system for Linux based on ext3 which adds snapshots support, yet retains compatibility to the ext3 on-disk format. Next3 is implemented as open-source software, licensed under the GPL license. Background A snapshot is ...
file system is a modified version of ext3 which offers snapshots support, yet retains compatibility with the ext3 on-disk format.


No checksumming in journal

ext3 does not do
checksum A checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify data ...
ming when writing to the journal. On a storage device with extra cache, if ''barrier=1'' is not enabled as a mount option (in
/etc/fstab fstab (after '' file systems table'') is a system file commonly found in the directory /etc on Unix and Unix-like computer systems. In Linux, it is part of the util-linux package. The fstab file typically lists all available disk partitions and ...
), and if the hardware is doing out-of-order write caching, one runs the risk of severe filesystem corruption during a crash.Re: Frequent metadata corruption with ext3 + hard power-off
Archives.free.net.ph. Retrieved on 2013-06-22.
This is because storage devices with write caches report to the system that the data has been completely written, even if it was written to the (volatile) cache. If hard disk writes are done out-of-order (due to modern hard disks caching writes in order to
amortize Amortization or amortisation may refer to: * The process by which loan principal decreases over the life of an amortizing loan * Amortization (accounting), the expensing of acquisition cost minus the residual value of intangible assets in a syste ...
write speeds), it is likely that one will write a commit block of a transaction before the other relevant blocks are written. If a power failure or unrecoverable crash should occur before the other blocks get written, the system will have to be rebooted. Upon reboot, the file system will replay the log as normal, and replay the "winners" (transactions with a commit block, including the invalid transaction above, which happened to be tagged with a valid commit block). The unfinished disk write above will thus proceed, but using corrupt journal data. The file system will thus mistakenly overwrite normal data with corrupt data while replaying the journal. If checksums had been used, where the blocks of the "fake winner" transaction were tagged with a mutual checksum, the file system could have known better and not replayed the corrupt data onto the disk. Journal checksumming has been added to ext4. Filesystems going through the device mapper interface (including software
RAID Raid, RAID or Raids may refer to: Attack * Raid (military), a sudden attack behind the enemy's lines without the intention of holding ground * Corporate raid, a type of hostile takeover in business * Panty raid, a prankish raid by male college ...
and LVM implementations) may not support barriers, and will issue a warning if that mount option is used. There are also some disks that do not properly implement the write cache flushing extension necessary for barriers to work, which causes a similar warning. In these situations, where barriers are not supported or practical, reliable write ordering is possible by turning off the disk's write cache and using the mount option. Turning off the disk's write cache may be required even when barriers are available. Applications like databases expect a call to fsync() to flush pending writes to disk, and the barrier implementation doesn't always clear the drive's write cache in response to that call. There is also a potential issue with the barrier implementation related to error handling during events, such as a drive failure. It is also known that sometimes some
virtualization In computing, virtualization or virtualisation (sometimes abbreviated v12n, a numeronym) is the act of creating a virtual (rather than actual) version of something at the same abstraction level, including virtual computer hardware platforms, stor ...
technologies do not properly forward fsync or flush commands to the underlying devices (files, volumes, disk) from a guest operating system. Similarly, some hard disks or controllers implement cache flushing incorrectly or not at all, but still advertise that it is supported, and do not return any error when it is used. There are so many ways to handle fsync and write cache handling incorrectly, it is safer to assume that cache flushing does not work unless it is explicitly tested, regardless of how reliable individual components are believed to be.


Near-time extinction due to date-stamp limitation

Ext3 stores dates as
Unix time Current Unix time () Unix time is a date and time representation widely used in computing. It measures time by the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the beginning of the Unix epoch, less adjustments m ...
using four bytes in the file header. 32 bits does not give enough scope to continue processing files beyond January 18, 2038 - the
Year 2038 problem The year 2038 problem (also known as Y2038, Y2K38, or the Epochalypse) is a time formatting bug in computer systems with representing times after 03:14:07 UTC on 19 January 2038. The problem exists in systems which measure Unix time ...
.


ext4

On June 28, 2006,
Theodore Ts'o Theodore (Ted) Yue Tak Ts'o (曹子德) (born 1968) is an American software engineer mainly known for his contributions to the Linux kernel, in particular his contributions to file systems. He is the Secondary developer and maintainer of e2fs ...
, the principal developer of ext3, announced an enhanced version, called ext4. On October 11, 2008, the patches that mark ext4 as stable code were merged in the Linux 2.6.28 source code repositories, marking the end of the development phase and recommending its adoption. In 2008, Ts'o stated that although ext4 has improved features such as being much faster than ext3, it is not a major advance, it uses old technology, and is a stop-gap; Ts'o believes that
Btrfs Btrfs (pronounced as "better F S", "butter F S", "b-tree F S", or simply by spelling it out) is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager (not to be confused ...
is the better direction, because "it offers improvements in scalability, reliability, and ease of management". Btrfs also has "a number of the same design ideas that reiser3/ 4 had".


See also

*
List of file systems The following lists identify, characterize, and link to more thorough information on Computer file systems. Many older operating systems support only their one "native" file system, which does not bear any name apart from the name of the operating ...
*
Comparison of file systems The following tables compare general and technical information for a number of file systems. General information Limits Metadata Features File capabilities Block capabilities Note that in addition to the below table, blo ...
*
Extended file attributes Extended file attributes are file system features that enable users to associate computer files with metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined by the filesystem (such as permissions or re ...
*
Ext2Fsd Ext2Fsd (short for Ext2 File System Driver) is a free Installable File System driver written in C for the Microsoft Windows operating system family. It facilitates read and write access to the ext2, ext3 and ext4 file systems. The driver can b ...
*
Next3 Next3 is a journaling file system for Linux based on ext3 which adds snapshots support, yet retains compatibility to the ext3 on-disk format. Next3 is implemented as open-source software, licensed under the GPL license. Background A snapshot is ...
, modified version of ext3 which snapshots


References


External links

* as of 2004-10-14.
Introducing ext3 – IBM developerWorks Advanced filesystem implementor's guide, Part 7
Free ext2/ext3 Windows driver
Ext2 File System For Windows
GPL ext2/ext3 file system driver for Windows 2000/XP/2003/VISTA/2008 (opensource, supports read & write, supports inode of 256 bytes at maximum to access larger disks)
Ext2 Installable File System For Windows
ext2/ext3 file system driver for MS Windows NT4.0/2000/XP/Vista/7/8/8.1/Server 2003/2008/2008 R2/2012/2012 R2 (freeware, closed source, supports read & write, supports inodes of 256 bytes at maximum to access larger disks)

ext2/ext3 file system driver (read only) for MS Windows NT/2000/XP (opensource), latest version in the web archive
Explore2fs
An explorer-like GUI tool for accessing ext2/ext3 filesystems under MS Windows
"Ext2read"
A windows application to read/copy ext2/ext3/ext4 files with extent and LVM2 support.
UFS Explorer Standard Recovery version 4
Commercial data recovery and file undelete software for Ext2/Ext3 file systems.
ext2/ext3 resizing tools
by Dr. Stephen Tweedie at the Ottawa Linux Symposium, 20 July 2000
State of the Art: Where we are with the Ext3 filesystem
by Mingming Cao, Theodore Y. Ts'o, Badari Pulavarty, Suparna Bhattacharya, IBM Linux Technology Center, 2005
Tutorial
– Determining Your EXT3 Size Limits
fuse-ext2
An open source ext2/ext3 file system driver for
FUSE Fuse or FUSE may refer to: Devices * Fuse (electrical), a device used in electrical systems to protect against excessive current ** Fuse (automotive), a class of fuses for vehicles * Fuse (hydraulic), a device used in hydraulic systems to protect ...
. (Supports
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
10.4 and later (
Universal Binary The universal binary format is, in Apple parlance, a format for executable files that run natively on either PowerPC or Intel-manufactured IA-32 or Intel 64 or ARM64-based Macintosh computers. The format originated on NeXTStep as " Multi ...
), usin
MacFuse
*Windows port of Ext2/Ext4 and other FS i
CROSSMETA
*Red Hat Enterprise Linux

''Chapter 22. Write Barriers''.
Linux clockpocalypse in 2038 is looming and there's no 'serious plan'
{{Filesystem 2001 software Disk file systems File systems supported by the Linux kernel