File system: Difference between revisions

Content deleted Content added
References: Further reading per MOS:LAYOUT
Citation bot (talk | contribs)
Removed URL that duplicated identifier. Removed parameters. | Use this bot. Report bugs. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox | #UCB_webform_linked 901/1032
 
(523 intermediate revisions by more than 100 users not shown)
Line 1:
{{Short description|Computer filing system}}
{{About|the way computers store files on disk|library and office filing systems|Library classification}}
{{About|how a computer organizes and accesses computer files|library and office filing systems|Library classification}}
{{OS}}
In [[computing]], a '''file system''' or '''filesystem''' (often abbreviated to '''FS''' or '''fs''') governs [[computer file|file]] organization and access. A ''local'' file system is a capability of an [[operating system]] that services the applications running on the same [[computer]].<ref>{{cite web | title=5.10. Filesystems
|url=https://tldp.org/LDP/sag/html/filesystems.html
|publisher= The Linux Document Project
|access-date=December 11, 2021
|quote=A ''filesystem'' is the methods and data structures that an operating system uses to keep track of files on a disk or partition; that is, the way the files are organized on the disk.}}</ref><ref>{{citation|title=File System Implementation|url=http://pages.cs.wisc.edu/~remzi/OSTEP/file-implementation.pdf|publisher= Arpaci-Dusseau Books|year = 2014|first1 = Remzi H.|last1 =Arpaci-Dusseau|first2=Andrea C.|last2 = Arpaci-Dusseau}}</ref> A [[distributed file system]] is a [[Communication protocol|protocol]] that provides file access between [[computer network|networked]] computers.
 
A file system provides a [[computer data storage|data storage]] [[Service (systems architecture)|service]] that allows [[application software|application]]s to share [[mass storage]]. Without a file system, applications could access the storage in [[Software incompatibility|incompatible]] ways that lead to [[resource contention]], [[data corruption]] and [[data loss]].
In [[computing]], a '''file system''' (or '''filesystem''') is used to control how data is stored and retrieved. Without a file system, information placed in a storage area would be one large body of data with no way to tell where one piece of information stops and the next begins. By separating the data into individual pieces, and giving each piece a name, the information is easily separated and identified. Taking its name from the way paper-based information systems are named, each group of data is called a "[[Computer file|file]]". The structure and logic rules used to manage the groups of information and their names is called a "file system".
 
There are many differentfile kindssystem of[[software filedesign|designs]] systems.and Each[[implementation]]s one{{endash}} haswith differentvarious structure and logic,features and propertiesvarious ofresulting characteristics such as speed, flexibility, security, size and more. Some file systems have been designed to be used for specific applications. For example, the [[ISO 9660]] file system is designed specifically for optical discs.
 
File systems have been developed for many types of [[Computer storage device|storage devices]], including [[hard disk drive]]s (HDDs), [[solid-state drive]]s (SSDs), [[magnetic tape]]s and [[optical disc]]s.<ref>{{cite web | title=Storage, IT Technology and Markets, Status and Evolution
File systems can be used on many different kinds of storage devices. Each storage device uses a different kind of media. The most common storage device in use today is a [[hard drive]] whose media is a disc that has been coated with a magnetic film. The film has ones and zeros 'written' on it sending electrical pulses to a magnetic "read-write" head. Other media that are used are [[magnetic tape]], [[optical disc]], and [[flash memory]]. In some cases, such as with [[tmpfs]], the computer's main memory ([[RAM]]) is used to create a temporary file system for short-term use.
|url=https://indico.cern.ch/event/713888/contributions/3122779/attachments/1719287/2774787/storage_tech_market_BPS_Sep2018_v6.pdf
|date=September 20, 2018
|quote=HDD still key storage for the foreseeable future, SSDs not cost effective for capacity}}</ref>
 
A portion of the computer [[random-access memory|main memory]] can be set up as a [[RAM disk]] that serves as a storage device for a file system. File systems such as [[tmpfs]] can store files in [[virtual memory]].
 
{{Anchor|VIRTUAL-FILE}}
A ''virtual'' file system provides access to files that are either computed on request, called ''virtual files'' (see [[procfs]] and [[sysfs]]), or are mapping into another, backing storage.
Some file systems are used on local [[data storage device]]s;<ref name="ostep-1">{{citation|title=File System Implementation|url=http://pages.cs.wisc.edu/~remzi/OSTEP/file-implementation.pdf|publisher= Arpaci-Dusseau Books|year = 2014|first1 = Remzi H.|last1 =Arpaci-Dusseau|first2=Andrea C.|last2 = Arpaci-Dusseau}}</ref> others provide file access via a [[network protocol]] (for example, [[Network File System (protocol)|NFS]],<ref name="ostep-2">{{citation|title=Sun's Network File System|url=http://pages.cs.wisc.edu/~remzi/OSTEP/dist-nfs.pdf|publisher= Arpaci-Dusseau Books|year = 2014|first1 = Remzi H.|last1 =Arpaci-Dusseau|first2=Andrea C.|last2 = Arpaci-Dusseau}}</ref> [[Server Message Block|SMB]], or [[9P (protocol)|9P]] clients). Some file systems are "virtual", in that the "files" supplied are computed on request (e.g. [[procfs]]) or are merely a mapping into a different file system used as a backing store. The file system manages access to both the content of files and the [[metadata]] about those files. It is responsible for arranging storage space; reliability, efficiency, and tuning with regard to the physical storage medium are important design considerations.
 
== Etymology ==
==Aspects of file systems==
 
From {{circa|1900}} and before the advent of computers the terms ''file system'', ''filing system'' and ''system for filing'' were used to describe methods of organizing, storing and retrieving paper documents.<ref>{{cite book|last1=McGill|first1=Florence E.|title=Office Practice and Business Procedure|date=1922|publisher=Gregg Publishing Company|page=[https://archive.org/details/officepracticea01mcgigoog/page/n211 197]|url=https://archive.org/details/officepracticea01mcgigoog|access-date=August 1, 2016}}</ref> By 1961, the term ''file system'' was being applied to computerized filing alongside the original meaning.<ref>{{cite book|last1=Waring|first1=R.L.|title=Technical investigations of addition of a hardcopy output to the elements of a mechanized library system : final report, 20 Sept. 1961|date=1961|publisher=Svco Corporation|___location=Cincinnati, OH|oclc=310795767}}</ref> By 1964, it was in general use.<ref>{{cite book|title=Disc File Applications: Reports Presented at the Nation's First Disc File Symposium|date=1964|publisher=American Data Processing|url=https://books.google.com/books?id=hJBWAAAAMAAJ|access-date=August 1, 2016}}</ref>
===Space management===
''Note: this only applies to file systems used in storage devices.''
 
== Architecture ==
[[File:100 000-files 5-bytes each -- 400 megs of slack space.png|frame|Example of slack space, demonstrated with 4,096-[[byte]] NTFS clusters: 100,000 files, each 5 bytes per file, equals 500,000 bytes of actual data, but requires 409,600,000 bytes of disk space to store <!-- The size listing shown in Explorer is oddly doubly-wrong. The example files are 5 bytes each, not 1K, and the clusters are a minimum of 4K not 1K.-->]]
 
A local file system's [[software architecture|architecture]] can be described as [[Abstraction layer|layers of abstraction]] even though a particular file system design may not actually separate the concepts.<ref name="JHU">{{cite web|last1=Amir|first1=Yair|title=Operating Systems 600.418 The File System|url=http://www.cs.jhu.edu/~yairamir/cs418/os7/sld001.htm|website=Department of Computer Science Johns Hopkins University|access-date=July 31, 2016}}</ref>
File systems allocate space in a granular manner, usually multiple physical units on the device. The file system is responsible for organizing [[computer file|files]] and [[directory (file systems)|directories]], and keeping track of which areas of the media belong to which file and which are not being used. For example, in [[Apple DOS]] of the early 1980s, 256-byte sectors on 140 kilobyte floppy disk used a ''track/sector map''.{{Citation needed|date=September 2012}}
 
The ''logical file system'' layer provides relatively high-level access via an [[application programming interface]] (API) for file operations including open, close, read and write {{endash}} delegating operations to lower layers. This layer manages open file table entries and per-process file descriptors.<ref name="IBMKC">{{cite web|last1=IBM Corporation|title=Component Structure of the Logical File System|url=https://www.ibm.com/docs/en/aix/7.3?topic=overview-component-structure-logical-file-system|website=IBM Knowledge Center|access-date=April 24, 2024}}</ref> It provides file access, directory operations, security and protection.<ref name=JHU />
This results in unused space when a file is not an exact multiple of the allocation unit, sometimes referred to as ''slack space''. For a 512-byte allocation, the average unused space is 256 bytes. For 64&nbsp;KB clusters, the average unused space is 32&nbsp;KB. The size of the allocation unit is chosen when the file system is created. Choosing the allocation size based on the average size of the files expected to be in the file system can minimize the amount of unusable space. Frequently the default allocation may provide reasonable usage. Choosing an allocation size that is too small results in excessive overhead if the file system will contain mostly very large files.
 
The ''virtual file system'', an optional layer, supports multiple concurrent instances of physical file systems, each of which is called a file system implementation.<ref name=IBMKC />
[[File system fragmentation]] occurs when unused space or single files are not contiguous. As a file system is used, files are created, modified and deleted. When a file is created the file system allocates space for the data. Some file systems permit or require specifying an initial space allocation and subsequent incremental allocations as the file grows. As files are deleted the space they were allocated eventually is considered available for use by other files. This creates alternating used and unused areas of various sizes. This is free space fragmentation. When a file is created and there is not an area of contiguous space available for its initial allocation the space must be assigned in fragments. When a file is modified such that it becomes larger it may exceed the space initially allocated to it, another allocation must be assigned elsewhere and the file becomes fragmented.
 
The ''physical file system'' layer provides relatively low-level access to a storage device (e.g. disk). It reads and writes [[Block (data storage)|data blocks]], provides [[Data buffer|buffer]]ing and other [[memory management]] and controls placement of blocks in specific locations on the storage medium. This layer uses [[device driver]]s or [[channel I/O]] to drive the storage device.<ref name=JHU />
 
== Attributes ==
 
=== File names ===
 
===Filenames===
{{Main|Filename}}
A '''file name''', or '''filename''', identifies a file to consuming applications and in some cases users.
A '''filename''' (or '''file name''') is used to identify a storage ___location in the file system. Most file systems have restrictions on the length of filenames. In some file systems, filenames are not [[Case sensitivity|case sensitive]] (i.e., filenames such as <code>FOO</code> and <code>foo</code> refer to the same file); in others, filenames are case sensitive (i.e., the names <code>FOO</code>, <code>Foo</code> and <code>foo</code> refer to three separate files).
 
A file name is unique so that an application can refer to exactly one file for a particular name. If the file system supports directories, then generally file name uniqueness is enforced within the context of each directory. In other words, a storage can contain multiple files with the same name, but not in the same directory.
Most modern file systems allow filenames to contain a wide range of characters from the [[Unicode]] character set. However, they may have restrictions on the use of certain special characters, disallowing them within filenames; those characters might be used to indicate a device, device type, directory prefix, file path separator, or file type.
 
Most file systems restrict the length of a file name.
===Directories===
{{Main|Directory (file systems)}}
File systems typically have '''directories''' (also called '''folders''') which allow the user to group files into separate collections. This may be implemented by associating the file name with an index in a [[table of contents]] or an [[inode]] in a [[Unix-like]] file system. Directory structures may be flat (i.e. linear), or allow hierarchies where directories may contain subdirectories. The first file system to support arbitrary hierarchies of directories was used in the [[Multics]] operating system.<ref>{{cite conference|url=http://www.multicians.org/fjcc4.html|title=A General-Purpose File System For Secondary Storage|author=R. C. Daley|author2=P. G. Neumann|year=1965|conference=Fall Joint Computer Conference|publisher=[[AFIPS]]|pages=213–229|doi=10.1145/1463891.1463915|accessdate=2011-07-30}}</ref> The native file systems of Unix-like systems also support arbitrary directory hierarchies, as do, for example, [[Apple Inc.|Apple]]'s [[Hierarchical File System]], and its successor [[HFS Plus|HFS+]] in classic [[Mac OS]] (HFS+ is still used in [[Mac OS X]]), the [[File Allocation Table|FAT]] file system in [[MS-DOS]] 2.0 and later and [[Microsoft Windows]], the [[NTFS]] file system in the [[Windows NT]] family of operating systems, and the ODS-2 (On-Disk Structure-2) and higher levels of the [[Files-11]] file system in [[OpenVMS]].
 
Some file systems match file names as [[Case sensitivity|case sensitive]] and others as case insensitive. For example, the names <code>MYFILE</code> and <code>myfile</code> match the same file for case insensitive, but different files for case sensitive.
==={{Anchor|METADATA}}Metadata===
Other bookkeeping information is typically associated with each file within a file system. The [[file size|length]] of the data contained in a file may be stored as the number of blocks allocated for the file or as a [[byte]] count. The [[system time|time]] that the file was last modified may be stored as the file's timestamp. File systems might store the file creation time, the time it was last accessed, the time the file's [[metadata]] was changed, or the time the file was last backed up. Other information can include the file's [[device file|device type]] (e.g. [[Block devices|block]], [[Character devices|character]], [[Internet socket|socket]], [[subdirectory]], etc.), its owner [[user ID]] and [[group ID]], its [[file system permissions|access permissions]] and other [[file attribute]]s (e.g. whether the file is read-only, [[executable]], etc.).
 
Most modern file systems allow a file name to contain a wide range of characters from the [[Unicode]] character set. Some restrict characters such as those used to indicate special attributes such as a device, device type, directory prefix, file path separator, or file type.
A file system stores all the metadata associated with the file—including the file name, the length of the contents of a file, and the ___location of the file in the folder hierarchy—separate from the contents of the file.
 
=== Directories ===
 
{{Main|Directory (computing)}}
 
File systems typically support organizing files into '''directories''', also called '''folders''', which segregate files into groups.
 
This may be implemented by associating the file name with an index in a [[table of contents]] or an [[inode]] in a [[Unix-like]] file system.
 
Directory structures may be flat (i.e. linear), or allow hierarchies by allowing a directory to contain directories, called subdirectories.
 
The first file system to support arbitrary hierarchies of directories was used in the [[Multics]] operating system.<ref>{{cite conference|chapter-url=http://www.multicians.org/fjcc4.html|chapter=A General-Purpose File System For Secondary Storage|author=R. C. Daley|author2=P. G. Neumann|title=Proceedings of the November 30--December 1, 1965, fall joint computer conference, Part I on XX - AFIPS '65 (Fall, part I) |year=1965|conference=Fall Joint Computer Conference|publisher=[[AFIPS]]|pages=213–229|doi=10.1145/1463891.1463915|access-date=2011-07-30|doi-access=free}}</ref> The native file systems of Unix-like systems also support arbitrary directory hierarchies, as do, [[Apple Inc.|Apple]]'s [[Hierarchical File System (Apple)|Hierarchical File System]] and its successor [[HFS Plus|HFS+]] in [[classic Mac OS]], the [[File Allocation Table|FAT]] file system in [[MS-DOS]] 2.0 and later versions of MS-DOS and in [[Microsoft Windows]], the [[NTFS]] file system in the [[Windows NT]] family of operating systems, and the ODS-2 (On-Disk Structure-2) and higher levels of the [[Files-11]] file system in [[OpenVMS]].
 
{{Anchor|METADATA}}
 
=== Metadata ===
 
In addition to data, the file content, a file system also manages associated [[metadata]] which may include but is not limited to:
 
* name
* [[file size|size]] which may be stored as the number of blocks allocated or as a [[byte]] count
* [[system time|when]] created, last accessed, last backed-up
* owner [[user ID|user]] and [[group ID|group]]
* [[file system permissions|access permissions]]
* [[file attribute]]s such as whether the file is read-only, [[executable]], etc.
* [[device file|device type]] (e.g. [[Block devices|block]], [[Character devices|character]], [[Internet socket|socket]], [[subdirectory]], etc.)
 
A file system stores associated metadata separate from the content of the file.
 
Most file systems store the names of all the files in one directory in one place—the directory table for that directory—which is often stored like any other file.
Line 47 ⟶ 88:
Additional attributes can be associated on file systems, such as [[NTFS]], [[XFS]], [[ext2]], [[ext3]], some versions of [[Unix File System|UFS]], and [[HFS+]], using [[extended file attributes]]. Some file systems provide for user defined attributes such as the author of the document, the character encoding of a document or the size of an image.
 
Some file systems allow for different data collections to be associated with one file name. These separate collections may be referred to as ''streams'' or ''forks''. Apple has long used a forked file system on the Macintosh, and Microsoft supports streams in NTFS. Some file systems maintain multiple past revisions of a file under a single file name; the filenamefile name by itself retrieves the most recent version, while prior saved version can be accessed using a special naming convention such as "filename;4" or "filename(-4)" to access the version four saves ago.
 
See [[comparison of file systems#Metadata|comparison of file systems § Metadata]] for details on which file systems support which kinds of metadata.
 
=== Storage space organization ===
===File system as an abstract user interface===
In some cases, a file system may not make use of a storage device but can be used to organize and represent access to any data, whether it is stored or dynamically generated (e.g. [[procfs]]).
 
A local file system tracks which areas of storage belong to which file and which are not being used.
=== Utilities ===
The difference between a utility and a built-in core command function is arbitrary, depending on the design of the operating system, and on the memory and space limitations of the hardware. For example, Microsoft [[MS-DOS]] uses a utility for formatting and a built-in command for simple file copying, while in the [[Apple DOS]] formatting is a built-in command and simple file copying is performed by using a utility.
 
When a file system creates a file, it allocates space for data. Some file systems permit or require specifying an initial space allocation and subsequent incremental allocations as the file grows.
File systems include utilities to initialize, alter parameters of and remove an instance of the file system. Some include the ability to extend or truncate the space allocated to the file system.
 
To delete a file, the file system records that the file's space is free; available to use for another file.
{{Anchor|DENTRY}}
Directory utilities may be used to create, rename and delete ''directory entries'', which are also known as ''dentries'' (singular: ''dentry''),<ref>{{cite book
| last1 = Mohan
| first1 = I. Chandra
| title = Operating Systems
| url = http://books.google.com/books?id=eei_jHVJi3oC
| ___location = Delhi
| publisher = PHI Learning Pvt. Ltd.
| publication-date = 2013
| page = 166
| isbn = 9788120347267
| accessdate = 2014-07-27
| quote = The word dentry is short for 'directory entry'. A dentry is nothing but a specific component in the path from the root. They (directory name or file name) provide for accessing files or directories[.]
}}</ref> and to alter metadata associated with a directory. Directory utilities may also include capabilities to create additional links to a directory ([[hard link]]s in [[Unix]]), to rename parent links (".." in [[Unix-like]] operating systems),{{Clarify|date=July 2014}} and to create bidirectional links to files.
 
[[File:100 000-files 5-bytes each -- 400 megs of slack space.png|frame|An example of slack space, demonstrated with 4,096-[[byte]] NTFS clusters: 100,000 files, each five bytes per file, which equal to 500,000 bytes of actual data but require 409,600,000 bytes of disk space to store <!-- The size listing shown in Explorer is oddly doubly-wrong. The example files are 5 bytes each, not 0.1K, and the clusters are a minimum of 4K not 1K.-->]]
File utilities create, list, copy, move and delete files, and alter metadata. They may be able to truncate data, truncate or extend space allocation, append to, move, and modify files in-place. Depending on the underlying structure of the file system, they may provide a mechanism to prepend to, or truncate from, the beginning of a file, insert entries into the middle of a file or delete entries from a file.
 
A local file system manages storage space to provide a level of reliability and efficiency. Generally, it allocates storage device space in a granular manner, usually multiple physical units (i.e. [[bytes]]). For example, in [[Apple DOS]] of the early 1980s, 256-byte sectors on 140 kilobyte floppy disk used a ''track/sector map''.{{Citation needed|date=September 2012}}
Utilities to free space for deleted files, if the file system provides an undelete function, also belong to this category.
 
The granular nature results in unused space, sometimes called [[slack space]], for each file except for those that have the rare size that is a multiple of the granular allocation.{{Sfn|Carrier|2005|pp=187–188}} For a 512-byte allocation, the average unused space is 256 bytes. For 64&nbsp;KB clusters, the average unused space is 32&nbsp;KB.
Some file systems defer operations such as reorganization of free space, secure erasing of free space, and rebuilding of hierarchical structures by providing utilities to perform these functions at times of minimal activity. An example is the file system [[defragmentation]] utilities, such as the [[Disk Defragmenter (Windows)|Disk Defragmenter]] utility on Microsoft Windows.
 
Generally, the allocation unit size is set when the storage is configured.
Some of the most important features of file system utilities involve supervisory activities which may involve bypassing ownership or direct access to the underlying device. These include high-performance backup and recovery, data replication and reorganization of various data structures and allocation tables within the file system.
Choosing a relatively small size compared to the files stored, results in excessive access overhead.
Choosing a relatively large size results in excessive unused space.
Choosing an allocation size based on the average size of files expected to be in the storage tends to minimize unusable space.
 
=== Fragmentation ===
 
[[File:File system fragmentation.svg|thumb|File systems may become [[File system fragmentation|fragmented]]]]
 
As a file system creates, modifies and deletes files, the underlying storage representation may become [[File system fragmentation|fragmented]]. Files and the unused space between files will occupy allocation blocks that are not contiguous.
 
A file becomes fragmented if space needed to store its content cannot be allocated in contiguous blocks. Free space becomes fragmented when files are deleted.<ref>{{cite book|url=https://books.google.com/books?id=dSMJAAAAQBAJ&pg=PA524|title=Embedded Microcomputer Systems: Real Time Interfacing|edition=Third|last=Valvano|first=Jonathan W.|publisher=[[Cengage Learning]]|date=2011|access-date=June 30, 2022|page=524|isbn=978-1-111-42625-5}}</ref>
 
Fragmentation is invisible to the end user and the system still works correctly. However, this can degrade performance on some storage hardware that works better with contiguous blocks such as [[Hard disk drive#Performance characteristics|hard disk drives]]. Other hardware such as [[Solid-state drive|solid-state drives]] are not affected by fragmentation.
 
=== Access control ===
 
===Restricting and permitting access===
<!-- Too many 'see also' links, perhaps these should be moved to the 'See also' sect at the end -->
{{See also|Computer security|Password cracking|Filesystem-level encryption|Encrypting File System}}
 
A file system often supports access control of data that it manages.
There are several mechanisms used by file systems to control access to data. Usually the intent is to prevent reading or modifying files by a user or group of users. Another reason is to ensure data is modified in a controlled way so access may be restricted to a specific program. Examples include passwords stored in the metadata of the file or elsewhere and [[file permissions]] in the form of permission bits, [[access control list]]s, or [[capability (computers)|capabilities]]. The need for file system utilities to be able to access the data at the media level to reorganize the structures and provide efficient backup usually means that these are only effective for polite users but are not effective against intruders.
 
The intent of access control is often to prevent certain users from reading or modifying certain files.
 
Access control can also restrict access by program in order to ensure that data is modified in a controlled way. Examples include passwords stored in the metadata of the file or elsewhere and [[file permissions]] in the form of permission bits, [[access control list]]s, or [[Capability-based security|capabilities]]. The need for file system utilities to be able to access the data at the media level to reorganize the structures and provide efficient backup usually means that these are only effective for polite users but are not effective against intruders.
<!-- Please don't make this article really big by including all the issues of file security here. Please add it to a file system security article -->
 
Methods for encrypting file data are sometimes included in the file system. This is very effective since there is no need for file system utilities to know the encryption seed to effectively manage the data. The risks of relying on encryption include the fact that an attacker can copy the data and use brute force to decrypt the data. LosingAdditionally, losing the seed means losing the data.
 
===Maintaining integrityStorage quota ===
[[File:Btrfs qgroup screenshot.png|thumb|upright=1.5|Example of qgroup (quota group) of a [[btrfs]] filesystem]]
One significant responsibility of a file system is to ensure that, regardless of the actions by programs accessing the data, the structure remains consistent. This includes actions taken if a program modifying data terminates abnormally or neglects to inform the file system that it has completed its activities. This may include updating the metadata, the directory entry and handling any data that was buffered but not yet updated on the physical storage media.
Some operating systems allow a system administrator to enable [[disk quota]]s to limit a user's use of storage space.
 
=== Data integrity ===
Other failures which the file system must deal with include media failures or loss of connection to remote systems.
 
A file system typically ensures that stored data remains consistent in both normal operations as well as exceptional situations like:
In the event of an operating system failure or "soft" power failure, special routines in the file system must be invoked similar to when an individual program fails.
* accessing program neglects to inform the file system that it has completed file access (to close a file)
* accessing program terminates abnormally (crashes)
* media failure
* loss of connection to remote systems
* operating system failure
* system reset ([[warm reboot|soft reboot]])
* power failure ([[hard reboot]])
 
Recovery from exceptional situations may include updating metadata, directory entries and handling data that was buffered but not written to storage media.
The file system must also be able to correct damaged structures. These may occur as a result of an operating system failure for which the OS was unable to notify the file system, power failure or reset.
 
=== Recording ===
 
A file system might record events to allow analysis of issues such as:
* file or systemic problems and performance
* nefarious access
 
=== Data access ===
 
==== Byte stream access ====
 
Many file systems access data as a stream of [[bytes]]. Typically, to read file data, a program provides a [[memory buffer]] and the file system retrieves data from the medium and then writes the data to the buffer. A write involves the program providing a buffer of bytes that the file system reads and then stores to the medium.
 
==== Record access ====
 
Some file systems, or layers on top of a file system, allow a program to define a [[Record (computer science)|record]] so that a program can read and write data as a structure; not an unorganized sequence of bytes.
 
If a ''fixed length'' record definition is used, then locating the n<sup>th</sup> record can be calculated mathematically, which is relatively fast compared to parsing the data for record separators.
 
An identification for each record, also known as a key, allows a program to read, write and update records without regard to their ___location in storage. Such storage requires managing blocks of media, usually separating key blocks and data blocks. Efficient algorithms can be developed with pyramid structures for locating records.<ref>{{cite web|url=https://www.researchgate.net/publication/234789457|title=KSAM: A B + -tree-based keyed sequential-access method|work=ResearchGate|access-date=29 April 2016}}</ref>
 
=== Utilities ===
 
Typically, a file system can be managed by the user via various utility programs.
 
Some utilities allow the user to create, configure and remove an instance of a file system. It may allow extending or truncating the space allocated to the file system.
 
{{Anchor|DENTRY}}
Directory utilities may be used to create, rename and delete ''directory entries'', which are also known as ''dentries'' (singular: ''dentry''),<ref>{{cite book
| last1 = Mohan
| first1 = I. Chandra
| title = Operating Systems
| url = https://books.google.com/books?id=eei_jHVJi3oC
| ___location = Delhi
| publisher = PHI Learning Pvt. Ltd.
| date = 2013
| page = 166
| isbn = 9788120347267
| access-date = 2014-07-27
| quote = The word dentry is short for 'directory entry'. A dentry is nothing but a specific component in the path from the root. They (directory name or file name) provide for accessing files or directories[.]
}}</ref> and to alter metadata associated with a directory. Directory utilities may also include capabilities to create additional links to a directory ([[hard link]]s in [[Unix]]), to rename parent links (".." in [[Unix-like]] operating systems),{{Clarify|date=July 2014}} and to create bidirectional links to files.
 
File utilities create, list, copy, move and delete files, and alter metadata. They may be able to truncate data, truncate or extend space allocation, append to, move, and modify files in-place. Depending on the underlying structure of the file system, they may provide a mechanism to prepend to or truncate from the beginning of a file, insert entries into the middle of a file, or delete entries from a file. Utilities to free space for deleted files, if the file system provides an undelete function, also belong to this category.
The file system must also record events to allow analysis of systemic issues as well as problems with specific files or directories.
 
Some file systems defer operations such as reorganization of free space, secure erasing of free space, and rebuilding of hierarchical structures by providing utilities to perform these functions at times of minimal activity. An example is the file system [[defragmentation]] utilities.
===User data===
The most important purpose of a file system is to manage user data. This includes storing, retrieving and updating data.
 
Some of the most important features of file system utilities are supervisory activities which may involve bypassing ownership or direct access to the underlying device. These include high-performance backup and recovery, data replication, and reorganization of various data structures and allocation tables within the file system.
Some file systems accept data for storage as a stream of bytes which are collected and stored in a manner efficient for the media. When a program retrieves the data, it specifies the size of a memory buffer and the file system transfers data from the media to the buffer. A runtime library routine may sometimes allow the user program to define a ''record'' based on a library call specifying a length. When the user program reads the data, the library retrieves data via the file system and returns a ''record''.
 
=== File system API ===
Some file systems allow the specification of a fixed record length which is used for all write and reads. This facilitates updating records.
 
Utilities, libraries and programs use [[file system API]]s to make requests of the file system. These include data transfer, positioning, updating metadata, managing directories, managing access specifications, and removal.
An identification for each record, also known as a key, makes for a more sophisticated file system. The user program can read, write and update records without regard to their ___location. This requires complicated management of blocks of media usually separating key blocks and data blocks. Very efficient algorithms can be developed with pyramid structure for locating records.{{citation needed|date=March 2015}}
 
===Using aMultiple file systems within a single system ===
Utilities, language specific run-time libraries and user programs use [[file system API]]s to make requests of the file system. These include data transfer, positioning, updating metadata, managing directories, managing access specifications, and removal.
 
===Multiple file systems within a single system===
Frequently, retail systems are configured with a single file system occupying the entire [[Computer storage device|storage device]].
 
Another approach is to [[Disk partitioning|partition]] the disk so that several file systems with different attributes can be used. One file system, for use as browser cache or email storage, might be configured with a small allocation size. This haskeeps the additional advantage of keeping the frantic activity of creating and deleting files typical of browser activity in a narrow area of the disk andwhere it will not interferinginterfere with allocations of other files.file A similar partition might be created for emailallocations. Another partition, and file system might be created for the storage of audio or video files with a relatively large allocationblock size. OneYet of the file systemsanother may normally be set ''read-only'' and only periodically be set writable. Some file systems, such as [[ZFS]] and [[APFS]], support multiple file systems sharing a common pool of free blocks, supporting several file systems with different attributes without having to reserved a fixed amount of space for each file system.<ref>{{cite web|url=https://docs.freebsd.org/en/books/handbook/zfs/|title=Chapter 22. The Z File System (ZFS)|work=The FreeBSD Handbook|quote=Pooled storage: adding physical storage devices to a pool, and allocating storage space from that shared pool. Space is available to all file systems and volumes, and increases by adding new storage devices to the pool.}}</ref><ref>{{cite web|url=https://daisydiskapp.com/guide/4/en/APFS/|title=About Apple File System (APFS)|work=DaisyDisk User Guide|quote=APFS introduces space sharing between volumes. In APFS, every physical disk is a container that can have multiple volumes inside, which share the same pool of free space.}}</ref>
 
A third approach, which is mostly used in cloud systems, is to use "[[disk imagesimage]]s" to house additional file systems, with the same attributes or not, within another (host) file system as a file. A common example is virtualization: one user can run an experimental Linux distribution (using the [[ext4]] file system) in a virtual machine under his/her production Windows environment (using [[NTFS]]). The ext4 file system resides in a disk image, which is treated as a file (or multiple files, depending on the [[hypervisor]] and settings) in the NTFS host file system.
 
Having multiple file systems on a single system has the additional benefit that in the event of a corruption of a single partitionfile system, the remaining file systems will frequently still be intact. This includes virus destruction of the ''system'' partitionfile system or even a system that will not boot. File system utilities which require dedicated access can be effectively completed piecemeal. In addition, [[defragmentation]] may be more effective. Several system maintenance utilities, such as virus scans and backups, can also be processed in segments. For example, it is not necessary to backup the file system containing videos along with all the other files if none have been added since the last backup. As for the image files, one can easily "spin off" differential images which contain only "new" data written to the master (original) image. Differential images can be used for both safety concerns (as a "disposable" system - can be quickly restored if destroyed or contaminated by a virus, as the old image can be removed and a new image can be created in matter of seconds, even without automated procedures) and quick virtual machine deployment (since the differential images can be quickly spawned using a script in batches).
 
===Design limitations=Types ==
All file systems have some functional limit that defines the maximum storable data capacity within that system. These functional limits are a best-guess effort by the designer based on how large the storage systems are right now and how large storage systems are likely to become in the future. Disk storage has continued to increase at near [[exponential growth|exponential]] rates (see [[Moore's law]]), so after a few years, file systems have kept reaching design limitations that require computer users to repeatedly move to a newer system with ever-greater capacity.
 
=== Disk file systems ===
File system complexity typically varies proportionally with the available storage capacity. The file systems of early 1980s [[home computer]]s with 50&nbsp;KB to 512&nbsp;KB of storage would not be a reasonable choice for modern storage systems with hundreds of gigabytes of capacity. Likewise, modern file systems would not be a reasonable choice for these early systems, since the complexity of modern file system structures would quickly consume or even exceed the very limited capacity of the early storage systems.
 
A ''disk file system'' takes advantages of the ability of disk storage media to randomly address data in a short amount of time. Additional considerations include the speed of accessing data following that initially requested and the anticipation that the following data may also be requested. This permits multiple users (or processes) access to various data on the disk without regard to the sequential ___location of the data. Examples include [[File Allocation Table|FAT]] ([[FAT12]], [[FAT16]], [[FAT32]]), [[exFAT]], [[NTFS]], [[ReFS]], [[Hierarchical File System (Apple)|HFS]] and [[HFS Plus|HFS+]], [[High Performance File System|HPFS]], [[Apple File System|APFS]], [[Unix File System|UFS]], [[ext2]], [[ext3]], [[ext4]], [[XFS]], [[btrfs]], [[Files-11]], [[Veritas File System]], [[VMFS]], [[ZFS]], [[ReiserFS]], [[Novell Storage Services|NSS]] and ScoutFS. Some disk file systems are [[journaling file system]]s or [[versioning file system]]s.
==Types of file systems==
File system types can be classified into disk/tape file systems, network file systems and special-purpose file systems.
 
===Disk= fileOptical systemsdiscs ====
A ''disk file system'' takes advantages of the ability of disk storage media to randomly address data in a short amount of time. Additional considerations include the speed of accessing data following that initially requested and the anticipation that the following data may also be requested. This permits multiple users (or processes) access to various data on the disk without regard to the sequential ___location of the data. Examples include [[File Allocation Table|FAT]] ([[FAT12]], [[FAT16]], [[FAT32]]), [[exFAT]], [[NTFS]], [[Hierarchical File System|HFS]] and [[HFS Plus|HFS+]], [[High Performance File System|HPFS]], [[Unix File System|UFS]], [[ext2]], [[ext3]], [[ext4]], [[XFS]], [[btrfs]], [[ISO 9660]], [[Files-11]], [[Veritas File System]], [[VMFS]], [[ZFS]], [[ReiserFS]] and [[Universal Disk Format|UDF]]. Some disk file systems are [[journaling file system]]s or [[versioning file system]]s.
 
[[ISO 9660]] and [[Universal Disk Format]] (UDF) are two common formats that target [[Compact Disc]]s, [[DVD]]s and [[Blu-ray]] [[optical disc|discs]]. [[Mount Rainier (packet writing)|Mount Rainier]] is an extension to UDF supported since 2.6 series of the Linux kernel and since Windows Vista that facilitates rewriting to DVDs.
====Optical discs====
[[ISO 9660]] and [[Universal Disk Format]] (UDF) are two common formats that target [[Compact Disc]]s, [[DVD]]s and [[Blu-ray]] discs. [[Mount Rainier (packet writing)|Mount Rainier]] is an extension to UDF supported since 2.6 series of the Linux kernel and since Windows Vista that facilitates rewriting to DVDs.
 
=== Flash file systems ===
{{Main|Flash file system}}
 
A ''flash file system'' considers the special abilities, performance and restrictions of [[flash memory]] devices. Frequently a disk file system can use a flash memory device as the underlying storage media, but it is much better to use a file system specifically designed for a flash device.<ref>{{cite book|chapter=18. Storage Alternatives for Mobile Computers|title=Mobile Computing|last1=Douglis|first1=Fred|last2=Cáceres|first2=Ramón|last3=Kaashoek|first3=M. Frans|author3-link=Frans Kaashoek|last4=Krishnan|first4=P.|last5=Li|first5=Kai|author6-link=Kai Li|last6=Marsh|first6=Brian|last7=Tauber|first7=Joshua|publisher=[[USENIX]]|date=1994|volume=353|pages=473–505|isbn=978-0-585-29603-6|doi=10.1007/978-0-585-29603-6_18|s2cid=2441760 }}</ref>
 
=== Tape file systems ===
 
A ''tape file system'' is a file system and tape format designed to store files on tape in a self-describing form. [[Magnetic tapes]] are sequential storage media with significantly longer random data access times than disks, posing challenges to the creation and efficient management of a general-purpose file system.
A ''tape file system'' is a file system and tape format designed to store files on tape. [[Magnetic tape]]s are sequential storage media with significantly longer random data access times than disks, posing challenges to the creation and efficient management of a general-purpose file system.
 
In a disk file system there is typically a master file directory, and a map of used and free data regions. Any file additions, changes, or removals require updating the directory and the used/free maps. Random access to data regions is measured in milliseconds so this system works well for disks.
Line 157 ⟶ 244:
IBM has developed a file system for tape called the [[Linear Tape File System]]. The IBM implementation of this file system has been released as the open-source [[Linear Tape File System#IBM Linear Tape File System - Single Drive Edition|IBM Linear Tape File System — Single Drive Edition (LTFS-SDE)]] product. The Linear Tape File System uses a separate partition on the tape to record the index meta-data, thereby avoiding the problems associated with scattering directory entries across the entire tape.
 
==== Tape formatting ====
 
Writing data to a tape, erasing, or formatting a tape is often a significantly time-consuming process and can take several hours on large tapes{{Efn|An LTO-6 2.5 TB tape requires more than 4 hours to write at 160 MB/Sec}}. With many data tape technologies it is not necessary to format the tape before over-writing new data to the tape. This is due to the inherently destructive nature of overwriting data on sequential media.
Writing data to a tape, erasing, or formatting a tape is often a significantly time-consuming process and can take several hours on large tapes.{{Efn|An LTO-6 2.5 TB tape requires more than 4 hours to write at 160 MB/Sec}} With many data tape technologies it is not necessary to format the tape before over-writing new data to the tape. This is due to the inherently destructive nature of overwriting data on sequential media.
 
Because of the time it can take to format a tape, typically tapes are pre-formatted so that the tape user does not need to spend time preparing each new tape for use. All that is usually necessary is to write an identifying media label to the tape before use, and even this can be automatically written by software when a new tape is used for the first time.
 
===Database file systems===
Another concept for file management is the idea of a database-based file system. Instead of, or in addition to, hierarchical structured management, files are identified by their characteristics, like type of file, topic, author, or similar [[metadata (computing)|rich metadata]].<ref>{{cite web|url=httphttps://www.theregister.co.uk/2002/03/29/windows_on_a_database_sliced/ |title=Windows on a database – sliced and diced by BeOS vets |publisher=theregister.co.uk |date=2002-03-29 |accessdateaccess-date=2014-02-07}}</ref>
 
IBM DB2 for i <ref>{{cite web|url=http://www-03.ibm.com/systems/i/software/db2/index.html |title=IBM DB2 for i: Overview |publisher=03.ibm.com |accessdateaccess-date=2014-02-07 |archive-url=https://web.archive.org/web/20130802153156/http://www-03.ibm.com/systems/i/software/db2/index.html |archive-date=2013-08-02 |url-status=dead}}</ref> (formerly known as DB2/400 and DB2 for i5/OS) is a database file system as part of the object based [[IBM i ]]<ref>{{cite web|url=http://www.ibm.com/developerworks/ibmi/newto/ |title=IBM developerWorks : New to IBM i |publisher=Ibm.com |date=2011-03-08 |accessdateaccess-date=2014-02-07}}</ref> operating system (formerly known as OS/400 and i5/OS), incorporating a [[Single-level store|single level store]] and running on IBM Power Systems (formerly known as AS/400 and iSeries), designed by Frank G. Soltis IBM's former chief scientist for IBM i. Around 1978 to 1988 Frank G. Soltis and his team at IBM Rochester havehad successfully designed and applied technologies like the database file system where others like Microsoft later failed to accomplish.<ref>{{cite web |url=httphttps://www.theregister.co.uk/2002/01/28/xp_successor_longhorn_goes_sql/ |title=XP successor Longhorn goes SQL, P2P – Microsoft leaks |publisher=theregister.co.uk |date=2002-01-28 |accessdateaccess-date=2014-02-07}}</ref> These technologies are informally known as 'Fortress Rochester'{{Citation needed|date = June 2014|reason = Any news report or blog article mentioning this name and relating it to IBM i?}} and were in few basic aspects extended from early Mainframe technologies but in many ways more advanced from a technological perspective{{Citation needed|date = June 2014|reason = Is there any articles supporting this technological superiority?}}.
 
Some other projects that aren'tare not "pure" database file systems but that use some aspects of a database file system:
* Many [[Web content management system]]s use a [[Database management system|relational DBMS]] to store and retrieve files. For example, [[XHTML]] files are stored as [[XML]] or text fields, while image files are stored as blob fields; [[SQL]] SELECT (with optional [[XPath]]) statements retrieve the files, and allow the use of a sophisticated logic and more rich information associations than "usual file systems"." Many CMSs also have the option of storing only [[metadata]] within the database, with the standard filesystem used to store the content of files.
* Very large file systems, embodied by applications like [[Apache Hadoop]] and [[Google File System]], use some ''database file system'' concepts.
 
===Transactional file systems===
Some programs need to updateeither make multiple filesfile "allsystem atchanges, or, if one or more of the changes fail for any reason, make none of the once"changes. For example, a softwareprogram installationwhich is installing or updating software may write program binariesexecutables, libraries, and/or configuration files. If some of the writing fails and the software installationis failsleft partially installed or updated, the programsoftware may be broken or unusable. IfAn theincomplete installation isupdate upgradingof a key system utility, such as the command [[shell (computing)|shell]], may leave the entire system may be left in an unusable state.
 
[[Transaction processing]] introduces the [[Isolation (database systems)|isolation]] guarantee, which states that operations within a transaction are hidden from other threads on the system until the transaction commits, and that interfering operations on the system will be properly [[Serialization|serialized]] with the transaction. Transactions also provide the [[Atomicity (programming)|atomicity]] guarantee, ensuring that operations inside of a transaction are either all committed or the transaction can be aborted and the system discards all of its partial results. This means that if there is a crash or power failure, after recovery, the stored state will be consistent. Either the software will be completely installed or the failed installation will be completely rolled back, but an unusable partial install will not be left on the system. Transactions also provide the [[isolation (database systems)|isolation]] guarantee{{Clarify|reason=Complicated terms|date=June 2017}}, meaning that operations within a transaction are hidden from other threads on the system until the transaction commits, and that interfering operations on the system will be properly [[Serialization|serialized]] with the transaction.
 
Windows, beginning with Vista, added transaction support to [[NTFS]], in a feature called [[Transactional NTFS]], but its use is now discouraged.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/windows/desktop/hh802690(v=vs.85).aspx |title=Alternatives to using Transactional NTFS (Windows) |publisher=Msdn.microsoft.com |date=2013-12-05 |accessdateaccess-date=2014-02-07}}</ref> There are a number of research prototypes of transactional file systems for UNIX systems, including the Valor file system,<ref>Spillane,{{cite conference|last1=Spillane|first1=Richard; |last2=Gaikwad, |first2=Sachin; |last3=Chinni, |first3=Manjunath; |last4=Zadok, |first4=Erez and |last5=Wright, |first5=Charles P.; |date=2009; [|url=http://www.fsl.cs.sunysb.edu/docs/valor/valor_fast2009.pdf "|title=Enabling transactional file access via lightweight kernel extensions"]; |conference=Seventh USENIX Conference on File and Storage Technologies (FAST 2009)}}</ref> Amino,<ref>{{cite journal|last1=Wright, |first1=Charles P.; |last2=Spillane, |first2=Richard; |last3=Sivathanu, |first3=Gopalan; |last4=Zadok, |first4=Erez; |date=2007; [|url=http://www.fsl.cs.sunysb.edu/docs/amino-tos06/amino.pdf "|title=Extending ACID Semantics to the File System]; |journal=ACM Transactions on Storage|volume=3 |issue=2 |page=4 |doi=10.1145/1242520.1242521 |s2cid=8939577 }}</ref> LFS,<ref>Selzter,{{cite conference|last=Seltzer|first=Margo I.;|author-link=Margo Seltzer|date=1993; [|url=http://www.eecs.harvard.edu/~margo/papers/icde93/paper.pdf "|title=Transaction Support in a Log-Structured File System"]; |book-title=Proceedings of the Ninth International Conference on Data Engineering}}</ref> and a transactional [[ext3]] file system on the TxOS kernel,<ref>Porter,{{cite conference|last1=Porter|first1=Donald E.; |last2=Hofmann, |first2=Owen S.; |last3=Rossbach, |first3=Christopher J.; |last4=Benn, |first4=Alexander and |last5=Witchel, |first5=Emmett; 2009; [|url=http://www.sigops.org/sosp/sosp09/papers/porter-sosp09.pdf "|title=Operating System Transactions"]; In the |book-title=Proceedings of the 22nd ACM Symposium on Operating Systems Principles (SOSP '09), |___location=Big Sky, MT, |date=October 2009.}}</ref> as well as transactional file systems targeting embedded systems, such as TFFS.<ref>Gal,{{cite conference|last1=Gal|first1=Eran; |last2=Toledo, |first2=Sivan; [|url=http://www.usenix.org/event/usenix05/tech/general/full_papers/gal/gal.pdf "|title=A Transactional Flash File System for Microcontrollers"]|conference=USENIX 2005}}</ref>
 
Ensuring consistency across multiple file system operations is difficult, if not impossible, without file system transactions. [[File locking]] can be used as a [[concurrency control]] mechanism for individual files, but it typically does not protect the directory structure or file metadata. For instance, file locking cannot prevent [[TOCTTOU]] race conditions on symbolic links.
File locking also cannot automatically roll back a failed operation, such as a software upgrade; this requires atomicity.
 
[[Journaling file system]]s areis one technique used to introduce transaction-level consistency to file system structures. Journal transactions are not exposed to programs as part of the OS API; they are only used internally to ensure consistency at the granularity of a single system call.
 
Data backup systems typically do not provide support for direct backup of data stored in a transactional manner, which makes the recovery of reliable and consistent data sets difficult. Most backup software simply notes what files have changed since a certain time, regardless of the transactional state shared across multiple files in the overall dataset. As a workaround, some database systems simply produce an archived state file containing all data up to that point, and the backup software only backs that up and does not interact directly with the active transactional databases at all. Recovery requires separate recreation of the database from the state file, after the file has been restored by the backup software.
 
===Network file systems===
{{Main|Distributed file system}}
 
A ''network file system'' is a file system that acts as a client for a remote file access protocol, providing access to files on a server. Programs using local interfaces can transparently create, manage and access hierarchical directories and files in remote network-connected computers. Examples of network file systems include clients for the [[Network File System (protocol)|NFS]],<ref>{{citation|title=Sun's Network File System|url=http://pages.cs.wisc.edu/~remzi/OSTEP/dist-nfs.pdf|publisher= Arpaci-Dusseau Books|year = 2014|first1 = Remzi H.|last1 =Arpaci-Dusseau|first2=Andrea C.|last2 = Arpaci-Dusseau}}</ref> [[Andrew File System|AFS]], [[Server Message Block|SMB]] protocols, and file-system-like clients for [[File Transfer Protocol|FTP]] and [[WebDAV]].
 
===Shared disk file systems===
{{Main|Shared disk file system}}
 
A ''shared disk file system'' is one in which a number of machines (usually servers) all have access to the same external disk subsystem (usually a SAN[[storage area network]]). The file system arbitrates access to that subsystem, preventing write collisions.<ref>{{cite book|url=https://books.google.com/books?id=TUtrRoDhNm4C&pg=PA124|title=Storage Networks Explained: Basics and Application of Fibre Channel SAN, NAS, iSCSI and InfiniBand|last1=Troppens|first1=Ulf|last2=Erkens|first2=Rainer|last3=Müller|first3=Wolfgang|publisher=[[John Wiley & Sons]]|date=2004|access-date=June 30, 2022|pages=124–125|isbn=0-470-86182-7}}</ref> Examples include [[GFS2]] from [[Red Hat]], [[IBM General Parallel File System|GPFS]], now known as Spectrum Scale, from IBM, [[SAN File System|SFS]] from DataPlow, [[CXFS]] from [[Silicon Graphics International|SGI]] and, [[StorNext]] from [[Quantum Corporation]] and ScoutFS from Versity.
 
=== Special file systems ===
{{anchor|special file system}}===
A ''special file system'' presents non-file elements of an operating system as files so they can be acted on using file system APIs. This is most commonly done in [[Unix-like]] operating systems, but devices are given file names in some non-Unix-like operating systems as well.
 
Some file systems expose elements of the operating system as files so they can be acted on via the [[file system API]]. This is common in [[Unix-like]] operating systems, and to a lesser extent in other operating systems. Examples include:
====Device file systems {{anchor|device file system}}====
A ''device file system'' represents I/O devices and pseudo-devices as files, called [[device file]]s. Examples in [[Unix-like]] systems include [[devfs]] and, in [[Linux]] 2.6 systems, [[udev]]. In non-Unix-like systems, such as [[TOPS-10]] and other operating systems influenced by it, where the full filename or [[pathname]] of a file can include a device prefix, devices other than those containing file systems are referred to by a device prefix specifying the device, without anything following it.
 
{{anchor|device file system}}
====Other special file systems====
* [[devfs]], [[udev]], [[TOPS-10]] expose I/O devices or pseudo-devices as special files
* In the Linux kernel, [[configfs]] and [[sysfs]] provide files that can be used to query the kernel for information and configure entities in the kernel.
* [[configfs]] and [[sysfs]] expose special files that can be used to query and configure [[Linux]] kernel information
* [[procfs]] maps processes and, on Linux, other operating system structures into a filespace.
* [[procfs]] exposes process information as special files
 
===Minimal file system / audio-cassette storage===
TheIn latethe 1970s saw the development of the [[microcomputer]]. Diskdisk and digital tape devices were too expensive for hobbyistssome early [[microcomputer]] users. An inexpensive basic data storage system was devised that used common [[audio cassette]] tape.
 
When the system needed to write data, the user was notified to press "RECORD" on the cassette recorder, then press "RETURN" on the keyboard to notify the system that the cassette recorder was recording. The system wrote a sound to provide time synchronization, then [[Kansas City standard|modulated sounds]] that encoded a prefix, the data, a [[checksum]] and a suffix. When the system needed to read data, the user was instructed to press "PLAY" on the cassette recorder. The system would ''listen'' to the sounds on the tape waiting until a burst of sound could be recognized as the synchronization. The system would then interpret subsequent sounds as data. When the data read was complete, the system would notify the user to press "STOP" on the cassette recorder. It was primitive, but it worked (amostly) lot of the time)worked. Data was stored sequentially, usually in an unnamed format, although some systems (such as the [[Commodore PET]] series of computers) did allow the files to be named. Multiple sets of data could be written and located by fast-forwarding the tape and observing at the tape counter to find the approximate start of the next data region on the tape. The user might have to listen to the sounds to find the right spot to begin playing the next data region. Some implementations even included audible sounds interspersed with the data.
 
===Flat file systems===
<!-- linked from redirect [[Flat file system]] -->
In a flat file system, there are no [[subdirectory|subdirectories]].
{{distinguish|Flat file database}}
In a flat file system, there are no [[subdirectory|subdirectories]]; directory entries for all files are stored in a single directory.
 
When [[floppy disk]] media was first available this type of file system was adequate due to the relatively small amount of data space available. [[CP/M]] machines featured a flat file system, where files could be assigned to one of 16 ''user areas'' and generic file operations narrowed to work on one instead of defaulting to work on all of them. These user areas were no more than special attributes associated with the files,; that is, it was not necessary to define specific [[Disk quota|quota]] for each of these areas and files could be added to groups for as long as there was still free storage space on the disk. The early [[Apple Macintosh]] also featured a flat file system, the [[Macintosh File System]]. It was unusual in that the file management program ([[Macintosh Finder]]) created the illusion of a partially hierarchical filing system on top of EMFS. This structure required every file to have a unique name, even if it appeared to be in a separate folder. [[IBM]] [[DOS/360]] and [[OS/360]] store entries for all files on a disk pack (''volume'') in a directory on the pack called a ''[[Volume Table of Contents]]'' (VTOC).
 
While simple, flat file systems become awkward as the number of files grows and makes it difficult to organize data into related groups of files.
Line 219 ⟶ 309:
A recent addition to the flat file system family is [[Amazon.com|Amazon]]'s [[Amazon S3|S3]], a remote storage service, which is intentionally simplistic to allow users the ability to customize how their data is stored. The only constructs are buckets (imagine a disk drive of unlimited size) and objects (similar, but not identical to the standard concept of a file). Advanced file management is allowed by being able to use nearly any character (including '/') in the object's name, and the ability to select subsets of the bucket's content based on identical prefixes.
 
== Implementations ==
==File systems and operating systems==
Many [[operating system]]s include support for more than one file system. Sometimes the OS and the file system are so tightly interwoven it is difficult to separate out file system functions.
 
An [[operating system]] (OS) typically supports one or more file systems. Sometimes an OS and its file system are so tightly interwoven that it is difficult to describe them independently.
There needs to be an interface provided by the operating system software between the user and the file system. This interface can be textual (such as provided by a [[command line interface]], such as the [[Unix shell]], or [[DIGITAL Command Language|OpenVMS DCL]]) or graphical (such as provided by a [[graphical user interface]], such as [[file browser]]s). If graphical, the metaphor of the ''[[folder (computing)|folder]]'', containing documents, other files, and nested folders is often used (see also: [[directory (file systems)|directory]] and folder).
 
An OS typically provides file system access to the user. Often an OS provides [[command line interface]], such as [[Unix shell]], Windows [[Command Prompt]] and [[PowerShell]], and [[DIGITAL Command Language|OpenVMS DCL]]. An OS often also provides [[graphical user interface]] [[file browser]]s such as MacOS [[Finder (software)|Finder]] and Windows [[File Explorer]].
 
===Unix and Unix-like operating systems===
[[Unix-like]] operating systems create a virtual file system, which makes all the files on all the devices appear to exist in a single hierarchy. This means, in those systems, there is one [[root directory]], and every file existing on the system is located under it somewhere. Unix-like systems can use a [[RAM disk]] or network shared resource as its root directory.
 
Unix-like systems assign a device name to each device, but this is not how the files on that device are accessed. Instead, to gain access to files on another device, the operating system must first be informed where in the directory tree those files should appear. This process is called [[mount (computing)|mounting]] a file system. For example, to access the files on a [[CD-ROM]], one must tell the operating system "Take the file system from this CD-ROM and make it appear under such-and-such directory"." The directory given to the operating system is called the ''[[mount point]]''&nbsp;– it might, for example, be <tt>{{mono|/media</tt>}}. The <tt>{{mono|/media</tt>}} directory exists on many Unix systems (as specified in the [[Filesystem Hierarchy Standard]]) and is intended specifically for use as a mount point for removable media such as CDs, DVDs, USB drives or floppy disks. It may be empty, or it may contain subdirectories for mounting individual devices. Generally, only the [[System administrator|administrator]] (i.e. [[root user]]) may authorize the mounting of file systems.
 
[[Unix-like]] operating systems often include software and tools that assist in the mounting process and provide it new functionality. Some of these strategies have been coined "auto-mounting" as a reflection of their purpose.
* In many situations, file systems other than the root need to be available as soon as the operating system has [[booting|booted]]. All Unix-like systems therefore provide a facility for mounting file systems at boot time. [[System administrator]]s define these file systems in the configuration file [[fstab]] (''vfstab'' in [[Solaris (operating system)|Solaris]]), which also indicates options and mount points.
* In some situations, there is no need to mount certain file systems at [[booting|boot time]], although their use may be desired thereafter. There are some utilities for Unix-like systems that allow the mounting of predefined file systems upon demand.
* Removable media have become very common with [[microcomputer]] platforms. They allow programs and data to be transferred between machines without a physical connection. Common examples include [[USB flash drive]]s, [[CD-ROM]]s, and [[DVD]]s. Utilities have therefore been developed to detect the presence and availability of a medium and then mount that medium without any user intervention.
<!-- supermount definition may be inaccurate -->
<!-- there may be some concepts I {forgot, omitted, did not know, am not creative enough to invent} -->
* Progressive Unix-like systems have also introduced a concept called '''supermounting'''; see, for example, [httphttps://sourceforge.net/projects/supermount-ng the Linux supermount-ng project]. For example, a floppy disk that has been supermounted can be physically removed from the system. Under normal circumstances, the disk should have been synchronized and then unmounted before its removal. Provided synchronization has occurred, a different disk can be inserted into the drive. The system automatically notices that the disk has changed and updates the mount point contents to reflect the new medium.
* An [[automounter]] will automatically mount a file system when a reference is made to the directory atop which it should be mounted. This is usually used for file systems on network servers, rather than relying on events such as the insertion of media, as would be appropriate for removable media.
 
===={{Anchor|LINUX}}Linux====
[[Linux]] supports many differentnumerous file systems, but common choices for the system disk on a block device include the ext* family (such as [[ext2]], [[ext3]] and [[ext4]]), [[XFS]], [[JFS (file system)|JFS]], [[ReiserFS]] and [[btrfs]]. For raw flash without a [[flash translation layer]] (FTL) or [[Memory Technology Device]] (MTD), there isare [[UBIFS]], [[JFFS2]], and [[YAFFS]], among others. [[SquashFS]] is a common compressed read-only file system.
 
====Solaris====
[[Solaris (operating system)|Solaris]] in earlier releases defaulted to (non-journaled or non-logging) [[Unix File System|UFS]] for bootable and supplementary file systems. Solaris defaulted to, supported, and extended UFS.
 
Support for other file systems and significant enhancements were added over time, including [[Veritas Software]] Corp. (Journalingjournaling) [[VxFS]], Sun Microsystems (Clusteringclustering) [[QFS]], Sun Microsystems (Journalingjournaling) UFS, and Sun Microsystems (open source, poolable, 128 bit compressible, and error-correcting) [[ZFS]].
 
Kernel extensions were added to Solaris to allow for bootable Veritas [[VxFS]] operation. Logging or [[Journaling file system|Journalingjournaling]] was added to UFS in Sun's [[Solaris 7]]. Releases of [[Solaris 10]], Solaris Express, [[OpenSolaris]], and other open source variants of the Solaris operating system later supported bootable [[ZFS]].
 
[[Logical Volume Management]] allows for spanning a file system across multiple devices for the purpose of adding redundancy, capacity, and/or throughput. Legacy environments in Solaris may use [[Solaris Volume Manager]] (formerly known as [[Solstice DiskSuite]]). Multiple operating systems (including Solaris) may use [[Veritas Volume Manager]]. Modern Solaris based operating systems eclipse the need for Volumevolume Managementmanagement through leveraging virtual storage pools in [[ZFS]].
 
====OS XmacOS====
[[macOS|macOS (formerly Mac OS X)]] uses the [[Apple File System]] (APFS), which in 2017 replaced a file system inherited from classic [[classic Mac OS]] called [[HFS Plus]] (HFS+). Apple also uses the term "Mac OS Extended".<ref>{{cite web|url=http://supportfor HFS+.apple.com/kb/PH10963|title=OS X Mountain Lion: What is a Mac OS Extended (Journaled) volume?|publisher=Apple|date=August 8, 2013|accessdate=February 7, 2014}}</ref><ref>{{cite web|title=Mac OS X: About file system journaling|url=http://support.apple.com/kb/ht2355|publisher=Apple|accessdateaccess-date=8 February 2014}}</ref> HFS Plus is a [[metadata (computing)|metadata]]-rich and [[case preservation|case-preserving]] but (usually) [[case sensitivity|case-insensitive]] file system. Due to the Unix roots of OS XmacOS, Unix permissions were added to HFS Plus. Later versions of HFS Plus added [[journaling file system|journaling]] to prevent corruption of the file system structure and introduced a number of optimizations to the allocation algorithms in an attempt to defragment files automatically without requiring an external defragmenter.
 
FilenamesFile names can be up to 255 characters. HFS Plus uses [[Unicode]] to store filenamesfile names. On OS XmacOS, the [[file format|filetype]] can come from the [[type code]], stored in file's metadata, or the [[filename extension]].
 
HFS Plus has three kinds of links: Unix-style [[hard link]]s, Unix-style [[symbolic link]]s, and [[alias (Mac OS)|aliases]]. Aliases are designed to maintain a link to their original file even if they are moved or renamed; they are not interpreted by the file system itself, but by the File Manager code in [[userland (computing)|userland]].
 
macOS 10.13 High Sierra, which was announced on June 5, 2017, at Apple's WWDC event, uses the [[Apple File System]] on [[solid-state drive]]s.
OS X also supported the [[Unix File System|UFS]] file system, derived from the [[BSD]] Unix Fast File System via [[NeXTSTEP]]. However, as of [[Mac OS X Leopard]], OS X could no longer be installed on a UFS volume, nor can a pre-Leopard system installed on a UFS volume be upgraded to Leopard.<ref>[http://docs.info.apple.com/article.html?artnum=306516 Mac OS X 10.5 Leopard: Installing on a UFS-formatted volume]</ref> As of [[Mac OS X Lion]] UFS support was completely dropped.
 
macOS also supported the [[Unix File System|UFS]] file system, derived from the [[BSD]] Unix Fast File System via [[NeXTSTEP]]. However, as of [[Mac OS X Leopard]], macOS could no longer be installed on a UFS volume, nor can a pre-Leopard system installed on a UFS volume be upgraded to Leopard.<ref>{{cite web|url=http://docs.info.apple.com/article.html?artnum=306516|title=Mac OS X 10.5 Leopard: Installing on a UFS-formatted volume|work=apple.com|date=19 October 2007|access-date=29 April 2016|archive-url=https://web.archive.org/web/20080316033439/http://docs.info.apple.com/article.html?artnum=306516|archive-date=16 March 2008|url-status=dead}}</ref> As of [[Mac OS X Lion]] UFS support was completely dropped.
Newer versions of OS X are capable of reading and writing to the legacy [[File Allocation Table|FAT]] file systems (16 & 32) common on Windows. They are also capable of ''reading'' the newer [[NTFS]] file systems for Windows. In order to ''write'' to NTFS file systems on OS X versions prior to 10.6 (Snow Leopard) third party software is necessary. Mac OS X 10.6 (Snow Leopard) and later allows writing to NTFS file systems, but only after a non-trivial system setting change (third party software exists that automates this).<ref>{{cite web|last=OSXDaily|title=How to Enable NTFS Write Support in Mac OS X|url=http://osxdaily.com/2013/10/02/enable-ntfs-write-support-mac-os-x/|accessdate=6 February 2014}}</ref>
 
Newer versions of macOS are capable of reading and writing to the legacy [[File Allocation Table|FAT]] file systems (16 and 32) common on Windows. They are also capable of ''reading'' the newer [[NTFS]] file systems for Windows. In order to ''write'' to NTFS file systems on macOS versions prior to [[Mac OS X Snow Leopard]] third-party software is necessary. Mac OS X 10.6 (Snow Leopard) and later allow writing to NTFS file systems, but only after a non-trivial system setting change (third-party software exists that automates this).<ref>{{cite web|last=OSXDaily|title=How to Enable NTFS Write Support in Mac OS X|url=http://osxdaily.com/2013/10/02/enable-ntfs-write-support-mac-os-x/|access-date=6 February 2014|date=2013-10-02}}</ref>
Finally, OS X supports reading and writing of the [[exFAT]] file system since Mac OS X Snow Leopard, starting from version 10.6.5.<ref name="encase-book">{{cite book|url=http://books.google.com/books?id=c1mezk6uHfIC&pg=PA79&lpg=PA79&dq=os+x+exfat+10.6.5&source=bl&ots=WLaYRquQk5&sig=d5Y-iNQEoREJG96L4Oq3JJBQvB8&hl=en&sa=X&ei=tlr1UrelNIKFtAav3YGgDw&redir_esc=y#v=onepage&q=os%20x%20exfat%2010.6.5&f=false |title=EnCase Computer Forensics - The Official EnCE: EnCase Certified Examiner |author=Steve Bunting |publisher=Books.google.com |date=2012-08-14 |accessdate=2014-02-07}}</ref>
 
Finally, macOS supports reading and writing of the [[exFAT]] file system since Mac OS X Snow Leopard, starting from version 10.6.5.<ref name="encase-book">{{cite book|url=https://books.google.com/books?id=c1mezk6uHfIC&q=os+x+exfat+10.6.5&pg=PA79 |title=EnCase Computer Forensics - The Official EnCE: EnCase Certified Examiner |author=Steve Bunting |date=2012-08-14 |publisher=Wiley |access-date=2014-02-07|isbn=9781118219409 }}</ref>
 
===OS/2===
[[OS/2]] 1.2 introduced the [[High Performance File System]] (HPFS). HPFS supports mixed case file names in different [[code page]]s, long file names (255 characters), more efficient use of disk space, an architecture that keeps related items close to each other on the disk volume, less fragmentation of data, [[Extent (file systems)|extent-based]] space allocation, a [[B+ tree]] structure for directories, and the root directory located at the midpoint of the disk, for faster average access. A [[JFS (file system)|journaled filesystem]] (JFS) was shipped in 1999.
 
===PC-BSD===
Line 267 ⟶ 363:
 
===Plan 9===
[[Plan&nbsp;9 from Bell Labs]] treats everything as a file and accesses all objects as a file would be accessed (i.e., there is no [[ioctl]] or [[mmap]]): networking, graphics, debugging, authentication, capabilities, encryption, and other services are accessed via I/O operations on [[file descriptor]]s. The [[9P (protocol)|9P]] protocol removes the difference between local and remote files. File systems in Plan&nbsp;9 are organized with the help of private, per-process namespaces, allowing each process to have a different view of the many file systems that provide resources in a distributed system.
 
The [[Inferno (operating system)|Inferno]] operating system shares these concepts with Plan&nbsp;9.
Line 273 ⟶ 369:
===Microsoft Windows===
[[File:Dir command in Windows Command Prompt.png|thumb|right|300px|Directory listing in a [[Microsoft Windows|Windows]] command shell]]
Windows makes use of the [[File Allocation Table|FAT]], [[NTFS]], [[exFAT]], [[Live File System]] and [[ReFS]] file systems (the last of these is only supported and usable in [[Windows Server 2012]], [[Windows Server 2016]], [[Windows 8]], [[Windows 8.1]], and [[Windows 10]]; Windows cannot boot from it).
 
Windows uses a ''[[drive letter]]'' abstraction at the user level to distinguish one disk or partition from another. For example, the [[path (computing)|path]] <tt>{{mono|C:\WINDOWS</tt>}} represents a directory <tt>{{mono|WINDOWS</tt>}} on the partition represented by the letter C. Drive C: is most commonly used for the primary [[hard disk drive]] partition, on which Windows is usually installed and from which it boots. This "tradition" has become so firmly ingrained that bugs exist in many applications which make assumptions that the drive that the operating system is installed on is C. The use of drive letters, and the tradition of using "C" as the drive letter for the primary hard disk drive partition, can be traced to [[MS-DOS]], where the letters A and B were reserved for up to two floppy disk drives. This in turn derived from [[CP/M]] in the 1970s, and ultimately from IBM's [[CP/CMS]] of 1967.
 
====FAT====
{{Main|File Allocation Table}}
 
The family of [[File Allocation Table|FAT]] file systems is supported by almost all operating systems for personal computers, including all versions of [[Microsoft Windows|Windows]] and [[MS-DOS]]/[[PC&nbsp;DOS]], [[OS/2]], and [[DR-DOS]]. (PC&nbsp;DOS is an OEM version of MS-DOS, MS-DOS was originally based on [[Seattle Computer Products|SCP]]'s [[86-DOS]]. DR-DOS was based on [[Digital Research]]'s [[Concurrent DOS]], a successor of [[CP/M-86]].) The FAT file systems are therefore well-suited as a universal exchange format between computers and devices of most any type and age.
 
The FAT file system traces its roots back to an (incompatible) 8-bit FAT precursor in [[Standalone Disk BASIC]] and the short-lived [[MIDAS (operating system)|MDOS/MIDAS]] project.{{Citation needed|date=September 2012}}
Line 300 ⟶ 396:
{{Main|exFAT}}
 
[[exFAT]] is a proprietary and patent-protected file system withhas certain advantages over NTFS with regard to [[file system overhead]].{{citation needed|date=March 2021}}
 
exFAT is not backward compatible with FAT file systems such as FAT12, FAT16 or FAT32. The file system is supported with newer Windows systems, such as Windows XP, Windows Server 2003, Windows Vista, Windows 2008, Windows 7, Windows 8, andWindows more recently8.1, supportWindows has10 been added forand Windows XP11.<ref>[http://www.microsoft.com/downloads/details.aspx?FamilyID=1cbe3906-ddd1-4ca2-b727-c2dff5e30f61&displaylang=en Microsoft WinXP exFat patch]</ref>
 
exFAT is supported in OS&nbsp;XmacOS starting with version 10.6.5 (Snow Leopard).<ref name="encase-book" /> Support in other operating systems is sparse since Microsoft has not published the specifications of the file system and implementing support for exFAT requires a license. exFAT is the only file system that is fully supported on both OS&nbsp;XmacOS and Windows that can hold files biggerlarger than 4&nbsp;GB.<ref>{{Citationcite neededweb|dateurl=Aprilhttps://support.apple.com/guide/disk-utility/dsku19ed921c/mac|title=File 2015system formats available in Disk Utility on Mac|website=Apple Support}}</ref><ref>{{cite web|url=https://docs.microsoft.com/en-us/windows/win32/fileio/exfat-specification|title=exFAT file system specification|website=Microsoft Docs}}</ref>
 
===OpenVMS===
{{Main|Files-11}}
 
===MVS [IBM Mainframe]===
{{Main|MVS#MVS filesystem}}
Prior to the introduction of [[VSAM]], [[OS/360]] systems implemented a hybrid file system. The system was designed to easily support [[Removable media|removable disk packs]], so the information relating to all files on one disk (''volume'' in IBM terminology) is stored on that disk in a [[Flat file database|flat system file]] called the ''[[Volume Table of Contents]]'' (VTOC). The VTOC stores all metadata for the file. Later a hierarchical directory structure was imposed with the introduction of the ''System Catalog'', which can optionally catalog files (datasets) on resident and removable volumes. The catalog only contains information to relate a dataset to a specific volume. If the user requests access to a dataset on an offline volume, and they have suitable privileges, the system will attempt to mount the required volume. Cataloged and non-cataloged datasets can still be accessed using information in the VTOC, bypassing the catalog, if the required volume id is provided to the OPEN request. Still later the VTOC was indexed to speed up access.
 
===Conversational Monitor System===
{{Main|CMS file system}}
The IBM [[Conversational Monitor System]] (CMS) component of [[VM/370]] uses a separate flat file system for each [[virtual disk]] (''minidisk''). File data and control information are scattered and intermixed. The anchor is a record called the ''Master File Directory'' (MFD), always located in the fourth block on the disk. Originally CMS used fixed-length 800-byte blocks, but later versions used larger size blocks up to 4K. Access to a data record requires two levels of [[indirection]], where the file's directory entry (called a ''File Status Table'' (FST) entry) points to blocks containing a list of addresses of the individual records.
 
===AS/400 file system===
Data on the AS/400 and its successors consists of system objects mapped into the system virtual address space in a [[single-level store]]. Many types of [[AS/400Object (IBM i)|object]]s are defined including the directories and files found in other file systems. File objects, along with other types of objects, form the basis of the AsAS/400's support for an integrated [[relational database]].
 
===Other file systems===
* The Prospero File System is a file system based on the Virtual System Model.<ref>[{{cite book|url=http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.132.7982 |title=The Prospero File System: A Global File System Based on the Virtual System Model]|year=1992}}</ref> The system was created by Dr. B. Clifford Neuman of the Information Sciences Institute at the University of Southern California.<ref>[http://www.cs.ucsb.edu/~ravenben/papers/fsml/prospero-gfsvsm.ps.gz cs.ucsb.edu]</ref>
* [[Flex machine#RSRE FLEX Computer System|RSRE FLEX file system]] - written in [[ALGOL 68]]
* The file system of the [[Michigan Terminal System]] (MTS) is interesting because: (i) it provides "line files" where record lengths and line numbers are associated as metadata with each record in the file, lines can be added, replaced, updated with the same or different length records, and deleted anywhere in the file without the need to read and rewrite the entire file; (ii) using program keys files may be shared or permitted to commands and programs in addition to users and groups; and (iii) there is a comprehensive file locking mechanism that protects both the file's data and its metadata.<ref>[http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber{{cite journal|title=1451786 "A file system for a general-purpose time-sharing environment"], |first=G. C. |last=Pirkola, ''|journal=[[Proceedings of the IEEE'', ]]|date=June 1975, |volume =63 no. |issue=6, pp.&nbsp;|pages=918–924,|doi=10.1109/PROC.1975.9856 ISSN|s2cid=12982770 |issn=0018-9219}}</ref><ref name=Protection1977>[{{cite conference|url=https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxtaWNoaWdhbnRlcm1pbmFsc3lzdGVtfGd4Ojc5MTAxNzg1NTVmMjg5Mzk "|title=The Protection of Information in a General Purpose Time-Sharing Environment"], |first1=Gary C. |last1=Pirkola and |first2=John |last2=Sanguinetti, ''|book-title=Proceedings of the IEEE Symposium on Trends and Applications 1977: Computer Security and Integrity'', vol. |volume=10 no. |issue=4, , pp. 106-114|pages=106–114}}</ref>
* [[TempleOS]] uses RedSea, a file system made by Terry A. Davis.<ref name="00yK1">{{Cite web|last=Davis|first=Terry A.|date=n.d.|url=http://www.templeos.org/Wb/Doc/Features.html#l1|title=The Temple Operating System|website=www.templeos.org|access-date=March 30, 2017|url-status=dead|archive-url=https://web.archive.org/web/20170331120502/http://www.templeos.org/Wb/Doc/Features.html#l1|archive-date=March 31, 2017}}</ref>
 
== Limitations ==
 
=== Design limitations ===
 
File systems limit [[Comparison of file systems#Limits|storable data capacity]] {{endash}} generally driven by the typical size of storage devices at the time the file system is designed and anticipated into the foreseeable future.
 
Since storage sizes have increased at near [[exponential growth|exponential]] rate (see [[Moore's law]]), newer storage devices often exceed existing file system limits within only a few years after introduction. This requires new file systems with ever increasing capacity.
 
With higher capacity, the need for capabilities and therefore complexity increases as well. File system complexity typically varies proportionally with available storage capacity. Capacity issues aside, the file systems of early 1980s [[home computer]]s with 50&nbsp;KB to 512&nbsp;KB of storage would not be a reasonable choice for modern storage systems with hundreds of gigabytes of capacity. Likewise, modern file systems would not be a reasonable choice for these early systems, since the complexity of modern file system structures would quickly consume the limited capacity of early storage systems.
==Limitations==
 
===Converting the type of a file system===
It may be advantageous or necessary to have files in a different file system than they currently exist. Reasons include the need for an increase in the space requirements beyond the limits of the current file system. The depth of path may need to be increased beyond the restrictions of the file system. There may be performance or reliability considerations. Providing access to another operating system which does not support the existing file system is another reason.
 
====In-place conversion====
In some cases conversion can be done in-place, although migrating the file system is more conservative, as it involves a creating a copy of the data and is recommended.<ref name="ms">[http{{cite web|url=https://technetlearn.microsoft.com/en-us/libraryprevious-versions/windows/it-pro/windows-xp/bb456984(v=technet.aspx 10)|title=How to Convert FAT Disks to NTFS], |website=[[Microsoft, October 25, 2001Docs]]}}</ref> On Windows, FAT and FAT32 file systems can be converted to NTFS via the convert.exe utility, but not the reverse.<ref name="ms" /> On Linux, ext2 can be converted to ext3 (and converted back), and ext3 can be converted to ext4 (but not back),<ref>[{{cite web|url=https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Converting_an_ext3_filesystem_to_ext4|title=Ext4 ConvertingHowto|work=kernel.org|access-date=29 anApril ext3 filesystem to ext4]2016}}</ref> and both ext3 and ext4 can be converted to [[btrfs]], and converted back until the undo information is deleted.<ref name="btrfs">[{{cite web|url=https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3 |title=Conversion from Ext3], |website=Btrfs wiki}}</ref> These conversions are possible due to using the same format for the file data itself, and relocating the metadata into empty space, in some cases using [[sparse file]] support.<ref name="btrfs" />
 
====Migrating to a different file system====
Migration has the disadvantage of requiring additional space although it may be faster. The best case is if there is unused space on media which will contain the final file system.
 
For example, to migrate a FAT32 file system to an ext2 file system. First create, a new ext2 file system, thenis copycreated. Then the data tofrom the FAT32 file system, thenis deletecopied to the FAT32ext2 one, and the old file system is deleted.
 
An alternative, when there is not sufficient space to retain the original file system until the new one is created, is to use a work area (such as a removable media). This takes longer but ahas backupthe benefit of the data isproducing a nice side effectbackup.
 
===Long file paths and long file names===
In [[hierarchical file systemssystem]]s, files are accessed by means of a ''[[Path (computing)|path]]'' that is a branching list of directories containing the file. Different file systems have different limits on the depth of the path. File systems also have a limit on the length of an individual filenamefile name.
 
Copying files with long names or located in paths of significant depth from one file system to another may cause undesirable results. This depends on how the utility doing the copying handles the discrepancy.
 
==See also==
{{Div col|colwidth=25em}}
{{Portal|Computing}}
 
{{Div col||25em}}
* [[Comparison of file systems]]
* [[Computer data storage]]
* [[Disk quota]]
* [[List of file systems]]
* [[List of Unix programscommands]]
* [[Directory structure]]
* [[DiskShared sharingresource]]
* [[Distributed file system]]
* [[Distributed Data Management Architecture]]
Line 354 ⟶ 464:
* [[File system fragmentation]]
* [[Filename extension]]
* [[Global filesystemfile system]]
* [[Object storage]]
* [[Physical and logical storage]]
* [[Storage efficiency]]
* [[Synthetic file system]]
* [[Virtual file system]]
{{Divdiv col end}}
 
==Notes==
Line 371 ⟶ 481:
{{Reflist|30em}}
 
===Further readingSources===
 
{{Refbegin|30em}}
* {{cite web |accessdate=February 9, 2005|
access-date=February 9, 2005|
url=http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/os2-disc-and-volume-size-limits.html|
url=http://jdebp.eu/FGA/os2-disc-and-volume-size-limits.html|
author=Jonathan de Boyne Pollard|
author-first=Jonathan|
author-last=de Boyne Pollard|
title=Disc and volume size limits|
work=Frequently Given Answers|
year=1996}}
* {{Cite FTP |
* {{cite web |accessdate=February 9, 2005|
access-date=February 9, 2005|
url=ftp://service.boulder.ibm.com/ps/products/os2/fixes/v4warp/english-us/jr09427/JR09427.TXT|
url=ftp://service.boulder.ibm.com/ps/products/os2/fixes/v4warp/english-us/jr09427/JR09427.TXT| server=IBM| url-status=dead|
title=OS/2 corrective service fix JR09427|
title=OS/2 corrective service fix JR09427}}
author=IBM|
* {{cite web|
work=}}
* {{cite web|accessdateaccess-date=February 9, 2005|
url=httphttps://linux-ntfs.sourceforge.net/ntfs/attributes/ea_information.html|
title=Attribute - $EA_INFORMATION (0xD0)|
work=NTFS Information, Linux-NTFS Project}}
* {{cite web|accessdate=February 9, 2005|
access-date=February 9, 2005|
url=http://linux-ntfs.sourceforge.net/ntfs/attributes/ea.html|
url=https://linux-ntfs.sourceforge.net/ntfs/attributes/ea.html|
title=Attribute - $EA (0xE0)|
work=NTFS Information, Linux-NTFS Project}}
* {{cite web|accessdate=February 21, 2005|
access-date=February 21, 2005|
url=http://linux-ntfs.sourceforge.net/ntfs/attributes/standard_information.html|
url=https://linux-ntfs.sourceforge.net/ntfs/attributes/standard_information.html|
title=Attribute - $STANDARD_INFORMATION (0x10)|
work=NTFS Information, Linux-NTFS Project}}
* {{cite web|accessdateaccess-date=September 22, 2015|url=https://developer.apple.com/legacy/library/technotes/tn/tn1150.html|title=Technical Note TN1150: HFS Plus Volume Format|authorwebsite=Apple Computer Inc|work=Detailed HFS Plus and HFSX description.}}
* [{{cite book|url=http://www.digital-evidence.org/fsfa/ |title=File System Forensic Analysis], |author=Brian Carrier, |publisher=Addison Wesley, |date=2005.}}
{{Refend}}
 
Line 406 ⟶ 521:
* {{cite book|first1=Remzi H.|last1=Arpaci-Dusseau|first2=Andrea C.|last2=Arpaci-Dusseau|title=Operating Systems: Three Easy Pieces|publisher=Arpaci-Dusseau Books|year=2014|url=http://www.ostep.org}}
* {{cite book|first=Brian|last=Carrier|title=File System Forensic Analysis|publisher=[[Addison-Wesley]]|year=2005|isbn=0-321-26817-2|url=http://www.digital-evidence.org/fsfa/}}
* {{cite book|first=Helen|last=Custer|title=Inside the Windows NT File System|publisher=[[Microsoft Press]]|year=1994|isbn=1-55615-660-X|url-access=registration|url=https://archive.org/details/insidewindowsntf00cust}}
* {{cite book|first=Dominic|last=Giampaolo|title=Practical File System Design with the Be File System|publisher=Morgan Kaufmann Publishers|year=1999|format=PDF|isbn=1-55860-497-9|url=http://www.nobius.org/~dbgpractical-file-system-design.pdf|access-date=2019-12-15|archive-url=https://web.archive.org/web/20180903092510/http://www.nobius.org/practical-file-system-design.pdf|accessdatearchive-date=20102018-0109-2203|url-status=live}}
* {{cite book|first=Kirby|last=McCoy|title=VMS File System Internals|series=VAX - VMS Series|publisher=[[Digital Press]]|year=1990|isbn=1-55558-056-4}}
* {{cite book|first=Stan|last=Mitchell|title=Inside the Windows 95 File System|publisher=[[O'Reilly Media|O'Reilly]]|year=1997|isbn=1-56592-200-X|url=http://oreilly.com/catalog/156592200X}}
* {{cite book|first=Rajeev|last=Nagar|title=Windows NT File System Internals : A Developer's Guide|publisher=[[O'Reilly Media|O'Reilly]]|year=1997|isbn=978-1-56592-249-5|url=httphttps://oreillyarchive.comorg/catalogdetails/9781565922495windowsntfilesys00naga|url-access=registration}}
* {{cite book|first=Steve D.|last=Pate|title=UNIX Filesystems: Evolution, Design, and Implementation|publisher=[[John Wiley & Sons|Wiley]]|year=2003|isbn=0-471-16483-6|url=http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0471164836.html|archive-date=2013-11-24|access-date=2010-10-17|archive-url=https://web.archive.org/web/20131124021318/http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0471164836.html|url-status=dead}}
* {{cite book|first=Mendel|last=Rosenblum|title=The Design and Implementation of a Log-Structured File System|series=The Springer International Series in Engineering and Computer Science|publisher=Springer|year=1994|isbn=0-7923-9541-7}}
* {{cite book|first1=Mark|last1=Russinovich|first2=David A.|last2=Solomon|first3=Alex|last3=Ionescu|chapter=File Systems|title=Windows Internals|edition=5th|publisher=[[Microsoft Press]]|year=2009|isbn=978-0-7356-2530-13}}
* Prabhakaran, Vijayan (2006). [http://www.cs.wisc.edu/~vijayan/vijayan-thesis.pdf ''IRON File Systems'']. PhD dissertation, University of Wisconsin-Madison.
* {{cite book|first1=Abraham|last1=Silberschatz|first2=Peter Baer|last2=Galvin|first3=Greg|last3=Gagne|chapter=Storage Management|title=Operating System Concepts|edition=7th|publisher=Wiley|year=2004|isbn=0-471-69466-5}}
* {{cite book|first=Andrew S.|last=Tanenbaum|authorlinkauthor-link=Andrew Tanenbaum|title=Modern operating Systems|edition=3rd|publisher=[[Prentice Hall]]|year=2007|isbn=978-0-13-600663-93|url=http://www.pearsonhighered.com/product?ISBN=0136006639}}
* {{cite book|first1=Andrew S.|last1=Tanenbaum|authorlink1author-link1=Andrew Tanenbaum|first2=Albert S.|last2=Woodhull|title=Operating Systems: Design and Implementation|edition=3rd|publisher=[[Prentice Hall]]|year=2006|isbn=0-13-142938-8|url=http://www.pearsonhighered.com/pearsonhigheredus/educator/product/products_detail.page?isbn=0-13-142938-8}}
{{Refend}}
 
Line 424 ⟶ 539:
* [http://linuxgazette.net/102/piszcz.html Benchmarking Filesystems (outdated)] by Justin Piszcz, Linux Gazette 102, May 2004
* [http://linuxgazette.net/122/piszcz.html Benchmarking Filesystems Part II] using kernel 2.6, by Justin Piszcz, Linux Gazette 122, January 2006
* [http://www.debian-administration.org/articles/388 Filesystems (ext3, ReiserFS, XFS, JFS) comparison on Debian Etch] {{Webarchive|url=https://web.archive.org/web/20080913112251/http://www.debian-administration.org/articles/388 |date=2008-09-13 }} 2006
* [http://www.osnews.com/story.php?news_id=69 Interview With the People Behind JFS, ReiserFS & XFS]
* [https://web.archive.org/web/20060313074847/http://www.open-mag.com/features/Vol_18/filesystems/filesystems.htm Journal File System Performance (outdated)]: ReiserFS, JFS, and Ext3FS show their merits on a fast RAID appliance
* [https://web.archive.org/web/20051125112444/http://staff.osuosl.org/~kveton/fs/ Journaled Filesystem Benchmarks (outdated)]: A comparison of ReiserFS, XFS, JFS, ext3 & ext2
* [http://www.osdata.com/system/logical/logical.htm Large List of File System Summaries (most recent update 2006-11-19)]
* [https://web.archive.org/web/20190503084749/http://fsbench.netnation.com/ Linux File System Benchmarks] v2.6 kernel with a stress on CPU usage
* [{{Cite web |url=http://www.techyblog.com/linux-news/linux-26-filesystem-benchmarks-olderbenchmark.html |title=Linux 2.6 Filesystem Benchmarks] (Older) |access-date=2019-12-16 |archive-date=2016-04-15 |archive-url=https://web.archive.org/web/20160415152542/http://www.techyblog.com/linux-news/linux-filesystem-benchmark.html |url-status=unfit }}
* [http://www.suse.de/~aj/linux_lfs.html Linux large file support (outdated)]
* [http://www.microsoft.com/whdc/device/storage/LocFileSys.mspx Local Filesystems for Windows]
* [https://web.archive.org/web/20060819215504/http://osdev.berlios.de/osd-fs.html Overview of some filesystems (outdated)]
* [http://www.lrdev.com/lr/unix/sparsefile.html Sparse files support (outdated)]
* {{cite news |title=From BFS to ZFS: past, present, and future of file systems |url=httphttps://arstechnica.com/articles/paedia/past-present-future-file-systems.ars |author=Jeremy Reimer |date=March 16, 2008 |publisher=arstechnica.com |accessdateaccess-date=2008-03-18 }}
{{Refend}}
 
Line 441 ⟶ 556:
{{Wikibooks|Guide to Unix|Explanations/Filesystems and Swap|Filesystems and Swap}}
{{Commons category|File systems}}
* [{{cite web|url=http://www.forensics.nl/filesystems |title=Filesystem Specifications - Links & Whitepapers]|archive-url=https://web.archive.org/web/20151103192057/http://www.forensics.nl/filesystems|archive-date=2015-11-03|url-status=unfit}}
* [http://filesystems.org/all-projects.html Interesting File System Projects]
 
{{Computer files}}
{{File systems}}
{{Operating system}}
 
{{DEFAULTSORT:File System}}