Linux file systems have evolved over the years, so let’s take a look at file system types.

While it may not be obvious to the average user, Linux file systems have changed significantly over the past decade or so, making them much more resistant to corruption and performance issues.

Most Linux systems today use a file system called ext4. “Ext” stands for “extended” and “4” means this is the fourth generation of this file system. Features added over time include the ability to provide larger and larger file systems (currently up to 1,000,000 TiB) and larger files (up to 16 TiB), greater system crash resistance, and less fragmentation (breaking up single files into chunks in multiple locations) to improve performance.

The ext4 file system also brings other improvements in performance, scalability, and capacity. Metadata and log checksums are implemented to enhance reliability. Timestamps can now track nanosecond changes to better stamp files (for example, when a file was created and last updated). Also, by adding two bits to the timestamp field, the problem of 2038 (the field storing the date/time will be flipped from maximum to zero) has been postponed to more than 400 years later (to 2446).

File System Type

To determine the type of file system on a Linux system, use the df command. The -t option in the command shown below shows the file system type. -h Displays the readable disk size. In other words, adjust the reporting units (such as M and G) to make them better understood.

$df - hT | head - 10 Filesystem Type Size, informs the Avail Use % Mounted on udev devtmpfs 0 0% 2.9 G / 2.9 G dev TMPFS TMPFS 596 m 1.5m 595M 1% /run /dev/sda1 ext4 110G 50G 55G 48% / /dev/sdb2 ext4 457G 642M 434G 1% /apps TMPFS TMPFS 3.0G 0 3.0G 0% /dev/shm TMPFS TMPFS 5.0m 4.0k 5.0m 1% /run/lock TMPFS TMPFS 3.0g 0 3.0g 0% /sys/fs/cgroup /dev/loop0 squashfs 89M 89M 0  100% /snap/core/7270 /dev/loop2 squashfs 142M 142M 0 100% /snap/hexchat/42Copy the code

Note that the file systems for/(root) and /apps are both ext4, while /dev is the devtmpfs file system (an automated device node populated by the kernel). The other file systems are shown as TMPFS (temporary file systems that reside in memory and/or swap partitions) and SquashFS (file systems of read-only compressed file systems, used for snapshot packages).

There is also the Proc file system, which stores information about running processes.

$ df -T /proc
Filesystem     Type 1K-blocks  Used Available Use% Mounted on
proc           proc         0     0         0    - /proc
Copy the code

As you tour the entire file system, you may encounter many other file system types. For example, when you move to a directory and want to know its file system, you can run the following command:

$ cd /dev/mqueue; df -T .
Filesystem     Type   1K-blocks  Used Available Use% Mounted on
mqueue         mqueue         0     0         0    - /dev/mqueue
$ cd /sys; df -T .
Filesystem     Type  1K-blocks  Used Available Use% Mounted on
sysfs          sysfs         0     0         0    - /sys
$ cd /sys/kernel/security; df -T .
Filesystem     Type       1K-blocks  Used Available Use% Mounted on
securityfs     securityfs         0     0         0    - /sys/kernel/security
Copy the code

As with other Linux commands, the. Here represents the current location of the entire file system.

These and other unique file systems provide some special capabilities. For example, SecurityFS provides a file system that supports security modules.

Linux file systems need to be corrupt-resistant, able to withstand system crashes and provide fast, reliable performance. Improvements provided by generations of Ext file systems and a new generation of dedicated file systems make Linux systems easier to manage and more reliable.


Via: www.networkworld.com/article/343…

Author: Sandra henry-stocker lujun9972

This article is originally compiled by LCTT and released in Linux China