What is Linux File System and it’s types?

The Linux File System is a multifarious varied structured file system which has three necessary layers for functioning.

  • The Logical File System
  • The Virtual File System
  • The Physical File System

The Logical File System:

The Logical File System serves the purpose between user applications and all the file system managing operations like opening, reading and closing files.

The Virtual File System:

The Virtual File System is above the logical file system and it assists the contemporaneous operation of multiple physical file systems, providing a standardized interface for compatibility.

The Physical File System:

The Physical File System is responsible for the tactile management and storage of physical memory blocks in the disk, ensuring efficient data allocation and retrieval.

Altogether, these layers perform important roles in data management and in efficient data handling in the Linux Operating System.

Characteristics of a File System:

  • Space Management
  • Filenames
  • Directories
  • Metadata
  • Utilities and design

Space Management: is an important characteristic and it determines how data is managed in storage space or a device. Relating to the fragmentation particles and memory blocks applied in it.

Filenames: relates to the certain restrictions a file system may have to file names such as name length, case sensitiveness and specific characters.

Directories: refer to the folders (also called as a directory) which store files in linear and hierarchical manner while maintaining an index table of all files in the directories.

Metadata: refers to all the important information and elements stored in a file system about the file existence such as it’s access permissions, data length, type of device, modified date-time and other important attributes. This is called metadata.

Utilities and design: Utilities include file systems which provide features for initializing, backup, recovery, deleting, renaming, moving, copying and control access of files and folders. Design includes the limitations a file system keeps due to implementations on the amount of data they can store.

Types of a Linux File System:

 Here are the nine types of Linux File System.

  • Ext
  • Ext2
  • Xiafs
  • Ext3
  • JFS
  • ReiserFS
  • XFS
  • Ext4
  • Btrfs

These nine file systems are also considered the roots of Linux File System. Let’s see what we can understand through these points.

1.Ext (Extended File System):

Extended File System is the first file system that was specially designed for Linux. Developed in 1992.It is considered to be the first member of the ext family of file systems.

2. ext2(Extended File System 2):

Ext2 is a non-journaling file system that is most probably preferred to use with flash drives and SSDs. It was implemented in 1993. It solved the problem of inode modification, separate timestamp for access and data modification. Due to it’s non-journaling element, it takes time to load at boot time.

It was released as an upgrade to the original Ext file system, providing more scalability and performance. For usage with Linux-based operating systems, Ext2 is a sturdy and dependable file system.

With a maximum file size of up to 2 terabytes and a maximum volume size of up to 4 terabytes, it supports big file sizes and volumes. Ext2 offers effective access and storage management by using a conventional Unix-style inode structure to arrange and manage files and directories.

Nevertheless, one drawback of Ext2 is that it lacks journaling, which implies that it lacks an internal method for recovering from power outages or system crashes.

3.Xiafs:

Xiafs is a non-functioning type of a Linux System because of it’s less powerful factor and functional than ext2. It is no longer in use anywhere.

4. ext3(Extended File System 3):

Ext3 is a journaling file system and it was developed in 1999. It is a reliable linux file system with a fast boot time, unlike ext2. It also avoids long delays during system boot even if the file system is inconsistent following an unexpected shutdown. The ext3 contains other factors which make it better and different than ext2 are online system growth and Htree indexing which enables it to function for large directories.

Third Extended File System, or Ext3, is a journaled file system that was first introduced as an upgrade from Ext2. In order to improve reliability and recoverability in the event of system crashes or power outages, journaling capabilities are added while maintaining the essential characteristics of Ext2.

Ext3 is appropriate for a variety of applications because, like Ext2, it supports huge file sizes and volumes. Because of its continued compatibility with Ext2, upgrading from Ext2 to Ext3 can be done smoothly and without requiring data migration. The highest file size allowed in the Ext2 file system is 2 terabytes, and the maximum volume size allowed is 32 terabytes.

Ext3 uses a journaling approach to ensure consistency and lower the risk of data corruption by recording changes to the file system prior to their commitment. This journaling feature improves overall system stability and speeds up file system recovery during system reboots.

5.JFS (Journaled File System):

JFS (Journaled File System) was first created by IBM in 1990. The first original JFS was implemented for Linux in 1999 taken to open source. JFS is no longer in use due to better performance of ext4 which was released in 2006. But it performs well under some  kind of loads.

The maximum file size and maximum volume size of the Journaled File System (JFS) are both 4 petabytes (PB). Because of its enormous capacity, JFS can handle a wide range of storage-intensive workloads and applications. It can also handle very big files and volumes.

6.RaiserFS:

RaiserFS is a journaled linux file system which was developed in 2001. RaiserFS has tail packing to reduce internal fragmentation. It uses B+ TREE technique for directory lookups and updates in linear time. RaiserFS was the default file system in Suse Linux till version 6.4 until switching to ext3 in 2006 for version 10.2.

Up until version 6.4, it was the default file system in SUSE Linux. For version 10.2, it was replaced in 2006 with ext3.

The highest file size allowed by ReiserFS is 8 terabytes (TB), which offers plenty of space for individual files inside the file system. Furthermore, ReiserFS allows for a maximum volume size of 16 terabytes (TB), which facilitates the effective handling of substantial storage needs in Linux settings.

7.XFS:

XFS is a journaling file system and was ported to Linux in 2001. It acts as the default file system for many Linux distributions. It excels at parallel I/O operations. It offers features like online defragmentation, snapshots, sparse files, variable block sizes and excellent capacity.

Features like configurable block sizes, sparse files, online defragmentation, snapshots, and exceptional capacity are all included. It is also very good at I/O operations in parallel.

The XFS file system can handle exceptionally large files since it has an 8 Exabyte maximum file size limit. Furthermore, XFS allows for a maximum volume size of 8 Exabyte, which offers sufficient storage for a wide range of workloads and applications.

8.Ext4(The Extended File System 4):

The ext4 refers to the journaling file system developed in 2006. It has backward compatibility feature with ext3 and ext2. It also provides other important features such as persistent pre-allocation, check-summing of metadata and large file sizes.

It has compatibility with Windows and Macintosh.

In addition to offering multiple features including persistent pre-allocation, an infinite number of subdirectories, metadata check summing, and high file sizes, it is backward compatible with both ext3 and ext2.

Many Linux distributions ship with the ext4 file system by default, which is also compatible with Windows and Macintosh. The maximum file size in the Ext4 file system can vary from 16 terabytes to 1 Exabyte, based on a number of variables including block size and file system characteristics. One Exabyte is the largest volume size that Ext4 supports.

9. btrfs (Better/Butter/B-tree FS):

The Btrfs is an important file type of Linux System and it comprises of following features including snapshotting, drive pooling, data scrubbing, online defragmentation and self-healing. Btrfs is considered a default file system for Fedora Workstation.

The maximum file size and maximum volume size in the Btrfs file system are both 16 Exabyte. Because of its high capacity, Btrfs is an excellent choice for handling large-scale storage needs. It provides flexibility and scalability for a wide range of use cases, from single files to entire volumes.

AN OVERVIEW OF ITS HEIRARCHY

The hierarchical structure of the Linux file system, which resembles the branches of a large tree, is its fundamental component. All other directories and files extend from the tall root directory (/), which serves as the origin, like branches extending upward. To discover, access, and modify files and folders in the Linux system efficiently, users and administrators must comprehend the hierarchy.

DIRECTORY STRUCTURE:

/root directory: This is the top-level directory of Linux. It contains all the other directories, subdirectories and the files. It is often written as /.

/bin: Binaries is what the /bin represents. The programs and command-line tools needed for fundamental system administration tasks are contained in this directory.

/boot: The kernel images and boot loader files required to boot the system are located in the /boot directory.

/dev: Device files for virtual and hardware devices, including printers, drives, and terminals, are stored in the /dev directory.

/etc: Various programs and services on the system use the system configuration files found in the /etc directory.

/home: The user home directories on the system are located in the /home directory. Within /home, each user has a subdirectory where they can keep their own files and preferences.

/lib: Shared library files that are required by different system programs are located in the /lib directory.

/media: You can mount removable media, such CDs, DVDs, and USB devices, using the /media directory.

/mnt: File systems, including network file systems and disk images, can be momentarily mounted using the /mnt directory.

/opt: Extra software packages that are not included in the main system are kept in the /opt directory.

/proc: Information on active processes and system resources can be found in the /proc directory, which is a virtual file system.

/run: Temporary files are stored in the /run folder

CONCLUSION

Essential elements of the operating system, the Linux file system and directory structure let users efficiently manage and arrange their data while preserving system security and integrity.
The file system used by Linux is hierarchical and structured like a tree. The root directory is the directory at the top of every Linux file system. Under Linux, there exist various file system types, each with unique benefits and drawbacks based on the specific application. System binaries, boot files, device files, configuration files, user files, libraries, and system-generated files are all stored in different directories inside the Linux directory structure. For more Linux related blogs and tutorials please check our site simplealltech.com.

 

Leave a Comment