Ext3


Ext3

infobox filesystem
name = ext3
full_name = Third extended file system
developer = Stephen Tweedie
introduction_os = Linux 2.4.15
introduction_date = November 2001
partition_id = 0x83 (MBR)
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (GPT)
directory_struct = Table, hashed B-tree with dir_index enabled
file_struct = bitmap (free space), table (metadata)
bad_blocks_struct = Table
max_filename_size = 255 bytes
max_files_no = Variable, allocated at creation time [The maximum number of inodes (and hence the maximum number of files and directories) is set when the file system is created. If "V" is the volume size in bytes, then the default number of inodes is given by "V"/213 (or the number of blocks, whichever is less), and the minimum by "V"/223. The default was deemed sufficient for most applications. The max number of subdirectories in one directory is fixed to 32000.]
max_volume_size = 2 TiB – 16 TiB
max_file_size = 2 TiB
filename_character_set = All bytes except NUL and '/'
dates_recorded = modification (mtime), attribute modification (ctime), access (atime)
date_range = December 14, 1901 - January 18, 2038
date_resolution = 1sNanosecond (using undocumented big i-node)
forks_streams =
attributes = No-atime, append-only, synchronous-write, no-dump, h-tree (directory), immutable, journal, secure-delete, top (directory), allow-undelete
file_system_permissions = Unix permissions, ACLs and arbitrary security attributes (Linux 2.6 and later)
compression = No
encryption = No (provided at the block device level)
single_instance_storage = No
OS = Linux, BSD, Windows (through an IFS)
The ext3 or third extended filesystem is a journaled file system that is commonly used by the Linux operating system. It is the default file system for many popular Linux distributions. Stephen Tweedie first revealed that he was working on extending ext2 in a February 1999 kernel mailing list posting [cite web | url=http://marc.info/?l=linux-kernel&m=91926557602501&w=2 | title=Re: fsync on large files | author=Stephen C. Tweedie | date=February 17 1999 | work=Linux kernel mailing list] and the filesystem was merged with the mainline Linux kernel in November 2001 from 2.4.15 onward. [cite web | url=http://marc.info/?l=linux-kernel&m=100650331813822&w=2 | title=2.4.15-final | author=Rob Radez | date=November 23 2001 | work=Linux kernel mailing list] Its main advantage over ext2 is journalling which improves reliability and eliminates the need to check the file system after an unclean shutdown.

Advantages

Although its performance (speed) is less attractive than competing Linux filesystems such as JFS, ReiserFS and XFS, it does have the significant advantage that it does allow in-place upgrades from the ext2 file system without having to back up and restore data as well as using less CPU power than ReiserFS and XFS. [cite journal |author=Justin Piszcz |title=Benchmarking Filesystems Part II |journal=Linux Gazette |issue=122 |url=http://linuxgazette.net/122/TWDT.html#piszcz ] It is also considered safer than the other Linux file systems due to its relative simplicity and wider testing base.

The ext3 file system adds, over its predecessor:
* A Journaling file system
* Online file system growth
* htree indexing for larger directories (specialized version of a B-tree — not to be confused with H tree)Without these, any ext3 file system is also a valid ext2 file system. This 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, which includes a fsck tool. The close relationship also makes conversion between the two file systems (both forward to ext3 and backward to ext2) straightforward.

While in some contexts the lack of "modern" filesystem features such as dynamic inode allocation and extents could be considered a disadvantage, in terms of recoverability this gives ext3 a significant advantage over file systems with those features. The file system metadata is all in fixed, well-known locations, and there is some redundancy inherent in the data structures that may allow ext2 and ext3 to be recoverable in the face of significant data corruption, where tree-based file systems may not be recoverable.

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 in some circumstances. 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 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. [ [http://evuraan.blogspot.com/2007/01/speeding-up-ext3-filesystems.html curious onloooker: Speeding up ext3 filesystems ] ] [ [http://www.ibm.com/developerworks/library/l-fs8.html Common threads: Advanced filesystem implementor's guide, Part 8 ] ]

; 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. XFS and JFS use this level of journaling, but ensure that any "garbage" due to unwritten data is zeroed out on reboot.

Disadvantages

Functionality

Since ext3 aims to be backwards compatible with the earlier ext2, many of the on-disk structures are similar to those of ext2. Because of that, ext3 lacks a number of features of more recent designs, such as extents, dynamic allocation of inodes, and block suballocation. There is a limit of 31998 sub-directories per one directory, stemming from its limit of 32000 links per inode. [cite newsgroup |title=How many sub-directories? |url=http://linux.derkeiler.com/Newsgroups/comp.os.linux.misc/2007-04/msg00153.html ]

ext3, like most current Linux filesystems, cannot be fscked while the filesystem is mounted for writing. Attempting to check a file system that is already mounted may detect bogus errors where changed data has not reached the disk yet, and corrupt the file system in an attempt to "fix" these errors.

ext3 does not use extents, a feature found in newer filesystem designs such as JFS, ext4 and XFS. Instead, a simpler indirect block mapping scheme is used which is less efficient with large files, in terms of storage and processing power. [cite web | url=http://ext2.sourceforge.net/2005-ols/paper-html/node18.html | title=Extents,delayed allocation| author=Rob Radez | year=2005 | work=future of ext3]

Defragmentation

There is no online ext3 defragmentation tool working on the filesystem level. An offline ext2 defragmenter, e2defrag, exists but requires that the ext3 filesystem be converted back to ext2 first. But depending on the feature bits turned on the filesystem, e2defrag may destroy data; it does not know how to treat many of the newer ext3 features. [cite web|url=http://marc.info/?l=ext3-users&m=116231468911590&w=2|title=Post to the ext3-users mailing list|author=Andreas Dilger|work=ext3-users mailing list post]

There are userspace defragmentation tools like Shake [ [http://vleu.net/shake/ Vleu.net: Shake ] ] and defrag [ [http://ck.kolivas.org/apps/defrag/ Index of /apps/defrag ] ] . Shake works by allocating space for the whole file bolt upright and hoping that it will make the newly allocated file less fragmented. It also tries to write files used at the same time next to each other. Defrag works by copying each file over itself. However they only work if the filesystem is reasonably empty. A true defragmentation tool does not exist for ext3. [ [http://www.redhat.com/archives/ext3-users/2005-March/msg00013.html RE: searching for ext3 defrag/file move program ] ]

That being said, 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." [http://www.tldp.org/LDP/sag/html/filesystems.html]

Irrespective of the above (subjective) statement, file fragmentation can be an important issue in server environments such as in multi-media server applications. While it is true that ext3 is more resistant to file fragmentation than FAT filesystems, nonetheless ext3 filesystems can and do get fragmented over time.Fact|date=August 2008 Consequently the successor to the ext3 filesystem, ext4, includes a filesystem defragmentation utility and support for extents (contiguous file regions).

Further examples in which lack of defragmentation in some Linux filesystems (such as ext3) is a serious issue, includes server applications where rapid, concurrent and random file creation, update or access occurs. Such systems include large-scale carrier grade voice mail systems, Media-Messaging Service Centers (MMSCs) and SMS/SMSCs (Short Message Service Centers) servers. Media servers such as large scale voice mail and UMS servers are required to stream hundreds of voice or video streams concurrently to hundreds of users in near real-time conditions. These types of applications are particularly susceptible to file fragmentation; access delays during playback of a voice (e.g. voice mail) or video file, due to multiple fragmentation in the media file, can lead to playback interruption or distortion. As fragmentation increases over time, service capacity of these systems degrades because of increased CPU and I/O overhead resulting from fragmentation induced disk thrashing.

Compression

Support for transparent compression is available as an unofficial patch for ext3. This patch 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. The current patch is named e3compr and can be found here: http://sourceforge.net/projects/e3compr/

Size limits

ext3 has a maximum size for both individual files and the entire filesystem. For the filesystem as a whole that limit is 231−1 blocks. Both limits are dependent on the block size of the filesystem; the following chart summarizes the limits [cite web|url=http://www.charmed.com/txt/ext2.txt|title=Documentation/filesystems/ext2.txt|author=Matthew Wilcox|work=Linux kernel source documentation] :

No checksumming in journal

Ext3 does not do checksumming when writing to the journal. If barrier=1 is not enabled as a mount option (in /etc/fstab), and if the hardware is doing out-of-order write caching, one runs the risk of severe filesystem corruption during a crash. [ [http://archives.free.net.ph/message/20070518.134838.52e26369.en.html Re: Frequent metadata corruption with ext3 + hard power-off ] ] [ [http://archives.free.net.ph/message/20070519.014256.ac3a2e07.en.html Re: Frequent metadata corruption with ext3 + hard power-off ] ]

Consider the following scenario: If hard disk writes are done out-of-order (due to modern hard disks caching writes in order to amortize 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." There is a [http://uwsg.indiana.edu/hypermail/linux/kernel/0805.2/1470.html test program] available to trigger the problematic behavior. 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. [ [http://article.gmane.org/gmane.linux.file-systems/21373 ext4: Add the journal checksum feature] ]

The ext3 barrier option is not enabled by default on almost all popular Linux distributionsFact|date=August 2008, and thus most distributions are at risk. In addition, filesystems going through the device mapper interface (including software RAID and LVM implementations) may not support barriers, and will issue a warning if that mount option is used. [ [http://oss.sgi.com/archives/xfs/2007-12/msg00080.html Re: write barrier over device mapper supported or not?] ] [ [http://madduck.net/blog/2006.08.11:xfs-zeroes/ XFS and zeroed files] ] 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. [ [http://forums.opensuse.org/archives/sls-archives/suse-linux/desktop-environments/379681-barrier-sync.html Barrier Sync] ] 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 data=journal mount option. [ [http://archives.free.net.ph/message/20070518.134838.52e26369.en.html Re: Frequent metadata corruption with ext3 + hard power-off] ]

ext4

An enhanced version of the filesystem is under development; it was announced by Theodore Ts'o [ [http://lkml.org/lkml/2006/6/28/454 LKML: "Theodore Ts'o": Proposal and plan for ext2/3 future development work ] ] on June 28, 2006 under the name of ext4.

ee also

*ext2
*List of file systems
*Comparison of file systems
*Extended file attributes

References

External links

* [http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq.html Linux ext3 FAQ] as of 2004-10-14.
* [http://www-128.ibm.com/developerworks/linux/library/l-fs7.html Introducing ext3 - IBM developerWorks Advanced filesystem implementor's guide, Part 7]
* [http://ext2fsd.sourceforge.net/ Ext2 File System For Windows] GPL ext2/ext3 file system driver for Windows NT/2000/XP (opensource, supports read & write)
* [http://www.fs-driver.org/ Ext2 Installable File System For Windows] ext2/ext3 file system driver for MS Windows NT/2000/XP (freeware, supports read & write on Windows NT4.0/2000/XP/2003/Vista on x86/AMD64)
* [http://uranus.it.swin.edu.au/~jn/linux/ext2ifs.htm EXT2 IFS] ext2/ext3 file system driver (read only) for MS Windows NT/2000/XP (opensource)
* [http://www.chrysocome.net/explore2fs Explore2fs] An explorer-like GUI tool for accessing ext2/ext3 filesystems under MS Windows
* [http://ext2resize.sourceforge.net/ ext2/ext3 resizing tools]
* [http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html Presentation on EXT3 Journaling Filesystem] by Dr. Stephen Tweedie at the Ottawa Linux Symposium, 20 July 2000
* [http://www.howtoadvice.com/Ext3Max/ Tutorial] - Determining Your EXT3 Size Limits


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Ext3 — Saltar a navegación, búsqueda ext3 Desarrollador Stephen Tweedie Nombre completo Third extended file system Introducido noviembre de 2001 (Linux 2.4.15) Identificador de la partición 0x83 (MBR) E …   Wikipedia Español

  • ext3 — Desarrollador(a) Stephen Tweedie Nombre completo Third extended file system Introducido noviembre de 2001 (Linux 2.4.15) Identificador de la partición 0x83 (MBR) EBD0A0A2 B9E5 4433 87C0 68B6B72699C7 (GPT) …   Wikipedia Español

  • ext3 — Hersteller Open Source Gemeinschaft Vollständige Bezeichnung Third extended file system Erstveröffentlichung November 2001 (Linux 2.4.15) Partitionskennung 0x83 (MBR) EBD0A0A2 B9E5 4433 87C0 68B6B72699C7 (GPT) …   Deutsch Wikipedia

  • ext3 — Développeur Stephen Tweedie Nom anglais Extended file system 3 Introduction novembre 2001 (Linux 2.4.15) Identificateur de partition 0x83 (MBR) Structure Contenu des répertoires …   Wikipédia en Français

  • Ext3 — Diffuseur de logiciel Stephen Tweedie Nom anglais Extended file system 3 Introduction novembre 2001 (Linux 2.4.15) Identificateur de partition 0x83 …   Wikipédia en Français

  • ext3 — Файловая система Third extended file system Дата представления Ноябрь 2001 (Linux 2.4.15) Структура Размещение файлов битовая карта (свободное пространство), table (метаданные) Сбойные сектора Table …   Википедия

  • Ext3 — или 3 я расширенная файловая система журналируемая файловая система, используемая в операционных системах на ядре Linux, является файловой системой по умолчанию во многих дистрибутивах. Основана на ФС ext2, начало разработки которой положил… …   Википедия

  • EXT3 — (third extended filesystem o tercer sistema de archivos extendido ) es un sistema de archivos con registro por diario (en inglés journaling) por el solo hecho de tener un espacio apartado para el buffer de journaling . Este sistema, el cual se… …   Enciclopedia Universal

  • Ext3 — Das ext3 (third extended filesystem) ist ein Journaling Dateisystem, das für den Linux Kernel entwickelt wurde. Bei vielen Linux Distributionen ist es das Standard Dateisystem. ext3 Hersteller Open Source Gemeinschaft Vollständige Bezeichnung… …   Deutsch Wikipedia

  • ext3 — noun A type of Linux file system aimed at improving on the ext and ext2 file systems, and including journaling See Also: ext, ext1, ext2 …   Wiktionary


Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.