File system

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 84.139.178.165 (talk) at 23:32, 2 August 2006 (→‎Limits: fixed mistake in NTFS filename allowed characters). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. File systems may use a storage device such as a hard disk or CD-ROM and involve maintaining the physical location of the files, they might provide access to data on a file server by acting as clients for a network protocol (e.g., NFS, SMB, or 9P clients), or they may be virtual and exist only as an access method for virtual data (e.g. procfs).

More formally, a file system is a set of abstract data types that are implemented for the storage, hierarchical organization, manipulation, navigation, access, and retrieval of data. It is debatable whether a file system can be classified as a special-purpose database (DBMS). Needless to say, file systems share much in common with database technology.

Aspects of file systems

The most familiar file systems make use of an underlying data storage device that offers access to an array of fixed-size blocks, sometimes called sectors, generally 512 bytes each. The file system software is responsible for organizing these sectors into files and directories, and keeping track of which sectors belong to which file and which are not being used.

However, file systems need not make use of a storage device at all. A file system can be used to organize and represent access to any data, whether it be stored or dynamically generated (eg, from a network connection).

Whether the file system has an underlying storage device or not, file systems typically have directories which associate file names with files, usually by connecting the file name to an index into a file allocation table of some sort, such as the FAT in an MS-DOS file system, or an inode in a Unix-like filesystem. Directory structures may be flat, or allow hierarchies where directories may contain subdirectories. In some file systems, file names are structured, with special syntax for filename extensions and version numbers. In others, file names are simple strings, and per-file metadata is stored elsewhere.

The hierarchical filesystem was an early research interest of Dennis Ritchie of Unix fame; previous implementations were restricted to only a few levels, notably the IBM implementations, even of their early databases like IMS. After the success of Unix, Ritchie extended the filesystem concept to every object in his later operating system developments, such as Plan 9 and Inferno.

Traditional filesystems offer facilities to create, move and delete both files and directories. They lack facilities to create additional links to a directory (hard links in Unix), rename parent links (".." in Unix-like OS), and create bidirectional links to files.

Traditional filesystems also offer facilities to truncate, append to, create, move, delete and in-place modify files. They do not offer facilities to prepend to or truncate from the beginning of a file, let alone arbitrary insertion into or deletion from a file. The operations provided are highly asymmetric and lack the generality to be useful in unexpected contexts. For example, interprocess pipes in Unix have to be implemented outside of the filesystem because it does not offer truncation from the beginning of files.

Secure access to basic file system operations can be based on a scheme of access control lists or capabilities. Research has shown access control lists to be difficult to secure properly, which is why research operating systems tend to use capabilities. Commercial file systems still use access control lists. see: secure computing

Types of file systems

File system types can be classified into disk file systems, network file systems and special purpose file systems.

Disk file systems

A disk file system is a file system designed for the storage of files on a data storage device, most commonly a disk drive, which might be directly or indirectly connected to the computer. Examples of disk file systems include FAT, NTFS, HFS and HFS+, ext2, ext3, ISO 9660, ODS-5, and UDF. Some disk file systems are also journaling file systems or versioning file systems.

Database file systems

A new concept for file management is the concept 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. Therefore a file search can be formulated in SQL or in natural speech. Examples include BFS and WinFS.

Transactional file systems

This is a special kind of file system in that it logs events or transactions to files. Each operation that you do may involve changes to a number of different files and disk structures. In many cases, these changes are related, meaning that it is important that they all be executed at the same time. Take for example a bank sending another bank some money electronically. The bank's computer will "send" the transfer instruction to the other bank and also update its own records to indicate the transfer has occurred. If for some reason the computer crashes before it has had a chance to update its own records, then on reset, there will be no record of the transfer but the bank will be missing some money. A transactional system can rebuild the actions by resynchronizing the "transactions" on both ends to correct the failure. All transactions can be saved, as well, providing a complete record of what was done and where. This type of file system is designed and intended to be fault tolerant and necessarily, incurs a high degree of overhead.

Network file systems

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. Examples of network file systems include clients for the NFS, SMB, AFP, and 9P protocols, and file-system-like clients for FTP and WebDAV.

Special purpose file systems

A special purpose file system is basically any file system that is not a disk file system or network file system. This includes systems where the files are arranged dynamically by software, intended for such purposes as communication between computer processes or temporary file space.

Special purpose file systems are most commonly used by file-centric operating systems such as Unix. Examples include the procfs (/proc) filesystem used by some Unix variants, which grants access to information about processes and other operating system features.

Deep space science exploration craft, like Voyager I & II used digital tape based special file systems. Most modern space exploration craft like Cassini-Huygens used Real-time operating system file systems or RTOS influenced file systems. The Mars Rovers are one such example of an RTOS file system, important in this case because they are implemented in flash memory.

File systems and operating systems

Most operating systems provide a file system, as a file system is an integral part of any modern operating system. Early microcomputer operating systems' only real task was file management — fact reflected in their names (see DOS and QDOS). Some early operating systems had a separate component for handling file systems which was called a disk operating system. On some microcomputers, the disk operating system was loaded separately from the rest of the operating system. On early operating systems, there was usually support for only one, native, unnamed file system; for example, CP/M supports only its own file system, which might be called "CP/M file system" if needed, but which didn't bear any official name at all.

Because of this, 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 OpenVMS DCL) or graphical (such as provided by a graphical user interface, such as file browsers). If graphical, the metaphor of the folder, containing documents, other files, and nested folders is often used (see also: directory and folder).

Flat file systems

In a flat file system, there are no directories — everything is stored at the same (root) level on the media, be it a hard disk, floppy disk, etc. While simple, this system rapidly becomes inefficient as the number of files grows, and makes it difficult for users to organise data into related groups.

Like many small systems before it, the original Apple Macintosh featured a flat file system, called Macintosh File System. Its version of Mac OS was unusual in that the file management software (Macintosh Finder) created the illusion of a partially hierarchical filing system on top of MFS. MFS was quickly replaced with Hierarchical File System, which supported real directories.

File systems under Unix and Unix-like systems

Template:Wikibookschapter Unix and Unix-like operating systems assign a device name to each device, but this is not how the files on that device are accessed. Instead, Unix creates a virtual file system, which makes all the files on all the devices appear to exist under one hierarchy. This means, in Unix, there is one root directory, and every file existing on the system is located under it somewhere. Furthermore, the Unix root directory does not have to be in any physical place. It might not be on your first hard drive - it might not even be on your computer. Unix can use a network shared resource as its root directory.

To gain access to files on another device, you must first inform the operating system where in the directory tree you would like those files to appear. This process is called 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 thus-and-such a directory". The directory given to the operating system is called the mount point - it might, for example, be /mnt. The /mnt directory exists on many Unix-like systems (as specified in the Filesystem Hierarchy Standard) and is intended specifically for use as a mount point for temporary media like floppy disks or CDs. It may be empty, or it may contain subdirectories for mounting individual devices. Generally, only the 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.

  1. In many situations, filesystems other than the root need to be available as soon as the operating system has booted. All Unix-like systems therefore provide a facility for mounting filesystems at boot time. System administrators define these filesystems in the configuration file fstab, which also indicates options and mount points.
  2. In some situations, there is no need to mount certain filesystems at boot time, although their use may be desired thereafter. There are some utilities for Unix-like systems that allow the mounting of predefined filesystems upon demand.
  3. Removable media have become very common with microcomputer platforms. They allow programs and data to be transferred between machines without a physical connection. Two common examples include CD-ROMs and DVDs. Utilities have therefore been developed to detect the presence and availability of a medium and then mount that medium without any user intervention.
  4. Progressive Unix-like systems have also introduced a concept called supermounting; see, for example, 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 synchronised and then unmounted before its removal. Provided synchronisation 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. Similar functionality is found on standard Windows machines.
  5. A similar innovation preferred by some users is the use of autofs, a system that, like supermounting, eliminates the need for manual mounting commands. The difference from supermount, other than compatibility in an apparent greater range of applications such as access to file systems on network servers, is that devices are mounted transparently when requests to their filesystems are made, as would be appropriate for file systems on network servers, rather than relying on events such as the insertion of media, as would be appropriate for removable media.

File systems under Mac OS X

Mac OS X uses a file system that it inherited from Mac OS called HFS Plus. HFS Plus is a metadata-rich and case preserving file system. Due to the Unix roots of Mac OS X, Unix permissions were added to HFS Plus. Later versions of HFS Plus added a journal 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.

Filenames can be up to 255 characters. HFS Plus uses Unicode to store filenames. On Mac OS X, the filetype can come from the Type code stored in file's metadata or the filename.

HFS Plus has three kinds of links: Hard links, Symbolic links and Aliases. Aliases are designed to maintain a link to their original file even if they are moved or renamed.

File systems under Plan 9 from Bell Labs

Plan 9 from Bell Labs was originally designed to extend some of Unix's good points, and to introduce some new ideas of its own while fixing the shortcomings of Unix.

With respect to file systems, the Unix system of treating things as files was continued, but in Plan 9, everything is treated as a file, and accessed as a file would be (ie., no ioctl or mmap). Perhaps surprisingly, while the file interface is made universal it is also simplified considerably, for example symlinks, hard links and suid are made obsolete, and an atomic create/open operation is introduced. More importantly the set of file operations becomes well defined and subversions of this like ioctl are eliminated.

Secondly, the underlying 9P protocol was used to remove the difference between local and remote files (except for a possible difference in latency). This has the advantage that a device or devices, represented by files, on a remote computer could be used as though it were the local computer's own device(s). This means that under Plan 9, multiple file servers provide access to devices, classing them as file systems. Servers for "synthetic" file systems can also run in user space bringing many of the advantages of micro kernel systems while maintaining the simplicity of the system.

Everything on a Plan 9 system has an abstraction as a file; networking, graphics, debugging, authentication, capabilities, encryption, and other services are accessed via I-O operations on file descriptors. For example, this allows the use of the IP stack of a gateway machine without need of NAT, or provides a network-transparent window system without the need of any extra code.

Another example: a Plan-9 application receives FTP service by opening an FTP site. The ftpfs server handles the open by essentially mounting the remote FTP site as part of the local file system. With ftpfs as an intermediary, the application can now use the usual file-system operations to access the FTP site as if it were part of the local file system. A further example is the mail system which uses file servers that synthesize virtual files and directories to represent a user mailbox as /mail/fs/mbox. The wikifs provides a file system interface to a wiki.

These file systems 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 shares these concepts with Plan 9.

File systems under Microsoft Windows

Microsoft Windows developed out of an earlier operating system (MS-DOS which in turn was based on QDOS and that on CP/M-80, which took many ideas from still earlier operating systems, notably several from DEC), and has added file system from several other sources since its first release (e.g. Unix). As such, Windows makes use of the FAT (File Allocation Table) and NTFS (New Technology File System) filesystems. Older versions of the FAT file system (FAT12 and FAT16) had file name length limits, a limit on the number of entries in the root directory of the filesystem and had restrictions on the maximum size of FAT-formatted disks or partitions. Specifically, FAT12 and FAT16 had a limitation of 8 characters for the file name, and 3 characters for the extension. (This is commonly referred to as the 8.3 limit.) VFAT, which was an extension to FAT12 and FAT16 introduced in Windows NT 3.5 and subsequently included in Windows 95, allowed for long file names (LFN). FAT32 also addressed many of the limits in FAT12 and FAT16, though such limits are still small compared to NTFS.

NTFS, introduced with the Windows NT operating system, allowed ACL-based permission control. Hard links, multiple file streams, attribute indexing, quota tracking, compression and mount-points for other file systems (called "junctions") are also supported, though not all these features are well-documented.

Unlike many other operating systems, Windows uses a drive letter abstraction at the user level to distinguish one disk or partition from another. For example, the path C:\WINDOWS\ represents a directory WINDOWS on the partition represented by the letter C. The C drive is most commonly used for the primary hard disk partition, on which Windows is installed and from which it boots. This "tradition" has become so firmly ingrained that bugs came about in older versions of Windows which made assumptions that the drive that the operating system was installed on was C. The tradition of using "C" for the drive letter can be traced to MS-DOS, where the letters A and B were reserved for up to two floppy disk drives; in a common configuration, A would be the 3½-inch floppy drive, and B the 5¼-inch one. Network drives may also be mapped to drive letters.

Since Windows primarily interacts with the user via a graphical user interface, its documentation refers to directories as a folder which contains files, and is represented graphically with a folder icon.

File systems under OpenVMS

This topic is discussed here: Files-11

File systems under MVS [IBM Mainframe]

This topic is discussed here: MVS#MVS filesystem

Comparison

General information

File system Creator Introduced in Original operating system
DECtape DEC 1964 PDP-6 Monitor
Level-D DEC 1968 TOPS-10
V6FS Bell Labs 1972 Version 6 Unix
RT-11 DEC 1973 RT-11
FAT12 Microsoft 1977 Microsoft Disk BASIC
V7FS Bell Labs 1979 Version 7 Unix
ODS-2 DEC 1979 OpenVMS
FFS Kirk McKusick 1983 4.2BSD
MFS Apple Computer 1984 Mac OS
HFS Apple Computer 1985 Mac OS
OFSTemplate:Fn Metacomco for Commodore 1985 Amiga OS
NWFS Novell 1985 NetWare 286
Amiga FFS Commodore 1987 Amiga OS 1.3
FAT16 Microsoft 1987 MS-DOS 3.31
HPFS IBM & Microsoft 1988 OS/2
JFS IBM 1990 AIXTemplate:Fn
VxFS VERITAS 1991 SVR4.0
AdvFS DEC Before 1993 Digital Unix
NTFS Microsoft, Gary Kimura, Tom Miller 1993 Windows NT
LFS Margo Seltzer 1993 Berkeley Sprite
ext2 Rémy Card 1993 Linux
UFS1 Kirk McKusick 1994 4.4BSD
XFS SGI 1994 IRIX
UDF ISO/ECMA/OSTA 1995 -
FAT32 Microsoft 1996 Windows 95bTemplate:Fn
QFS Sun Microsystems 1996 Solaris
Be File System Be Inc., D. Giampaolo, C. Meurillon 1996 BeOS
HFS Plus Apple 1998 Mac OS 8.1
NSS Novell 1998 NetWare 5
ext3 Stephen Tweedie 1999 Linux
JFS2 IBM 1999 OS/2 WSeB
GFS Sistina(Red Hat) 2000 Linux
ReiserFS Namesys 2001 Linux
FATX Microsoft 2002 Xbox
UFS2 Kirk McKusick 2002 FreeBSD 5.0
OCFS Oracle 2002 Linux
ODS-5 DEC 2003 OpenVMS 8.0
Fossil Bell Labs 2003 Plan 9 from Bell Labs 4
Google File System Google 2003 Linux
ZFS Sun Microsystems 2004 Solaris
Reiser4 Namesys 2004 Linux
OCFS2 Oracle 2005 Linux
NILFS NTT 2005 Linux
GFS2 Red Hat 2006 Linux
File system Creator Introduced in Original operating system

Limits

Maximum filename length Allowable characters in directory entriesTemplate:Fn Maximum pathname length Maximum file size Maximum volume size Template:Fn
DECtape 6.3 A-Z, 0-9 DTxN:FILNAM.EXT = 15 369,280 bytes (577 * 640) 369,920 Bytes (578 * 640)
Level-D 6.3 A-Z, 0-9 DEVICE:FILNAM.EXT[PROJCT,PROGRM] = 7 + 10 + 15 = 32; + 5*7 for SFDs = 67 34,359,738,368 words (2**35-1); 206,158,430,208 SIXBIT bytes Approx 12 GB (64 * 178MB)
RT-11 12 bytes A-Z, 0-9, $ 16 bytes 33,554,432 bytes (65536 * 512) 33,554,432 Bytes
V6FS 14 bytes Template:Fn Any byte except NUL and / Template:Fn No limit defined Template:Fn 8MiB Template:Fn 2TiB
V7FS 14 bytes Template:Fn Any byte except NUL and / Template:Fn No limit defined Template:Fn 1GiB Template:Fn 2TiB
FAT12 255 bytes Template:Fn Any Unicode except NUL Template:Fn Template:Fn No limit defined Template:Fn 32MiB 1MiB to 32MiB
FAT16 255 bytes Template:Fn Any Unicode except NUL Template:Fn Template:Fn No limit defined Template:Fn 2GiB 16MiB to 2GiB
FATX 42 bytes Template:Fn ASCII. Unicode not permitted. No limit defined Template:Fn 2GiB 16MiB to 2GiB
Fossil ? ? ? ? ?
MFS 255 bytes Any byte except : No path (flat filesystem) 256MiB 256MiB
HFS 31 bytes Any byte except : Unlimited 2GiB 2TiB
FAT32 255 bytes Template:Fn Any Unicode except NUL Template:Fn Template:Fn No limit defined Template:Fn 4GiB 512MiB to 2TiB Template:Fn
HPFS 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 4GiB 2TiBTemplate:Fn
NTFS 255 characters Any Unicode except NUL or / 32,767 Unicode characters with each path component (directory or filename) up to 255 characters long Template:Fn 16EiB Template:Fn 16EiB Template:Fn
HFS Plus 255 UTF-16 characters Template:Fn Any valid Unicode Template:Fn Template:Fn Unlimited 8EiB 8EiB Template:Fn
FFS 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 4GiB 256TiB
UFS1 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 4GiB to 256TiB 256TiB
UFS2 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 512GiB to 32PiB 1YiB
ext2 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 16GiB to 2TiBTemplate:Fn 2TiB to 32TiB
ext3 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 16GiB to 2TiBTemplate:Fn 2TiB to 32TiB
GFS 255 Any byte except NUL Template:Fn No limit defined Template:Fn 2TB to 8EBTemplate:Fn 2TB to 8EBTemplate:Fn
ReiserFS 4032 bytes/255 characters Any byte except NUL Template:Fn No limit defined Template:Fn 8TiBTemplate:Fn 16TiB
Reiser4 ? Any byte except / and NUL No limit defined Template:Fn 8TiB on x86 ?
OCFS 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 8TiB 8TiB
OCFS2 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 4PiB 4PiB
XFS 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 8EiBTemplate:Fn 8EiBTemplate:Fn
JFS 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 8EiB 512TiB to 4PiB
JFS2 255 bytes Any Unicode except NUL No limit defined Template:Fn 4PiB 32PiB
QFS 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 16EiB Template:Fn 4PiB Template:Fn
Be File System 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 12288 bytes to 260GiBTemplate:Fn 256PiB to 2EiB
AdvFS 255 characters Any byte except NUL Template:Fn No limit defined Template:Fn 16TiB 16TiB
NSS 256 characters Depends on namespace used Template:Fn Only limited by client 8TiB 8TiB
NWFS 80 bytes Template:Fn Depends on namespace used Template:Fn No limit defined Template:Fn 4GiB 1TiB
ODS-5 236 bytesTemplate:Fn ? 4096 bytesTemplate:Fn 1TiB 1TiB
VxFS 255 bytes Any byte except NUL Template:Fn No limit defined Template:Fn 16EiB ?
UDF 255 bytes Any Unicode except NUL 1023 bytes Template:Fn 16EiB ?
ZFS 255 bytes Any Unicode except NUL No limit defined Template:Fn 16EiB 16EiB
Maximum filename length Allowable characters in directory entriesTemplate:Fn Maximum pathname length Maximum file size Maximum volume size Template:Fn

Metadata

Stores file owner POSIX file permissions Creation timestamps Last access/read timestamps Last metadata change timestamps Last archive timestamps Access control lists Security/MAC labels Extended attributes/Alternate data streams/forks Checksum/ECC
DECtape No No Yes No No No No No No No
Level-D Yes Yes Yes Yes Yes Yes Yes No No No
RT-11 No No No Yes Yes No No No No No
V6FS Yes Yes No Yes Yes No No No No No
V7FS Yes Yes No Yes Yes No No No No No
FAT12 No No Yes Yes No No No No No Template:Fn No
FAT16 No No Yes Yes No No No No No Template:Fn No
FAT32 No No Yes Yes No No No No No No
HPFS YesTemplate:Fn No Yes Yes No No No ? Yes No
NTFS Yes NoTemplate:Fn Yes Yes Yes No Yes ? Yes No
HFS No No Yes No No Yes No No Yes No
HFS Plus Yes Yes Yes Yes Yes Yes Yes ? Yes No
FFS Yes Yes No Yes Yes No No No No No
UFS1 Yes Yes No Yes Yes No Yes Template:Fn Yes Template:Fn No Template:Fn No
UFS2 Yes Yes Yes Yes Yes No Yes Template:Fn Yes Template:Fn Yes No
LFS Yes Yes No Yes Yes No No No No No
ext2 Yes Yes No Yes Yes No Yes Template:Fn Yes Template:Fn Yes No
ext3 Yes Yes No Yes Yes No Yes Template:Fn Yes Template:Fn Yes No
GFS Yes Yes No Yes Yes No Yes Template:Fn Yes Template:Fn Yes No
ReiserFS Yes Yes No Yes Yes No Yes Template:Fn Yes Template:Fn Yes No
Reiser4 Yes Yes No Yes Yes No No No No No
OCFS No Yes No No Yes Yes No No No No
OCFS2 Yes Yes No Yes Yes No No No No No
XFS Yes Yes No Yes Yes No Yes Yes Template:Fn Yes No
JFS Yes Yes Yes Yes Yes No Yes Yes Yes No
QFS Yes Yes Yes Yes Yes Yes Yes No Yes No
Be File System Yes Yes Yes No No No No No Yes No
AdvFS Yes Yes No Yes Yes No Yes No Yes No
NSS Yes Yes YesTemplate:Fn YesTemplate:Fn Yes YesTemplate:Fn Yes ? YesTemplate:Fn Template:Fn No
NWFS Yes ? YesTemplate:Fn YesTemplate:Fn Yes YesTemplate:Fn Yes ? YesTemplate:Fn Template:Fn No
ODS-5 Yes Yes Yes ? ? Yes Yes ? Yes Template:Fn No
VxFS Yes Yes Yes Yes Yes No Yes ? Yes Template:Fn No
UDF Yes Yes Yes Yes Yes Yes Yes No Yes No
Fossil Yes Yes Template:Fn No Yes Yes No No No No No
ZFS Yes Yes Yes Yes Yes Yes Yes No Template:Fn Yes Template:Fn Yes
Stores file owner POSIX file permissions Creation timestamps Last access/read timestamps Last metadata change timestamps Last archive timestamps Access control lists Security/MAC labels Extended attributes/Alternate data streams/forks Checksum/ECC

Features

Hard links Soft links Block journaling or Metadata-only journaling Case-sensitive Case-preserving File Change Log Incremental snapshots XIP
DECtape No No No No No No No No No
Level-D No No No No No No No No No
RT-11 No No No No No No No No No
V6FS Yes No No No Yes Yes No No No
V7FS Yes No Template:Fn No No Yes Yes No No No
FAT12 No No No No No No No No No
FAT16 No No No No No Partial No No No
FAT32 No No No No No Partial No No No
HPFS No No No No No Yes No ? No
NTFS Yes PartialTemplate:Fn No Yes YesTemplate:Fn Yes Yes Yes ?
HFS Plus Partial Yes No YesTemplate:Fn PartialTemplate:Fn Yes YesTemplate:Fn No No
FFS Yes Yes No No Yes Yes No No No
UFS1 Yes Yes No No Yes Yes No No No
UFS2 Yes Yes No NoTemplate:Fn Yes Yes No Yes ?
LFS Yes Yes YesTemplate:Fn No Yes Yes No Yes No
ext2 Yes Yes No No Yes Yes No No YesTemplate:Fn
ext3 Yes Yes Yes Template:Fn Yes Yes Yes No No ?
ReiserFS Yes Yes Yes Template:Fn Yes Yes Yes No No ?
Reiser4 Yes Yes Yes No Yes Yes No ? ?
OCFS No Yes No No Yes Yes No No No
OCFS2 Yes Yes Yes Yes Yes Yes No No No
XFS Yes Yes No Yes Yes Template:Fn Yes Yes Yes ?
JFS Yes Yes No Yes YesTemplate:Fn Yes No ? ?
QFS Yes Yes No No Yes Yes No No No
Be File System Yes Yes No Yes Yes Yes ? ? No
NSS Yes Yes ? Yes YesTemplate:Fn YesTemplate:Fn YesTemplate:Fn Yes No
NWFS YesTemplate:Fn YesTemplate:Fn No No YesTemplate:Fn YesTemplate:Fn YesTemplate:Fn ? No
ODS-2 Yes YesTemplate:Fn No Yes No No Yes Yes No
ODS-5 Yes YesTemplate:Fn No Yes No Yes Yes Yes ?
UDF Yes Yes YesTemplate:Fn YesTemplate:Fn Yes Yes No No Yes
VxFS Yes Yes Yes No Yes Yes Yes YesTemplate:Fn ?
Fossil No No No No Yes Yes Yes Yes No
ZFS Yes Yes YesTemplate:Fn NoTemplate:Fn Yes Yes No Yes No
Hard links Soft links Block journaling or Metadata-only journaling Case-sensitive Case-preserving File Change Log Incremental snapshots XIP

Allocation and layout policies

Tail packing Transparent compression Block suballocation Allocate-on-flush Extents Variable file block size Template:Fn
DECtape No No No No No No
Level-D No No Yes No Yes No
V6FS No No No No No No
V7FS No No No No No No
FAT12 No No Template:Fn No No No No
FAT16 No No Template:Fn No No No No
FAT32 No No No No No No
HPFS No No No No Yes No
NTFS No Yes Partial No Yes No
HFS Plus No No ? No Yes No
FFS No No 8:1 Template:Fn No No No
UFS1 No No 8:1 Template:Fn No No No
UFS2 No No 8:1 Template:Fn No No Yes
LFS No No 8:1 Template:Fn No No No
ext2 No No Template:Fn No Template:Fn No No No
ext3 No No No Template:Fn No No No
ReiserFS Yes No No No No No
Reiser4 Yes No Template:Fn No Yes Yes Template:Fn No
OCFS No No No No Yes No
OCFS2 No No No No Yes No
XFS No No No Yes Yes No
JFS No No Yes No Yes No
QFS No No Yes No No No
Be File System No No No No Yes No
NSS No Yes No No Yes No
NWFS No Yes Yes Template:Fn No No No
ODS-5 No No No No Yes No
VxFS No No ? No Yes No
UDF No No No ? Template:Fn Yes No
Fossil No Yes No No No No
ZFS No Template:Fn Yes ? Yes Template:Fn No Yes
Tail packing Transparent compression Block suballocation Allocate-on-flush Extents Variable block size Template:Fn

Notes

Template:Fnb The Mac OS provides two sets of functions to retrieve file names from a HFS Plus volume, one of them returning the full Unicode names, the other shortened names fitting in the older 31 byte limit to accommodate older applications.
Template:Fnb HFS Plus mandates support for an escape sequence to allow arbitrary Unicode. Users of older software might see the escape sequences instead of the desired characters.
Template:Fnb Varies wildly according to block size and fragmentation of block allocation groups.
Template:Fnb For filesystems that have variable allocation unit (block/cluster) sizes, a range of size are given, indicating the maximum volume sizes for the minimum and the maximum possible allocation unit sizes of the filesystem (e.g. 512 bytes and 128KiB for FAT — which is the cluster size range allowed by the on-disk data structures, although some Installable File System drivers and operating systems do not support cluster sizes larger than 32KiB).
Template:Fnb NTFS access control lists can express essentially any access policy possible using simple POSIX file permissions, but use of a POSIX-like interface is not supported without an add-on such as Services for UNIX or Cygwin.
Template:Fnb The file change logs, last entry change timestamps, and other filesystem metadata, are all part of the extensive suite of auditing capabilities built into NDS/eDirectory called NSure Audit. (Filesystem Events tracked by NSure)
Template:Fnb While FAT32 partitions this large work fine once created, some software won't allow creation of FAT32 partitions larger than 32GiB. This includes, notoriously, the Windows XP installation program. Use FDISK from a Windows ME Emergency Boot Disk to avoid.
Template:Fnb ReiserFS has a theoretical maximum file size of 1EiB, but "page cache limits this to 8 Ti on architectures with 32 bit int"[1]
Template:Fnb XFS has a limitation under Linux 2.4 of 64TiB file size, but Linux 2.4 only supports a maximum block size of 2TiB. This limitation is not present under IRIX.
Template:Fnb Microsoft first introduced FAT32 in Windows 95 OSR2 (OEM Service Release 2) and then later in Windows 98.
Template:Fnb IBM introduced JFS with the initial release of AIX Version 3.1 in 1990. This file system now called JFS1. The new JFS (sometimes called JFS2), on which the Linux port was based, was first shipped in OS/2 Warp Server for e-Business in 1999.
Template:Fnb The on-disk structures have no inherent limit. Particular Installable File System drivers and operating systems may impose limits of their own, however. MS-DOS does not support full pathnames longer than 260 bytes for FAT12 and FAT16. Windows NT does not support full pathnames longer than 32767 bytes for NTFS.
Template:Fnb This is the limit of the on-disk structures. The HPFS Installable File System driver for OS/2 uses the top 5 bits of the volume sector number for its own use, limiting the volume size that it can handle to 64GiB.
Template:Fnb The f-node contains a field for a user identifier. This is not used except by OS/2 Warp Server, however.
Template:Fnb Maximum combined filename/filetype length is 236 bytes; each component has an individual maximum length of 255 byes.
Template:Fnb Maximum pathname length is 4096 bytes, but quoted limits on individual components add up to 1664 bytes.
Template:Fnb Record Management Services (RMS) attributes include record type and size, among many others.
Template:Fnb These are referred to as "aliases".
Template:Fnb Novell calls this feature "multiple data streams". Published specifications say that NWFS allows for 16 attributes and 10 data streams, and NSS allows for unlimited quantities of both.
Template:Fnb Case-sensitivity/Preservation depends on client. Windows, DOS, and OS/2 clients don't see/keep case differences, whereas clients accessing via NFS or AFP may.
Template:Fnb Published specs say that the 128-bit file system provides for up to 264 bytes to describe the file system, file size, directory entries, etc, with a theoretical max of 2128 bytes total to describe all storage on such a machine.
Template:Fnb Particular Installable File System drivers and operating systems may not support extended attributes on FAT12 and FAT16. The OS/2 and Windows NT filesystem drivers for FAT12 and FAT16 support extended attributes (using a "EA DATA. SF" pseudo-file to reserve the clusters allocated to them). Other filesystem drivers for other operating systems do not.
Template:Fnb Some Installable File System drivers and operating systems may not support extended attributes, access control lists or security labels on these filesystems. Linux kernels prior to 2.6.x may either be missing support for these altogether or require a patch.
Template:Fnb Depends on whether the FAT12, FAT16, and FAT32 implementation has support for LFNs. Where it does not, as in OS/2, MS-DOS, Windows 95, Windows 98 in DOS-only mode and the Linux "msdos" driver, file names are limited to 11 8-bit characters (space padded in both the basename and extension parts) and may not contain NUL (end-of-directory marker) or character 229 (deleted-file marker). Short names also do not normally contain lowercase letters.
Template:Fnb These are the restrictions imposed by the on-disk directory entry structures themselves. Particular Installable File System drivers may place restrictions of their own on file and directory names; and particular and operating systems may also place restrictions of their own, across all filesystems. MS-DOS, Microsoft Windows, and OS/2 disallow the characters \ / : ? * " > < | and NUL in file and directory names across all filesystems. Unices and Linux disallow the characters / and NUL in file and directory names across all filesystems.
Template:Fnb In these filesystems the directory entries named "." and ".." have special status. Directory entries with these names are not prohibited, and indeed exist as normal directory entries in the on-disk data structures. However, they are mandatory directory entries, with mandatory values, that are automatically created in each directory when it is created; and directories without them are considered corrupt.
Template:Fnb The "." and ".." directory entries in HPFS that are seen by applications programs are a partial fiction created by the Installable File System drivers. The on-disk data structure for a directory does not contain entries by those names, but instead contains a special "start" entry. Whilst on-disk directory entries by those names are not physically prohibited, they cannot be created in normal operation, and a directory containing such entries is corrupt.
Template:Fnb NSS allows files to have multiple names, in separate namespaces.
Template:Fnb Some file and directory metadata is stored on the Netware server irrespective of whether Directory Services is installed or not, like date/time of creation, file size, purge status, etc; and some file and directory metadata is stored in NDS/eDirectory, like file/object permissions, ownership, etc.
Template:Fnb Particular Installable File System drivers and operating systems may not support case sensitivity for JFS. OS/2 does not, and Linux has a mount option for disabling case sensitivity.
Template:Fnb The local time, timezone/UTC offset, and date are derived from the time settings of the reference/single timesync source in the NDS tree.
Template:Fnb Some operating systems implemented extended attributes as a layer over UFS1 with a parallel backing file (e.g., FreeBSD 4.x).
Template:Fnb Access-control lists and MAC labels are layered on top of extended attributes.
Template:Fnb NTFS 3.0 and higher can create junctions, which allow entire directories (but not individual files) to be mapped to elsewhere in the directory tree of a locally managed drive. These are implemented through reparse points, which allow the normal process of filename resolution to be extended in a flexible manner.
Template:Fnb Although often believed to be case sensitive, HFS Plus normally is not. The typical default installation is case-preserving only. From Mac OS 10.3 on the command newfs_hfs -s will create a case-sensitive new file system. There is another file system by Apple called HFSX, which is a slightly-modified version of HFS Plus to support additional volume properties, which does support case sensitivity. See Apple's File System Comparisons (which hasn't been updated to discuss HFSX) and Technical Note TN1150: HFS Plus Volume Format (which provides a very technical overview of HFS Plus and HFSX).
Template:Fnb While NTFS itself supports case sensitivity, the Windows standard file system drivers cannot create files whose names differ only by case, for compatibility reasons. When a file is opened for writing, if there is any existing file whose name is a case-insensitive match for the new file, the existing file is truncated and opened for writing instead of a new file with a different name being created. An exception is made when using Services for Unix, where the environment will become case-sensitive.
Template:Fnb NTFS stores everything, even the file data, as meta-data, so its log is closer to block journaling.
Template:Fnb UDF and LFS are log-structured file systems and behave as if the entire file system were a journal.
Template:Fnb In "extents" mode.
Template:Fnb Optionally no on IRIX.
Template:Fnb Variable block size refers to systems which support different block sizes on a per-file basis. (This is similar to extents but a slightly different implementational choice.) The current implementation in UFS2 is read-only.
Template:Fnb Each possible size (in sectors) of file tail has a corresponding suballocation block chain in which all the tails of that size are stored. The overhead of managing suballocation block chains is usually less than the amount of block overhead saved by being able to increase the block size but the process is less efficient if there is not much free disk space.
Template:Fnb This restriction might be lifted in newer versions.
Template:Fnb Full block journaling for ReiserFS was added to Linux 2.6.8.
Template:Fnb Other block:fragment size ratios supported; 8:1 is typical and recommended by most implementations.
Template:Fnb Depends on UDF implementation.
Template:Fnb Fragments were planned, but never actually implemented on ext2 and ext3.
Template:Fnb Metadata-only journaling was introduced in the Mac OS 10.2.2 HFS Plus driver; journaling is enabled by default on Mac OS 10.3 and later.
Template:Fnb e2compr, a set of patches providing block-based compression for ext2, has been available since 1997, but has never been merged into the mainline Linux kernel.
Template:Fnb Reiser4 implements data compression, but has not provided an VFS API for it.
Template:Fnb DoubleSpace in DOS 6, and DriveSpace in Windows 95 and Windows 98 were data compression schemes for FAT, but are no longer supported by Microsoft.
Template:Fnb Some namespaces had lower name length limits. "LONG" had an 80-byte limit, "NWFS" 80 bytes, "NFS" 40 bytes and "DOS" imposed 8.3-style names.
Template:Fnb Available only in the "NFS" namespace.
Template:Fnb Metacomco released a so called "evolution" version of original file system for Amiga realizied by engineers of first Amiga Corporation (Formerly Hi-Toro) in 1982-83/85. To be true, Metacomco made a huge mess of early FS ruining its simple and easy structure. Originally OFS was simply Amiga File System. Name changed since the release of the "new" Fast File System, born in 1987 for the same platform.
Template:Fnb This is the limit of the on-disk structures. The NTFS driver for Windows NT limits the volume size that it can handle to 256TiB and the file size to 16TiB respectively.
Template:Fnb ZFS is a transactional filesystem using copy-on-write semantics, guaranteeing an always-consistent on-disk state without the use of a traditional journal. However, it does also implement an intent log to provide better performance when synchronous writes are requested.
Template:Fnb The actual maximum was 8,847,360 bytes, with 7 singly-indirect blocks and 1 doubly-indirect block; PWB/UNIX 1.0's variant had 8 singly-indirect blocks, making the maximum 524,288 bytes or half a MiB.
Template:Fnb The actual maximum was 1,082,201,088 bytes, with 10 direct blocks, 1 singly-indirect block, 1 doubly-indirect block, and 1 triply-indirect block. The 4.0BSD and 4.1BSD versions, and the System V version, used 1024-byte blocks rather than 512-byte blocks, making the maximum 4,311,812,608 bytes or approximately 4 GiB.
Template:Fnb System V Release 4, and some other Unix systems, retrofitted symbolic links to their versions of the Version 7 Unix file system, although the original version didn't support them.
Template:Fnb Solaris "extended attributes" are really full-blown alternate data streams, in both the Solaris UFS and ZFS.
Template:Fnb File permission in 9P are a variation of the traditional Unix permissions with some minor changes, eg. the suid bit is replaced by a new 'exclusive access' bit.
Template:Fnb Off by default.
Template:Fnb Depends on kernel version and arch. For 2.4 kernels the max is 2TB. For 32-bit 2.6 kernels it is 16TB. For 64-bit 2.6 kernels it is 8EB.
Template:Fnb Mac OS Tiger (10.4) and late versions of Panther (10.3) provide file change logging (it's a feature of the file system software, not of the volume format, actually). See fslogger.
Template:Fnb Linux kernel versions 2.6.12 and newer.
Template:Fnb "Soft dependencies" (softdep) in NetBSD, called "soft updates" in FreeBSD provide meta-data consistency at all times without double writes (journaling).
Template:Fnb Due to its use of copy on write, ZFS uses delayed allocation for all writes.
Template:Fnb When enabled, ZFS's logical-block based compression behaves much like tail-packing for the last block of a file.
Template:Fnb MAC/Sensitivity labels in the file system are not out of the question as a future compatible change but aren't part of any available version of ZFS.
Template:Fnb VxFS provides optional feature called 'Storage Checkpoint". It provides advanced file system snapshot.
Template:Fnb While the volume size of HFS+ is almost unlimited, the Mac OS has those limitations: Mac OS 8 & 9: 2 TiB; Mac OS X 10 & 10.1: 2 TiB; Mac OS X 10.2: 8 TiB; Mac OS X 10.3 & 10.4: 16 TiB. Max. file size is slightly smaller than max. volume size (Mac OS 8: max. file size: 2 GiB). Max. number of files (or folders) within a folder: Mac OS 8 & 9: 2^15 (32767), Mac OS X: 2^31, but naturally limited by the max. volume size divided by the block size.
Template:Fnb QFS allows files to exceed the size of disk when used with its integrated HSM, as only part of the file need reside on disk at any one time.

See also

External links

References

  • Jonathan de Boyne Pollard. "Disc and volume size limits". Frequently Given Answers. Retrieved February 9. {{cite web}}: Check date values in: |accessdate= (help); Cite has empty unknown parameter: |1= (help); Unknown parameter |accessyear= ignored (|access-date= suggested) (help)
  • IBM. "OS/2 corrective service fix JR09427". Retrieved February 9. {{cite web}}: Check date values in: |accessdate= (help); Cite has empty unknown parameter: |1= (help); Unknown parameter |accessyear= ignored (|access-date= suggested) (help)
  • "Attribute - $EA_INFORMATION (0xD0)". NTFS Information, Linux-NTFS Project. Retrieved February 9. {{cite web}}: Check date values in: |accessdate= (help); Unknown parameter |accessyear= ignored (|access-date= suggested) (help)
  • "Attribute - $EA (0xE0)". NTFS Information, Linux-NTFS Project. Retrieved February 9. {{cite web}}: Check date values in: |accessdate= (help); Unknown parameter |accessyear= ignored (|access-date= suggested) (help)
  • "Attribute - $STANDARD_INFORMATION (0x10)". NTFS Information, Linux-NTFS Project. Retrieved February 21. {{cite web}}: Check date values in: |accessdate= (help); Unknown parameter |accessyear= ignored (|access-date= suggested) (help)
  • Apple Computer Inc. "Technical Note TN1150: HFS Plus Volume Format". Detailed HFS Plus and HFSX description. Retrieved May 2. {{cite web}}: Check date values in: |accessdate= (help); Unknown parameter |accessyear= ignored (|access-date= suggested) (help)

Further reading