Everything about Linux file systems

By | September 15, 2014
Don't be shellfish...Share on Google+Share on FacebookTweet about this on TwitterPin on PinterestShare on StumbleUponEmail this to someone

folder-files-iconA File System basically describes how data is stored and retrieved. It also defines the various data structures that are used to store the data and organize them into blocks for efficient storage and retrieval. It describes the various distinctive features like recoverablity, file size, partition size etc. Being Linux user, it is imperative to know about the various pros and cons of some of the file systems that are used generally. This article basically describes some of the most commonly used Linux file systems for Linux based Operating System.

 Second Extended File System 2 (ext2)

  • Stands for second extended file system , initially developed by Remy Card .
  • Introduced in January 1993 as a replacement for extended filesystem.
  • Initially developed for Linux and Hurd operating System.
  • Supports standard Unix file types.
  • Provided support for long file names.
  • Each directory is a list of directory entries.
  • Files are represented by an index node .
  • Inefficient for large directories.
  • Directory indexing is not available.
  • Recommended for USB and flash drives.

 Third Extended File System (ext3)

  • Developed by Stephen Tweedie in 2001.
  • Allows in-pace upgrade from ext2, i.e. no need to backup and restore data.
  • Adds Hashed B-Tree indexing for large directories.
  • Prevents loss of data in the event of unsafe shutdown.
  • Introduced the feature of journal.
  • Recoverable even in case of significant data corruption.
  • No defragmentation tool available.
  • Lack of snapshot support.
  • More preferred due to stability reasons.

 Fourth Extended File System (ext4)

  • Introduced in 2006 for Linux Operating Systems.
  • Backward compatible to ext3 and ext2.
  • Supports File size upto 16TB.
  • Improves performance by using a technique called delayed allocation.
  • Allows unlimited sub directories.
  • Journal Check summing for better performance.
  • Improved timestamps for better granuality.

Below you can see more details about these file systems.

 File System Max File Size  Max Partition Size Max Number of Files Max File name Length Suitable For Journaling

ext2

 2 TB

32 TB

10^18

 255 Bytes  USB flash drives and memory cards No

ext3

 2 TB

Advertisement

32 TB

Allocated at creation time

 255 Bytes  Most stable file system , good for recovering corrupt data Yes

ext4

 16 TB

1 EiB

4 Billion

 255 Bytes  Highly extended storage limits.  Yes

 What exactly is a Journaling File System ?

A Journaling File System keeps track of all the changes made to data on a hard disk , on a file called a journal so as to repair inconsistencies in the event of data corruption or loss due to various unavoidable reasons. These systems write metadata , (i.e. data about data ) into the journal before each command returns. There are two types of journals

  • Physical Journals : It logs an advance copy of every block that will later be written to the main file system. These impose a significant performance penalty.
  • Logical Journals : stores only changes to file metadata.

Image Source : www.iconarchive.com

Leave a Reply

Your email address will not be published. Required fields are marked *