Linux File Systems
Linux file systems organize stored data as files and directories, record metadata such as ownership and timestamps, and connect storage to one shared directory tree. Linux uses a common virtual interface so local, network, memory-backed, and user-space file systems can serve the same file operations.
itLinux | OpenSkills.info
Intro
Linux File Systems
A Linux file system turns storage or another data source into a hierarchy of named objects. Regular files hold byte sequences. Directories map names to objects. Metadata records an object's type, owner, permissions, size, timestamps, and other attributes. A mount attaches a file-system hierarchy at a directory in the process's visible directory tree.
Linux does not make every application understand ext4, XFS, Btrfs, NFS, or a user-space file system. The virtual file system, usually shortened to VFS, provides common operations such as open, read, write, rename, and stat. Each file-system implementation supplies methods behind that interface. This separation gives applications a mostly consistent path-based view while implementations choose different on-disk formats, allocation methods, durability rules, and network behavior.
The path from a name to data
Consider an application opening /var/lib/app/state.db. Path resolution starts from the process's root directory because the path begins with a slash. The kernel walks var, lib, app, and state.db one component at a time. Search permission on each directory controls whether traversal may continue. Symbolic links can redirect the walk, subject to resolution limits and safety controls.
The VFS uses several objects during this work:
- A superblock represents one mounted file-system instance and its global state.
- An inode represents one file-system object and its metadata. The inode does not contain the object's name.
- A dentry, or directory-entry cache object, connects a name in a parent directory to an inode.
- A file object represents one open instance, including the current file position and access mode.
Names and objects are separate. A directory entry associates a name with an inode number. More than one hard link can associate different names with the same inode. Removing one name does not remove the object while another hard link remains. An open file can also remain usable after its last name is unlinked; the file system reclaims it after the final reference closes.
After the lookup succeeds, the file-system driver translates logical file offsets into stored extents or blocks, remote requests, generated kernel data, or user-space operations. The block layer and device driver handle physical input and output for a typical local disk file system. Network file systems send requests to a server instead. Pseudo file systems such as proc expose kernel state without storing ordinary files on a disk.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://docs.kernel.org/filesystems/vfs.html
Supports
- VFS purpose and dispatch model
- Superblock, inode, dentry, and open file objects
- File-system operation and caching architecture
- https://man7.org/linux/man-pages/man7/path_resolution.7.html
Supports
- Absolute and relative pathname lookup
- Directory search permission, symbolic links, and mount traversal
- https://man7.org/linux/man-pages/man7/inode.7.html
Supports
- Inode metadata, file types, ownership, mode, link count, size, and timestamps
- https://man7.org/linux/man-pages/man8/mount.8.html
Supports
- Mount attachment, bind mounts, and mount options
- Covered directory contents and persistent mount configuration
- https://man7.org/linux/man-pages/man7/mount_namespaces.7.html
Supports
- Per-process mount topology and namespace isolation
- https://man7.org/linux/man-pages/man2/fsync.2.html
Supports
- File synchronization semantics and directory synchronization boundary
- https://www.kernel.org/doc/html/latest/filesystems/index.html
Supports
- Linux file-system implementation catalog
- Local, network, pseudo, and specialized file-system families
- https://docs.kernel.org/filesystems/ext2.html
Supports
- Blocks, block groups, inodes, directories, allocation, and fixed inode ratios
- https://docs.kernel.org/filesystems/ext4/index.html
Supports
- ext4 block groups, extents, allocation, checksums, and on-disk structures
- https://docs.kernel.org/filesystems/ext4/journal.html
Supports
- ext4 jbd2 journal transactions and recovery role
- https://docs.kernel.org/admin-guide/xfs.html
Supports
- XFS administration, mount behavior, freeze, errors, and allocation controls
- https://btrfs.readthedocs.io/en/latest/Introduction.html
Supports
- Btrfs copy-on-write, checksums, subvolumes, snapshots, compression, and multi-device model
- https://btrfs.readthedocs.io/en/latest/Kernel-by-version.html
Supports
- Btrfs entry into the Linux 2.6.29 release cycle
- https://docs.kernel.org/filesystems/f2fs.html
Supports
- F2FS log-structured design for flash translation layer devices
- https://docs.kernel.org/filesystems/fuse/fuse.html
Supports
- FUSE kernel and user-space request path, mounts, and failure behavior
- https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html
Supports
- File-system usage reporting by df
- https://www.gnu.org/software/coreutils/manual/html_node/du-invocation.html
Supports
- Directory-tree space reporting by du
- https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
Supports
- Purpose of major directories in the Linux file hierarchy
- https://docs.ceph.com/en/latest/cephfs/
Supports
- CephFS metadata server and RADOS data path
- Shared namespace use cases and client architecture
- https://github.com/sindresorhus/awesome
Supports
- Awesome-list discovery starting point
- https://github.com/awesome-foss/awesome-sysadmin
Supports
- Discovery of Ceph, GlusterFS, Lustre, JuiceFS, and rsnapshot
- https://docs.gluster.org/en/latest/
Supports
- GlusterFS architecture, volumes, replication, clients, healing, and split-brain operations
- https://wiki.lustre.org/Lustre_Architecture
Supports
- Lustre clients, metadata services, and object storage targets
- https://juicefs.com/docs/community/introduction/
Supports
- JuiceFS data and metadata separation, FUSE client, and POSIX-style mounts
- https://rsnapshot.org/
Supports
- rsnapshot use of rsync and hard links for navigable backup generations
- https://openzfs.github.io/openzfs-docs/
Supports
- OpenZFS pooled storage, copy-on-write, checksums, snapshots, and Linux installation boundary
- https://www.kernel.org/doc/ols/2006/ols2006v1-pages-395-408.pdf
Supports
- ext2 active use since 1993 and consistency-check context
- https://www.usenix.org/conference/usenix-1996-annual-technical-conference/scalability-xfs-file-system
Supports
- XFS shipment in IRIX 5.3 in December 1994
- Allocation, B-tree, extent, and scalability design
- https://xfs.org/index.php/XFS_FAQ
Supports
- XFS Linux port history and Linux operating characteristics
- https://www.kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.15
Supports
- ext3 inclusion in the November 2001 Linux 2.4.15 release
- https://kernelnewbies.org/Linux_2_6_14
Supports
- FUSE inclusion in Linux 2.6.14 in October 2005
- https://kernelnewbies.org/Linux_2_6_28
Supports
- ext4 stable designation in Linux 2.6.28 in December 2008
- https://kernelnewbies.org/Linux_2_6_29
Supports
- Btrfs and SquashFS inclusion in Linux 2.6.29 in 2009
- https://kernelnewbies.org/Linux_3.8
Supports
- F2FS inclusion in Linux 3.8 in February 2013
- https://fedoraproject.org/wiki/Changes/BtrfsByDefault
Supports
- Fedora 33 Btrfs default for new desktop installations in 2020
