You are on page 1of 2

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."[19] While ext3 is more resistant to file fragmentation than the FAT filesystem, nonetheless ext3 filesystems can get fragmented over time or on specific usage patterns, like slowlywriting large files.[20][21] Consequently the successor to the ext3 filesystem, ext4, includes a filesystem defragmentation utility and support for extents (contiguous file regions). There is no support of deleted file recovery in file system design. Ext3 driver actively deletes files by wiping file inodes[22] for crash safety reasons. That's why accidental 'rm -rf ...' may cause permanent data loss. What is a Journaling Filesystem? A journaling filesystem keeps a journal or log of the changes that are being made to the filesystem during disk writing that can be used to rapidly reconstruct corruptions that may occur due to events such a system crash or power outage. The level of journaling performed by the file system can be configured to provide a number of levels of logging depending on your needs and performance requirements. A journaled file system records information in a log area on a disk (the journal and log do not need to be on the same device) during each write. This is a essentially an "intent to commit" data to the filesystem. The amount of information logged is configurable and ranges from not logging anything, to logging what is known as the "metadata" (i.e ownership, date stamp information etc), to logging the "metadata" and the data blocks that are to be written to the file. Once the log is updated the system then writes the actual data to the appropriate areas of the filesystem and marks an entry in the log to say the data is committed. After a crash the filesystem can very quickly be brought back on-line using the journal log reducing what could take minutes using fsck to seconds with the added advantage that there is considerably less chance of data loss or corruption.

What are the key differences between ext3 and ext4?


The main new features in ext4 are below, and are described more fully in New_ext4_features:

extent-mapped files for more efficient storage of file metadata (EXTENTS) multi-block and delayed allocation for faster/better file allocations support for larger filesystems (up to 2^48 blocks, currently 2^60 bytes) (64_BIT)

optimized storage of filesystem metadata like bitmaps and inode table (FLEX_BG) less overhead for e2fsck, on-disk checksum of group descriptors (GDT_CSUM) removed 32000 subdirectory limit (DIR_NLINKS) nanosecond inode timestamps (EXTRA_ISIZE)

In addition, use of a journal is optional and may be enabled or disabled with tune2fs and the "has_journal" option.

You might also like