Skip to the content ForoHackers
Log inJoin

File systems: start here

File systems
#873 · Ophuscado · · Report

A file system is the structure that turns a raw block device into named files and directories. It decides how data is laid out, found, protected and recovered after a crash. Choosing and understanding one affects speed, reliability and how you back up, which is why file systems are worth studying on their own.

Key concepts

  • Metadata and data: names, sizes, permissions and block locations are stored apart from file contents.
  • Allocation: how free space is tracked and how files are placed, to limit fragmentation.
  • Crash consistency: journaling and copy-on-write keep the structure valid when power fails mid-write.
  • Caching: the kernel keeps recent data in memory and writes it back later, which makes flushing and syncing matter.
  • Snapshots and integrity: some designs checksum data and keep cheap point-in-time copies.

Vocabulary

  • Inode: the record holding a file's metadata and where its blocks are.
  • Journal: a log of intended changes, replayed after a crash.
  • Block device: storage read and written in fixed-size blocks.
  • VFS: the virtual file system layer that gives different file systems one interface.

What to study, in order

  1. Use a file system as a user: links, permissions, mount points, free-space reports.
  2. Read the on-disk layout of a simple file system such as FAT.
  3. Create a file system on a disk image file, mount it, and inspect its structures with the tools.
  4. Write a read-only parser for a small file system in a language you know.
  5. Study journaling and copy-on-write, and test what survives a forced power-off in a virtual machine.

Related tags

#storage #kernels #backups #databases #linux

Log in or join to reply.