Different Types of Linux File Systems

different types of linux file systems.

When we want to install the Linux operating system, maybe we are confused when choosing which type of file system should be used for our Linux partition. Therefore we must know the Differences in the Types of Linux File Systems. But before discussing the different types of Linux file systems, you must first know about Journaling.

What is Journaling?

One thing you will notice when choosing a file system is that some of them are marked as “journaling” file systems and some are not. Journaling is designed to prevent data corruption from corruption and sudden power loss. Let's say your system is halfway through writing a file to disk and suddenly loses power. Without journaling, your computer won't know if the file was fully written to disk, as a result, the file will remain on disk, corrupted.

With journaling, your computer will note that it will write a certain file to disk in the journal, then write that file to disk, and delete the job from the journal. If the power is partially out while writing a file, Linux will check the journal file system on boot and resume partially completed work. This is to prevent data loss and file corruption.

Journaling doesn't slow down disk write performance, but it's worth using on a desktop or laptop. Journaling also doesn't cause the overhead you might think. Complete files are not written to the journal. Instead, only the metadata files, inodes, or disk locations are recorded in the journal before being written to disk.

Every modern file system supports journaling, and you'll want to use a file system that supports journaling when setting up your desktop or laptop. File systems that do not offer to journal are available for use on high-performance servers and other systems where administrators want to use the extra performance. They're also ideal for removable flash drives, where you don't want the higher overhead and additional journaling.

Different Types of Linux File Systems

While Microsoft develops Windows and Apple controls macOS, Linux is an open-source project developed by the community. Anyone (or any company) with the skills and time can create a new Linux file system. That's one reason why there are so many choices. Here's the difference:

1. Ext

Ext stands for “Extended file system”, and was the first to be created specifically for Linux. There are four major revisions. “Ext” was the first version of the file system, introduced in 1992. It was a major upgrade from the Minix file system in use at the time, but lacked important features. Many Linux distributions no longer support Ext.

2. Ext2

Ext2 is not a journaled file system. When introduced, it was the first file system to support extended file attributes with 2 terabyte drives. Since Ext2 doesn't have a journaled file system it means it will write to diskless, which makes it useful for flash memory like USB drives. However, file systems like exFAT and FAT32 also don't use journaling and are more compatible with different operating systems, so it's recommended that you avoid Ext2 unless you know how to use it and really need it for some reason.

3. Ext3

Ext3 is basically just about the same as Ext2 but added with a file system journaling. Ext3 is designed to be compatible with Ext2, allowing partitions to be converted between Ext2 and Ext3 with no formatting required. It's been around longer than Ext4, but Ext4 has been around since 2008 and has been extensively tested. At this point, you are better off using Ext4.

4. Ext4

Ext4 is also designed to be compatible. You can mount the Ext4 file system as Ext3, or mount the Ext2 or Ext3 file system as Ext4. It includes new features that reduce file fragmentation, allow for larger volumes and files, and uses delayed allocation to increase flash memory lifespan. It is the most modern version of the Ext file system and is standard on most Linux distributions.

5. BtrFS

BtrFS, commonly called “Butter” or “Better” FS, was originally designed by Oracle. It stands for “B-Tree File System” and allows for drive pooling, fast on the snapshots, transparent compression, and online defragmentation. It shares some of the same ideas found in ReiserFS, a file system that some Linux distributions use by default. BtrFS is designed to be a clean break from the Ext suite of file systems. Ted Ts'o, the maintainer of the Ext4 file system, considers Ext4 a short-term solution and believes BtrFS is the way forward. They expect to see BtrFS become the default on enterprise and consumer Linux desktop server distributions in the next few years as it will be tested further.

6. ReiserFS

ReiserFS was a huge leap forward for the Linux file system when it was introduced in 2001 and it included many new features that Ext would never be able to implement. ReiserFS was replaced by Reiser4, which improved upon many incomplete or lacking features in the initial release, in 2004. But the development of Reiser4 stalled after the lead developer, Hans Reiser, went to jail for a case in 2008. Reiser4 is still not in the Linux kernel main and impossible to get there. BtrFS is a better long-term choice.

7. ZFS

ZFS was designed by Sun Microsystems for Solaris and is now owned by Oracle. ZFS supports many advanced features including drive pooling, snapshots, and dynamic disk strips. BtrFS will bring many of these features to Linux by default. Each file has a checksum, so ZFS can tell if a file is corrupt or not. Sun's open-source ZFS is under the Sun CDDL license, which means it cannot be included in the Linux kernel. However, you can install ZFS support on any Linux distribution. Ubuntu now offers official ZFS support starting with Ubuntu 16.04. Ubuntu uses ZFS by default for containers.

8. XFS

XFS was developed by Silicon Graphics in 1994 for the SGI IRX operating system and ported to Linux in 2001. It is similar to Ext4 in several respects, in that it also uses delayed allocation to help with file fragmentation and does not allow for mounted snapshots. It can be enlarged, but not shrunk, quickly. XFS performs well when dealing with large files, but performs worse than other file systems when dealing with many small files. This may be useful for certain types of servers that primarily need to handle large files.

9. JFS

JFS or "Journaled File System", was developed by IBM for the IBM AIX operating system in 1990 and later ported to Linux. It boasts low CPU usage and good performance for both large and small files. JFS partitions can be dynamically resized, but not shrunk. It's well-planned and has support on almost every major distribution, but its production testing on Linux servers isn't as extensive as Ext, as it was designed for AIX. Ext4 is more commonly used and more tested.

10. Swap

Swap is an option when formatting a drive, but not the actual file system. It is used as virtual memory and has no file system structure. You can't install it to view its contents. Swap is used as a "scratch space" by the Linux kernel to temporarily store data that cannot fit in RAM. It is also used to hibernate. While Windows keeps its paging file as a file on its main system partition, Linux just keeps a separate empty partition for swap space.

Hopefully, this article about Different Types of Linux File Systems, gives you a little insight. Also, read an article about Disable Access to Windows Registry that you may need to know. Thank you.

Previous Post Next Post