Linux File Sytem ext2 and ext3
Posted on November 9, 2007
Linux have a lot of different kinds of file system such as ext, ext2, ext3, ReiserFS, Reiser4, XFS, JFS and etc. Today we would like to talk about Linux File System ext 2 & ext3.
So what is ext2 and ext3 file system?
The ext2 or second extended filesystem 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). It is fast enough that it is used as the benchmarking standard. Although ext2 is not a journaling file system, but its successor in early stage.
The limitation of the ext2-file system can be the file format of the data medium on one hand and the operating system's kernel on the other hand. Mostly these factors will be determined once when the file system is built. They basically 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 with a lack of being able to handle files with a size above 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 actual limit of the number of files in a directory is very theoretical, because before reaching the limit of 1.3 × 1020 files it will become hard to find new well-defined file names.
The ext3 or third extended file system is a journalled file system that is commonly used by the Linux operating system. It is the default file system for many popular Linux distributions.
Basically ext3 file system adds, over its predecessor:
- A journal (slow, but least risky) Both metadata and file contents are written to the journal before being committed to the main file system. This improves reliability at a performance penalty because all data has to be written twice. Without this setting in /etc/fstab, a file being edited in-place during a power outage or kernel panic risks being corrupted, depending on how the application is writing to the file.
- Tree-based directory indices for directories spanning multiple blocks.
- Availability (The ext3 file system does not require a file system check, even after an unclean system shutdown, except for certain rare hardware failure cases (e.g. hard drive failures). This is because the data is written to disk in such a way that the file system is always consistent.)
- Data Integrity (Using the ext3 file system can provide stronger guarantees about data integrity in case of an unclean system shutdown).
- Speed(The ext3 file system is often faster (higher throughput) than ext2 because ext3's journaling optimizes hard drive head motion.
- Easy Transition (The ext3 is forward and backward compatible with ext2. It is easy to change from ext2 to ext3 and gain the benefits of a robust journaling file system, without reformatting).
- Cross platform (ext3 has broad cross-platform compatibility, working on 32- and 64- bit architectures, and on both little-endian and big-endian systems).
Nearly forget about the important point here. Normally interviewer will ask about the ext2 and ext3 file system during Linux related interview. Good to know
Source: Redhat
Possibly Related Posts:
- Argument list too long
- RSS Feed Submissions
- Geo Positions
- Interesting about Google Suggest
- Setup a Linux Highly Availability NFS servers
Comments
Leave a Reply