File system

From Wikipedia, the free encyclopedia
Jump to: navigation, search

A File system (or filesystem) is a way of storing all data on a data storage device. The data is usually organized in computer files in directories. Below the file system there is usually a physical device where the files are stored. This might be a hard disk, USB flash drive, compact disc, or DVD. The file system might also talk to a remote server over a network where the file is stored. The file system might also only use RAM to store the files.

The underlying storage mechanism usually has no concept of a file. A hard disk knows of disk blocks, which are numbered in a certain way. These disk blocks contain binary data (usually: large numbers).

The file system does the translation between the large numbers, and the view the users see, that is that of files, organized in a certain way.

More recently, concepts from databases have been used to develop file systems. That way, there are two different kinds of data:

  • Data that holds the files
  • Data that is used to describe what state the files are in. This is called metadata.

It then becomes possible to always keep the file system in a consistent state. With databases, this is known as ACID. That way, an operation on a file is either done, or it is not done. There are however, no states in between. The file being written to the filesystem is no longer visible. This is usually done using transactions. But with filesystems, it is called journaling.