Types of a Linux File Systems

Windows users are restricted to the NTFS file system, and Linux users often stick to the ext4 file system while installing the new Linux distribution.

Besides Ext4, there are btrfs, exfat, ext2, ext3, ext4, f2fs, fat16, fat32, hfs, hfs+, jfs, linux-swap, lvm2 pv, minix, nilfs2, ntfs, reiser4, reiserfs, udf, xfs, and many more. Take a pause, don’t hesitate because most of them are deprecated.

How to Determine the File System Type in Linux (Ext2, Ext3, or Ext4)?

There are around six important file systems that we should know as Linux users. But before that, let us understand the story of file systems and partition and how they are connected.

Linux File Systems
File Systems

What is Partition?

Understanding the file system is quite challenging until the concept of partition is cleared. Instead of explaining in fancy definition, which usually goes out of your brain, I will explain it with an example.

Storage devices like Hard drives and SSD are just like our home, where you and your parents separately live in a different room. When a wall is built that divides up into different rooms known as a partition.

Partitioning allows us to use different types of file systems. We can separate how our files are arranged inside our file system. There is relatively more benefit of disk partitioning.

Benefits of Disk Partitioning

  1. Allow us to run multiple Operating System.
  2. Reduce the rate of data corruption.
  3. Allocating separate disk space, data, and applications for specific users across different partition.
  4. Improve data read and write speed.
  5. Increase the option of data recovery.

Depending on your requirements, you can have multiple partitions in the same computer system.

Should I have one or mutiple partition?

It’s more of your choice; for Windows users, you can separate your system partition (meaning C:\) with another (Like D:\). Store all of your files and documents in that new partition in case of system failure or data corruption.

For Linux users, you can create separate partitions for (/) and (/home) in case of boot failure can avoid damaging your precious files.

What is File Systems?

If a partition is a wall of the room, then the file system is a way to arrange things inside that room. Systematic file systems help us to retrieve files more quickly and efficiently.

A file system process is to manage how and where data is on a storage disk. It stores and organizes data and can be considered an index page of partition.

Filename, file size, date of creation, date of modification, and a few more metadata type information are managed by the file system.

There are different types of file systems, few are deprecated, and others can be differentiated with their features and drawbacks.

Types of File Systems?

At the beginning of the article, I have introduced you to a list of all recognized file systems in Linux (ex: btrfs, exfat, ext2, ext3, ext4, f2fs, fat16, fat32, hfs, hfs+, jfs, linux-swap, lvm2 pv, minix, nilfs2, ntfs, reiser4, reiserfs, udf, xfs)

Today, we will discuss the most recognized file systems in Linux.

ext2, ext3, and ext4

Ext (extended file system) was introduced at the beginning of 1992 with an improved version of ext2, except it does not support the journaling feature. Ext3 came in 2001 along with Linux Kernel 2.4.15 to support journaling and optimizing performance.

Ext4 is a standard for major Linux distribution that came into 2008 along with Linux Kernel 2.6.19, which supports large file sizes from 16GB to 16TB. Few other features were introduced with Ext4 like multiblock allocation, delayed allocation, journal checksum, fast fsck, etc.

JFS

JFS stands for (Journaled File System) is a 64bit Journaling file system developed by IBM for AIX UNIX. The goal is to keep track of every change and modification for files and folders in a log file (or journal).

Rather than adding journaling as an addon feature likes in the ext filesystem. JFS starts journaling from the beginning of the first boot.

Lack of a system resource like CPU power with the requirement of stability and features like journaling, JFS is pretty handy.

XFS

XFS was a high-speed JFS (Journaling File System) introduced in 1993 by Silicon graphics. It ensures data consistency by employing metadata journaling and also supports write barriers.

Write barrier is a mechanism for enforcing a particular ordering in a sequence of writes to a storage system. XFS is heavy for CPU load, consuming twice per metadata compared to other file systems.

BTRFS

BTRFS is an advanced file system successor of Ext, supported by Synology. The goal of BTRFS is to reduce fault tolerance, improve file management and data protection.

How to Add or Extend Btrfs File System Storage in Linux

A personal computer with BTRFS is okay but avoid implementing it on the server due to lack of stability.

Linux-Swap

Swap is used for memory paging, storing the current stage of the system into swap memory during hibernation. A system without swap memory cannot go into hibernation, require the same amount of swap space relative to RAM size.

Besides memory paging, it also works as a secondary ram when the ram is exhausted, and there is memory pressure. Once pressure is released from the ram, all the processing continues back to the ram.

LVM

LVM (Logical Volume Manager), as the name suggests it can create a single logical volume for multiple Hard Drives or SSD. It allows dynamic volume resizing.

RAID users can easily understand the benefits of LVM. For regular users, having multiple secondary disks can also be beneficial to use LVM.

Which File system should I use?

Again it’s more of a personal choice than a recommendation. If you don’t have any personal requirements for specific features, then go with the standard Ext4 file system.

Need to have a good file system where your data is a priority, then JFS and BTRFS will be good choices. Also, don’t forget to consider the XFS file system.

Have multiple storage devices? Then the LVM is the best option to create a single logical drive with the features like dynamic volume resizing.

Swap is an optional but essential file system, and I strongly recommend having one partition for a swap file system with a size relative to your RAM size.

Final Thought

There are several file systems, which I tried to cover as much as I could. If your favorite file system is missing from the list, let us know in the comment section.

Leave a Reply