There are different types of file systems that can accomplish different things, depending on the specific workload of the machine. Common types are:
| FS Type | Usecase |
|---|---|
ext4 | Known for its stability and wide usage |
XFS | High performance and scalability |
btrfs | Adds features such as snapshots, etc. |
tmpfs | In-memory only filesystem |
When creating these filesystems we can use mkfs.<fs_type> /dev/sdXN. “
ext4
This is perhaps the most common file system seen in Linux machines. To create an ext4 filesystem use the command:
xfs
XFS is commonly used in enterprise environments where large workloads are required.
In particular, xfs is ideal for intensive read/write operations, since it can manage very large files and volumes.
btrfs
Unlike ext4, btrfs offers features such as snapshots, sub-volumes, and built-in data integrity checks.
With btrfs we can also use the btrfs command itself to see properties and manage the file system.
Example
sudo btrfs filesystem show >> Label: none uuid: 83325285-9a7e-4f4b-ac2a-2798baf58135 Total devices 1 FS bytes used 392.94GiB devid 1 size 930.51GiB used 401.02GiB path /dev/nvme0n1p2
In particular, btrfs also allows for built-in incremental backups; however, the resource utilisation can vary depending on the workload demanded.
tmpfs
This is a memory-only filesystem that isn’t created with mkfs. Rather, we use Linux Mounts to mount this:
sudo mount -t tmpfs -o size=512M tmpfs /mnt/tmpThis uses RAM instead of disk storage, and has limited size as a consequence. However, it is much faster since there are not disk read/writes.