VMware ESXi and vSphere Cluster Management
Linux File Systems: Structure, Mounting, and Common Types
Learn how Linux file systems organize data, how partitions are mounted into one directory tree, and how ext4, XFS, JFS, and other types differ.
A Linux file system is the format and collection of data-management structures used to organize files and directories. It defines how the system names files, stores their contents, records metadata, locates data, retrieves it, and manages free space.
This lesson covers the relationship between disks, partitions, file systems, and mount points; the unified Linux directory hierarchy; journaling; common Linux file system types; and the difference between disk-backed and virtual file systems.
What Is a File System?
A file system is a set of on-disk structures and rules. These structures allow an operating system to store and manage information as files and directories instead of treating storage as an unorganized sequence of bytes.
A file system typically records metadata such as:
- File names and directory relationships
- File ownership and group ownership
- Permissions, such as read, write, and execute access
- File size and timestamps
- Locations of file contents on the storage medium
- Which areas of the file system are free or already in use
The file system format is not the same thing as the physical storage device. A disk is a physical or virtual block-storage device. A partition is a defined section of that device. A file system is a format placed on a partition or other storage area. A directory is a location in the file system's namespace.
| Concept | What it represents | Example |
|---|---|---|
| Disk | A physical or virtual block-storage device | An SSD or virtual disk |
| Partition | A defined section of a disk that can be used independently | A partition containing user data |
| File system | Structures and rules for organizing files on storage | ext4 or XFS |
| Mount point | A directory where another file system becomes accessible | /home or /mnt/data |
| Directory | A named location that organizes files and other directories | /var/log |
The Linux Directory Tree
Linux begins with the root directory, written as /. It is the top of the Linux directory hierarchy. Directories below it form a parent-and-child tree: /home is directly below /, while /home/alex is below /home.
Linux presents local storage through one combined directory tree. It does not normally assign a separate top-level drive letter to every disk. A second storage volume becomes available at a path chosen by the administrator, such as /mnt/data, /home, or /boot.
Windows commonly presents storage using drive letters such as C: and D:. Linux instead connects storage to directories in the existing tree. The underlying hardware differs, but the important conceptual difference is how the operating system exposes that storage to users and applications.
Disks, Partitions, and File Systems
A disk can contain one or more partitions. A partition is a defined range of blocks on the disk and can be formatted with a file system. Formatting creates the structures required by a particular file system type; it does not mean copying ordinary files into a directory.
For example, a simple installation might use one main partition containing an ext4 file system. That file system is mounted at /, and directories such as /home exist inside it.
A more separated design might use one partition for the operating system and another partition formatted with a file system and mounted at /home. User files are still accessed through paths such as /home/alex/notes.txt, even though the data is stored on a different partition.
Mounting and Mount Points
Mounting is the operation of attaching a file system to a directory in the active Linux directory tree. The directory used for this attachment is called the mount point.
After a file system is mounted at /mnt/data, the contents of that file system appear through paths beginning with /mnt/data. Mounting does not copy the file system's data into that directory. It changes which file system is visible through the path.
Common mount points include:
/for the main or root file system/homefor a separate user-data file system/bootfor a dedicated boot-oriented file system/mnt/datafor an administrator-managed data volume
If a file system is mounted on a directory that already contains files, those existing files are hidden while the mount is active. They are not automatically deleted. They become visible again after the other file system is unmounted.
Conceptual Storage Example
Imagine a disk with two partitions:
- Partition 1 contains an ext4 file system mounted at
/. - Partition 2 contains another ext4 file system mounted at
/home.
The system still has one path hierarchy. The path /etc comes from the root file system, while /home/alex comes from the file system mounted at /home.
Inspecting the Active Storage Layout
The following commands inspect storage without formatting or modifying it.
findmnt
findmnt displays currently mounted file systems and their mount points. It is useful for connecting the abstract idea of mounting to the active directory tree.
findmnt
df -T
df -T shows mounted file systems, their types, capacity, and usage. It reports file systems currently mounted, not every type the kernel knows how to support.
df -T
lsblk -f
lsblk -f displays block devices and partitions along with detected file system types, labels, UUIDs, and mount points. An unmounted partition can still have a recognized file system type.
lsblk -f
Common Linux File System Types
Different file systems make different design choices about performance, capacity, recovery, compatibility, and administration. The best choice depends on the workload, the distribution's support, operational requirements, and compatibility with other systems.
| File system | Journaling | Typical status or use | Key note |
|---|---|---|---|
| ext2 | No | Older Linux systems and limited specialist uses | An older extended file system without journaling |
| ext3 | Yes | Legacy systems | Added journaling to the ext family |
| ext4 | Yes | General-purpose Linux installations | A widely supported successor with modern capacity, performance, and reliability improvements |
| XFS | Yes | Large files and scalable, performance-oriented workloads | A high-performance journaling file system |
| JFS | Yes | Linux systems where its characteristics and support are suitable | A journaling file system originally developed by IBM |
| ReiserFS | Yes | Historical or legacy systems | Historically notable, but generally obsolete and unsuitable for new deployments |
ext2
ext2 is an older extended Linux file system. It does not use a journal, so recovery after an unexpected shutdown can require more extensive checking than with a journaling file system.
ext3
ext3 extended the ext family by adding journaling. It remains important for understanding Linux file system history, but newer deployments commonly choose ext4 or another currently supported type.
ext4
ext4 is a modern and broadly supported member of the ext family. It provides improvements in capacity, performance, allocation, and reliability compared with older ext versions. It is often a practical general-purpose choice when no specialized requirement points elsewhere.
XFS
XFS is a scalable journaling file system often selected for large files, large file systems, and workloads that benefit from high throughput and parallel operation. Selection should still consider the distribution and the administration tools available to the team.
JFS
JFS is a journaling file system originally developed by IBM and available on Linux. It can be appropriate where its performance characteristics, support status, and operational requirements match the system's needs.
ReiserFS
ReiserFS was historically significant in Linux and included design features that made it notable at the time. It is generally obsolete or unsuitable for new deployments, so its appearance in documentation or on an older machine should not be treated as a recommendation.
Journaling
Journaling records pending changes, especially metadata changes, in a journal before the file system fully applies them to its normal structures. If the system loses power or crashes during an update, the journal can help the file system determine which operations were in progress and recover to a consistent state more quickly.
Journaling improves crash recovery, but it is not a backup. It does not protect against accidental deletion, theft, hardware failure, every form of corruption, or all data loss. Important data still needs an appropriate backup and recovery plan.
File Systems Supported by the Linux Kernel
The Linux kernel determines which file system types the running system can recognize or mount. Support may be built into the kernel or provided through kernel modules, and the exact list can vary by distribution and kernel configuration.
To inspect file system types reported by the running kernel, use:
cat /proc/filesystems
The output is a support list, not a list of file systems currently mounted. For current mounts, use findmnt or df -T.
Some entries have the marker nodev. This means the type does not require association with a conventional block device. Such a type is commonly a pseudo or virtual file system provided by the kernel rather than a normal disk file system that you format onto a partition.
Virtual and Pseudo File Systems
Not every Linux file system is backed by a normal disk partition. A disk-backed file system stores persistent data on block storage. A virtual or pseudo file system provides a kernel-managed interface that appears as files and directories but represents system information, processes, devices, or other dynamic state.
| Category | Examples | Backed by a normal storage partition | Purpose |
|---|---|---|---|
| Disk-backed file systems | ext4, XFS, JFS | Usually yes | Store persistent user and system data |
| Virtual or pseudo file systems | procfs mounted at /proc | No | Expose kernel and process information through a file-like interface |
procfs is the virtual file system commonly mounted at /proc. It exposes information about processes and the running kernel. Because the kernel supports procfs, it can appear in /proc/filesystems, often with nodev, even though it does not represent a formatted disk partition.
Therefore, an entry in /proc/filesystems should not automatically be interpreted as a format that can be created on a physical disk. The list includes virtual interfaces as well as conventional storage file systems.
Choosing a File System
File system selection should be based on:
- Compatibility with the Linux distribution and kernel
- Workload characteristics, such as many small files or very large files
- Expected capacity and scalability
- Recovery and integrity requirements
- Available administration, monitoring, and repair tools
- Interoperability with other operating systems or devices
- Whether the type is actively maintained and suitable for new deployments
For a general-purpose Linux installation, ext4 is commonly a sensible default when there is no special requirement. XFS may be preferred for some large-scale or performance-oriented workloads. Legacy types such as ReiserFS should not normally be selected for a new system merely because the kernel can identify them.
Troubleshooting Common Confusions
“Why does my disk not have a drive letter?”
Linux normally does not expose each disk as a separate top-level drive letter. Identify the partition and mount it at a directory such as /mnt/data. Applications then access it through that path.
“Why is a type in /proc/filesystems absent from df -T?”
The two commands answer different questions. cat /proc/filesystems reports types supported by the running kernel. df -T reports file systems that are currently mounted and their usage. A supported type need not be in use.
“Does nodev mean I should format a partition with it?”
No. The marker indicates that the type does not require a conventional block device. Procfs is a good example: it is a kernel-provided interface mounted at /proc, not a normal disk format.
“Why did files disappear after a mount?”
Mounting another file system over an existing directory hides the directory's previous contents while the mount is active. The underlying files are normally still present and become visible again when the mounted file system is unmounted. Be careful not to delete or overwrite data while investigating.
“Should I use a legacy type because it is listed?”
Availability is not the same as suitability. Prefer a currently supported file system, commonly ext4 for general use, unless a documented workload or platform requirement favors another supported option.
Key Points
- A file system defines how files, directories, metadata, and free space are organized.
- A disk is storage hardware; a partition is a section of that storage; a file system is a format; and a directory is a location in the hierarchy.
- Linux starts at the root directory,
/, and exposes storage through one unified directory tree. - Mounting attaches a file system to a directory called a mount point.
- Mounting does not copy data, and it temporarily hides existing mount-point contents.
- ext2 has no journal; ext3 added journaling; ext4 is a modern, widely supported ext-family choice.
- XFS and JFS are journaling file systems with use cases determined by workload and support requirements.
- ReiserFS is a legacy type and is generally unsuitable for new systems.
/proc/filesystemsshows kernel-supported types, whilefindmntanddf -Tshow active mounts.- A
nodeventry may identify a virtual file system such as procfs rather than a disk format. - Journaling helps with crash recovery but does not replace backups.
Continue with Linux file system concepts when reviewing how storage formats and directory organization fit together.