linuxlab.io
Tutorials▾
  • Linux & networking
    File system, processes, TCP/IP, BGP and OSPF
    →
  • Terraform & IaC
    HCL, state, plan/apply on a LocalStack sandbox
    →
  • Git & GitHub
    Object model, plumbing, branching, GitHub Actions
    →
All tutorials →
PricingAboutSign inCreate account
/
  • Introduction
  • Lessons
  • How it works
  • Simulator
  • Knowledge base
  • Interview prep
Index
Categories
All entries
Footer
linuxlab-TutorialsPricingAboutPrivacy & cookies
Copyright © 2026 LinuxLab. All rights reserved.
home/linux/kb/File system

kb/filesystem

Linux file system

The Linux file system stores data on disk through inodes and hard and symbolic links, permissions and setuid/setgid, ext4/xfs/btrfs, LVM and RAID, mount and fstab. Each article is a self-contained explanation with commands and links to the interactive sandbox lessons.

18 статей в категории

§ статьи

  • bind-mountbind mount: making a directory appear in another placebind mount is `mount --bind <src> <target>`. It makes a directory (or file) visible at a second path. Not a copy, not a symlink: the same inodes through VFS. A basic building block of chroots, containers, and systemd sandboxes.
  • block-devicesBlock devices: disks in LinuxA block device is read and written in fixed-size blocks (usually 512B or 4K). Disks, SSDs, and NVMe drives are all block devices in `/dev/`.
  • btrfsbtrfs: copy-on-write, subvolumes, and snapshotsbtrfs is a copy-on-write filesystem with subvolumes, O(1) snapshots, native RAID 0/1/10, and data checksums. RAID 5/6 is problematic. COW fragmentation hurts databases and VM images, so turn it off for them.
  • ext4ext4: the Linux filesystem workhorseext4 is the default filesystem on most distributions: journaling, extents, a fixed inode count set at mkfs time. The main tunes are the data mode, noatime, and lazy init. Stable for 15+ years. Does not scale like XFS.
  • extended-attributesExtended attributes (xattr): arbitrary file metadataxattr are key-value metadata on an inode beyond stat. 4 namespaces: user (open), trusted (root), system (ACL), security (SELinux, capabilities). getfattr reads, setfattr writes.
  • file-permissionsFile permissions: rwx and chmodEvery file has three permission sets: for the owner, the group, and others. Each set is three bits: read (r), write (w), execute (x). You change them with `chmod`.
  • fhsFilesystem Hierarchy Standard (FHS)FHS is the standard for what lives in which Linux root directory: /etc holds config, /var holds changing data, /usr holds the distro's static files, /home holds users, /tmp holds temporary files.
  • filesystemsFilesystems: ext4, xfs, btrfs, zfsext4 is the reliable default. xfs handles large files and parallel I/O. btrfs and zfs give you snapshots, checksums, and built-in RAID, but they are more complex.
  • fsck-and-recoveryfsck and recovery: checking and repairing a filesystemfsck, a check of an unmounted filesystem. e2fsck (ext), xfs_repair (XFS), btrfs check (btrfs). Journal replay at mount handles 90% of problems after a crash.
  • hard-linkHard linkHard link is a second name for the same [[inode]]. Both names are equal: the file lives as long as at least one of them exists.
  • inodeInodeAn inode is a filesystem record that holds metadata and pointers to a file's data blocks. The filename lives separately, in a directory, and simply points to the inode.
  • lvmLVM: Logical Volume ManagerLVM is a layer between [[block-devices]] and the filesystem: it pools disks and carves out logical volumes of any size that you can grow, snapshot, and migrate live.
  • mount-and-fstabmount and /etc/fstab: attaching filesystems`mount` attaches a block device or filesystem to a mount point in the tree. `/etc/fstab` is the list of what to mount at boot.
  • posix-aclPOSIX ACL: extended access permissionsPOSIX ACL extends the classic rwx permissions: you can grant access to many users and groups without reshuffling the owner and group. setfacl writes, getfacl reads. A default ACL on a directory is inherited by its children.
  • raidRAID: software RAID with mdadmRAID combines several [[block-devices]] into one logical device for redundancy or speed. On Linux you use `mdadm`. Hardware RAID is a separate story.
  • sparse-filesSparse files: holes and apparent sizeA sparse file has "holes", blocks the filesystem never allocated. They read back as zeros but take no space. ls shows the apparent size, du shows the real one. Used in qcow2, backups, sparse loop.
  • symbolic-linkSymbolic linkA symlink is a separate shortcut file that stores a path to its target. Unlike a [[hard-link]], it has its own [[inode]], and a symlink can point at anything, including something that does not exist.
  • xfsXFS: extents and parallel I/OXFS is the RHEL 7+ default: allocation groups (parallel I/O), extent-based allocation, online grow. **It cannot shrink**, grow only. Ideal for big files, databases, and parallel workloads.

← вернуться ко всем категориям базы знаний

Footer
linuxlab-
Copyright © 2026 LinuxLab. All rights reserved.
Tutorials
Pricing
About
Privacy & cookies