Ext2

Ext2

infobox filesystem
name = ext2
full_name = Second extended file system
developer = Rémy Card
introduction_os = Linux
introduction_date = January 1993
partition_id = Apple_UNIX_SVR2 (Apple Partition Map)
0x83 (Master Boot Record)
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (GPT)
directory_struct = Table
file_struct = bitmap (free space), table (metadata)
bad_blocks_struct = Table
max_filename_size = 255 characters
max_files_no = 1018
max_volume_size = 16-32 TiB
max_file_size = 2-64 TiB
filename_character_set = Any byte except NUL and '/'
dates_recorded = modification (mtime), attribute modification (ctime), access (atime)
date_range = December 14, 1901 - January 18, 2038
date_resolution = 1s
forks_streams =
attributes =
file_system_permissions = POSIX
compression = No (Available through patches)
directory_struct =
encryption = No
OS = Linux, BSD, Windows (through an IFS), Mac OS X
The ext2 or second extended file system is a file system for the Linux kernel. It was initially designed by Rémy Card as a replacement for the extended file system (ext). Although ext2 is not a journaling file system, its successor, ext3, provides journaling and is almost completely compatible with ext2.

The canonical implementation of ext2 is the ext2fs filesystem driver in the Linux kernel. Other implementations (of varying quality and completeness) exist in GNU Hurd, Mac OS X (third-party), Darwin (same third-party as Mac OS X but untested), some BSD kernels and as third-party Microsoft Windows drivers. ext2 was the default filesystem in several Linux distributions, including Debian and Red Hat Linux, until supplanted more recently by ext3.

History

The early development of the Linux kernel was made as a cross-development under the Minix operating system. Naturally, it was obvious that the Minix file system would be used as Linux's first file system. The Minix file system was mostly free of bugs, but used 16-bit offsets internally and thus only had a maximum size limit of 64 megabytes. There was also a filename length limit of 14 characters. Because of these limitations, work began on a replacement native file system for Linux.

To ease the addition of new file systems and provide a generic file API, VFS, a virtual file system layer was added to the Linux kernel. The extended file system (ext), was released in April 1992 as the first file system using the VFS API and was included in Linux version 0.96c. The ext file system solved the two major problems in the Minix file system (maximum partition size and filename length limitation to 14 characters), and allowed 2 gigabytes of data and filenames of up to 255 characters. But it still had problems: there was no support for separate access, inode modification and data modification timestamps.

As a solution for these problems, two new filesystems were developed in January 1993: xiafs and the second extended file system (ext2), which was an overhaul of the extended file system incorporating many ideas from the Berkeley Fast File System. ext2 was also designed with extensibility in mind, with space left in many of its on-disk data structures for use by future versions.

Since then, ext2 has been a testbed for many of the new extensions to the VFS API. Features such as POSIX ACLs and extended attributes were generally implemented first on ext2 because it was relatively simple to extend and its internals were well-understood.

On Linux kernels prior to 2.6, restrictions in the block driver mean that ext2 filesystems have a maximum file size of 2TiB. Later Linux kernels allow for larger file sizes, however 32-bit systems are still restricted to 2 TiB file sizes.

ext2 is still recommended over journaling file systems on bootable USB flash drives and other solid-state drives. ext2 performs fewer writes than ext3 since it does not need to write to the journal. As the major aging factor of a flash chip is the number of erase cycles, and as those happen frequently on writes, this increases the life span of the solid-state device. [cite web|url=http://www.supertalent.com/tools/ssd.php|title=Solid State Disk Drives|publisher=Super Talent Technology] Another good practice for filesystems on flash devices is the use of the "noatime" mount option, for the same reason.

ext2 data structures

The space in ext2 is split up in blocks, and organized into block groups, analogous to cylinder groups in the Unix File System. This is done to reduce external fragmentation and minimize the number of disk seeks when reading a large amount of consecutive data.

Each block group contains a superblock, the block group bitmap, inode bitmap, followed by the actual data blocks.

The superblock contains important information that is crucial to the booting of the operating system, thus backup copies are made in every block group of each block in the file system. However, only the first copy of it, which is found at the first block of the file system, is used in the booting.

The group descriptor stores the value of the block bitmap, inode bitmap and the start of the inode table for every block group and these, in turn is stored in a group descriptor table.

Example of ext2 inode structure:

File system limits

The reason for some limits of the ext2-file system are the file format of the data and the operating system's kernel. Mostly these factors will be determined once when the file system is built. They depend on the block size and the ratio of the number of blocks and inodes. Block sizes of 8 KB are only possible on alpha-architectures by default.

There are also many userspace programs that can't handle files larger than 2 GB.

The limit of sublevel-directories is about 32768. If the number of files in a directory exceeds 10000 to 15000 files, the user will normally be warned that operations can last for a long time. The theoretical limit on the number of files in a directory is 1.3 × 1020, although this is not relevant for practical situations.

ee also

*e2fsprogs
*ext : ancestor of ext2
*ext3 : extended version of ext2
*ext4 : fourth extended file system, under development.
*StegFS : a steganographic file system based on ext2
*List of file systems
*Comparison of file systems
*Filesystem in Userspace (FUSE)

References

*cite journal|author=Card, Rémy. & Ts’o, Theodore. & Tweedie, Stephen|year=1994|url=http://web.mit.edu/tytso/www/linux/ext2intro.html|title=Design and implementation of the second extended filesystem|journal=Proceedings of the First Dutch International Symposium on Linux.|id=ISBN 90-367-0385-9

Further reading

*cite paper|author=John Newbigin|title=John's spec of the second extended filesystem|url=http://uranus.it.swin.edu.au/~jn/explore2fs/es2fs.htm
*cite paper|author=Dave Poirier|title=The Second Extended File System: Internal Layout|url=http://www.nongnu.org./ext2-doc/ext2.html|date=2001
*cite conference|url=http://e2fsprogs.sourceforge.net/extensions-ext23/|title=Planned Extensions to the Linux Ext2/Ext3 Filesystem|author=Theodore Ts'o and Stephen Tweedie|booktitle=USENIX 2002 Annual Technical Conference|date=June, 2002

External links

* [http://e2fsprogs.sourceforge.net/ext2.html ext2fs user-space tools]
* [http://sourceforge.net/projects/ext2fsx/ ext2 driver for Mac OS X]
* [http://ext2fsd.sourceforge.net/ ext2fsd] open source ext2/ext3 file system driver for win2k/xp/server 2003/vista (x86/amd64), supports read/write and various codepages including utf8.
* [http://win2fs.sourceforge.net/ Win2fs] An open source ext2 File-system driver for Windows. Lets you mount and access (read,write) ext2 file-systems under Windows (NT/2000/XP).
* [http://www.fs-driver.org/ Ext2 Installable File System For Windows] ext2/ext3 file system driver for MS Windows NT/2000/XP/2003/Vista (x86/amd64, supports read & write). Freeware.
* [http://winext2fsd.sourceforge.net/ WinExt2Fsd] ext2 file system driver for MS Windows NT ONLY (x86, supports read & write)
* [http://uranus.it.swin.edu.au/~jn/linux/ext2ifs.htm EXT2 IFS] ext2/ext3 file system driver for MS Windows NT/2000/XP (GPL, readonly).
* [http://www.chrysocome.net/explore2fs Explore2fs] An explorer-like GUI tool for accessing ext2/ext3 filesystems under MS Windows. Free software (GNU License).
* [http://e2compr.sourceforge.net/ e2compr] transparent compression for the ext2 filesystem
* [http://www.freebookcentre.net/file_system_specification/file_system_specifications.html File System Specifications] Collection of various types of file system formats


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • ext2 — Разработчик Реми Кард (англ.) Файловая система Second extended file system Дата представления Январь 1993 (Linux) Метка тома Apple UNIX SVR2 (Apple Partition Map) 0x83 (Master Boot Record) EBD0A0A …   Википедия

  • Ext2 — Hersteller Rémy Card Vollständige Bezeichnung Second extended file system Erstveröffentlichung Januar 1993 (Linux) Partitionskennung Apple UNIX SVR2 (Apple Partition Map) 0x83 (Master Boot Record) EBD0A0A2 B9E5 4433 87C0 68B6B72699C7 (GPT …   Deutsch Wikipedia

  • ext2 — Hersteller Rémy Card Vollständige Bezeichnung Second extended file system Erstveröffentlichung Januar 1993 (Linux) Partitionskennung Apple UNIX SVR2 (Apple Partition Map) 0x83 (Master Boot Record) EBD0A0A2 B9E5 4433 87C0 68B6B7269 …   Deutsch Wikipedia

  • Ext2 — или 2я расширенная файловая система  файловая система для ядра Linux. Она была разработана Rémy Card ом в качестве замены для extended file system. Она достаточно быстра для того, чтобы служить эталоном в тестах производительности файловых… …   Википедия

  • Ext2 — Saltar a navegación, búsqueda ext2 Desarrollador Rémy Card Nombre completo Second extended file system Introducido Enero de 1993 (Linux) Identificador de la partición Apple UNIX SVR2 (Apple Partition Map) 0x83 ( …   Wikipedia Español

  • Ext2 — Diffuseur de logiciel Rémy Card Nom anglais Extended file system 2 Introduction Janvier 1993 (Linux 2.?) Identificateur de partition 0x83 ( …   Wikipédia en Français

  • ext2 — Développeur Rémy Card Nom anglais Extended file system 2 Introduction Janvier 1993 (Linux 0.99.?) Identificateur de partition 0x83 (MBR) Structure Contenu des répertoires …   Wikipédia en Français

  • EXT2 — can refer to:*EXT2, a human gene *ext2, a file system for the Linux kernel …   Wikipedia

  • EXT2 — (second extended filesystem o segundo sistema de archivos extendido ) fue el sistema de archivos estándar en el sistema operativo GNU/Linux por varios años y continúa siendo ampliamente utilizado. Fue diseñado originalmente por Rémy Card. La… …   Enciclopedia Universal

  • Ext2-2 — Der Begriff ext steht für das unter Linux verwendete Dateisystem extended file system, der Nachfolger des Minix Dateisystems und Vorgänger von ext2, ext3 und ext4 die mathematische Gruppe, siehe Ext (Mathematik) das clientseitige JavaScript bzw.… …   Deutsch Wikipedia

Share the article and excerpts

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