A file system is a logical container the operating system uses to store files. A file system can be created only on a partition. If you have multiple partitions, you can use the same file system on all partitions or a different file system on each partition.
Different file systems provide different features. Linux supports a variety of file systems. To select a suitable file system, you need to understand its features.
Let us understand the features of important file systems.
EXT (Extended File system)
This is the first Linux file system. It was used in early versions of Linux. It has been removed from the current versions of Linux.
EXT2 File System
This is the second generation of the EXT file system. It provides very basic features. It was developed in 1980. It was the default file system before RHEL5. It has been deprecated in RHEL7 and is no longer used in the current versions of Linux.
EXT3 File System
This is the third generation of the EXT file system. It was the default file system in RHEL5. It provides the following features.
- It supports file systems up to 16TiB in size.
- It supports a file up to 2TiB in size.
- It supports up to 32000 subdirectories.
- It is the first file system in the EXT series that supports the journaling mechanism.
- It is also outdated and is no longer used in the current versions of Linux.
EXT4 File System
This is the fourth generation of the EXT file system. This was the default file system in RHEL6. It provides the following features.
- It supports file systems up to 1EiB.
- It supports a file up to 16TiB in size.
- It supports unlimited directories.
- It uses a series of contiguous physical blocks on the hard disk known as extents. The extents are used to improve the performance of very large files.
XFS (X-File System) File System
This file system was developed by Silicon Graphics for their version of UNIX. Later, it was adopted by most Linux distributions including RHEL. It was the default file system in RHEL 7. This file system is based on 64-bit extent. It uses journaling for metadata operations. It supports file systems and files of sizes up to 8EiB. The only drawback of this system is that it does not support the shrink feature like EXT3 and EXT4.
VFAT (Virtual File Allocation Table) File System
This is the enhanced version of the legacy FAT file system. It was developed in 1995 for Windows 95. By default, Linux does not use this file system for any of its operations. If required, it can read and write files written in this format. This support was added in Linux so a user can exchange data between Linux and Windows using an external device such as a USB drive or compact disk.
NTFS File System
This is the enhanced version of VFAT. This file system is the default file system on the Windows system. Just like VFAT, Linux can read and write files written in this format but it does not use this format for any of its purpose.
SWAP Space
Swap space is used as a temporary memory. It can be allocated as a separate swap partition, LVM partition, or a file (file is used only to extend the available swap space). Swap space is used only if a shortage of physical memory occurs. In a shortage situation, the system moves recently unused data from memory to swap space. When required, the system moves back this data from swap to memory. It is a convenient method to improve kernel memory usage.
LVM (Logical Volume Manager)
The classical partition scheme is fixed in nature. It means that once created, the partition size cannot be changed later. We are not allowed to add additional space in a partition that is filled up with data. Similarly, we cannot shrink a partition that has a lot of unused free space. LVM not only solves this issue but also provides several other advantages over the classical approach. It supports many advanced features for stability and security.
RAID
RAID is a mechanism to combine multiple disk drives into an array to achieve performance and redundancy. The array of disks will appear as a single logical storage unit or drive in the computer. RAID enhances the data access speed and increases data storage capacity using a single virtual disk.
There are two types of RAID; software RAID and hardware RAID. Hardware RAID is built from independent hard disks and a raid controller device. It does not use any system resources. Software RAID is built from attached hard disks. It uses all resources from the system.