File System Of linux
What is the Linux File System?
Linux filing system is usually a built-in layer of a Linux OS wont to handle the info management of the storage. It helps to rearrange the file on disk storage. It manages the file name, file size, creation date, and far more information on a few files.
Linux File System
A Linux filing system may be a structured collection of files on a disc drive or a partition. A partition may be a segment of memory and contains some specific data. In our machine, there are often various partitions of the memory. Generally, every partition contains a filing system.
The general-purpose computing system must store data systematically so that we will easily access the files in less time. It stores the info on hard disks (HDD) or some equivalent storage type. There could also be below reasons for maintaining the file system:
Primarily the pc saves data to the RAM storage; it's going to lose the info if it gets turned off. However, there's non-volatile RAM (Flash RAM and SSD) that's available to take care of the info after the facility interruption.
Data storage is preferred on hard drives as compared to plain RAM as RAM costs quite a disc space. The hard disk costs are dropping gradually comparatively the RAM.
The Linux filing system contains the subsequent sections:
The root directory (/)
A specific data storage format (EXT3, EXT4, BTRFS, XFS then on)
A partition or logical volume having a specific filing system.
Linux File System Structure
Linux filing system features a hierarchal file structure because it contains a root directory and its subdirectories. All other directories are often accessed from the basis directory. A partition usually has just one filing system, but it's going to have quite one filing system.
A filing system is meant during away in order that it can manage and supply space for nonvolatile storage data. All file systems required a namespace that's a naming and organizational methodology. The namespace defines the naming process, length of the file name, or a subset of characters that will be used for the file name. It also defines the logical structure of files on a memory segment, like the utilization of directories for organizing the precise files. Once a namespace is described, a Metadata description must be defined for that specific file.
The data structure must support a hierarchical directory structure; this structure is employed to explain the available and used disc space for a specific block. It also has the opposite details about the files like file size, date & time of creation, update, and last modified.
Also, it stores advanced information about the section of the disk, like partitions and volumes.
The advanced data and therefore the structures that it represents contain the knowledge about the filing system stored on the drive; it's distinct and independent of the filing system metadata.
Linux filing system contains two-part filing system software implementation architecture. Consider the below image
The filing system requires an API (Application programming interface) to access the function calls to interact with filing system components like files and directories. API facilitates tasks like creating, deleting, and copying the files. It facilitates an algorithm that defines the arrangement of files on a filing system.
The first two parts of the given filing system together are called a Linux virtual filing system. It provides one set of commands for the kernel and developers to access the filing system. This virtual filing system requires the precise system driver to offer an interface to the filing system.
Types Linux File System
When we install the Linux OS , Linux offers many file systems like Ext, Ext2, Ext3, Ext4, JFS, ReiserFS, XFS, btrfs, and swap.
1. Ext, Ext2, Ext3 and Ext4 file system
The filing system Ext stands for Extended file system. It was primarily developed for MINIX OS. The Ext filing system is an older version, and is not any longer used thanks to some limitations.
Ext2 is that the first Linux file system that permits managing two terabytes of data. Ext3 is developed through Ext2; it's an upgraded version of Ext2 and contains backward compatibility. The major drawback of Ext3 is that it doesn't support servers because this file system doesn't support file recovery and disk snapshot.
Ext4 file system is that the faster file system among all the Ext file systems. It is a really compatible option for the SSD (solid-state drive) disks, and it's the default file system in Linux distribution.
2. JFS File System
JFS stands for Journaled File System, and it is developed by IBM for AIX Unix. It is an alternative to the Ext file system. It also can be utilized in place of Ext4, where stability is required with few resources. It is a handy file system when CPU power is restricted.
3. ReiserFS File System
ReiserFS is an alternate to the Ext3 file system. It has improved performance and advanced features. In the earlier time, the ReiserFS was used because the default file system in SUSE Linux, but later it's changed some policies, so SUSE returned to Ext3. This file system dynamically supports the file extension, but it's some drawbacks in performance.
4. XFS File System
XFS file system was considered as high-speed JFS, which is developed for parallel I/O processing. NASA still using this file system with its high storage server (300+ Terabyte server).
5. Btrfs File System
Btrfs stands for the B tree file system. It is used for fault tolerance, repair system, fun administration, extensive storage configuration, and more. It is not an honest suit for the assembly system.
6. Swap File System
The swap space system is employed for memory paging in Linux OS during the system hibernation. A system that never goes in hibernate state is required to have a swap file adequate to its RAM size.
Quick compare ext2, ext3, ext4
- Ext2
This was developed to overcome the limitation of the original ext file system.
Ext2 does not have a journaling feature.
On flash drives, USB drives, ext2 is recommended, as it doesn’t need to do the overhead of journaling.
Maximum individual file size can be from 16 GB to 2 TB.
Overall ext2 file system size can be from 2 TB to 32 TB.
- Ext3
Introduces in Linux Kernel 2.4.15.
The main benefit of ext3 is that it allows journaling.
Maximum individual file size can be from 16 GB to 2 TB.
Overall ext3 file system size can be from 2 TB to 32 TB.
You can convert an ext2 file system to an ext3 file system directly (without backup/restore).
- Ext4
Supports huge individual file size and overall file system size.
Maximum individual file size can be from 16 GB to 16 TB.
Overall maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte).
The directory can contain a maximum of 64,000 subdirectories (as opposed to 32,000 in ext3).
You can also mount an existing ext3 fs as ext4 fs (without having to upgrade it).
Several other new features are introduced in ext4: multiblock allocation, delayed allocation, journal checksum. fast fsck, etc.
In ext4, you also have the option of turning the journaling feature “off”.




Comments
Post a Comment