XFS (file system)

from Wikipedia, the free encyclopedia
XFS
Manufacturer Silicon Graphics Inc.
Full name XFS
Initial release 1994 ( IRIX v5.3)
Technical implementation
Directories B⁺ tree
Files extent based
Maximum values
Size of a file 8 egg
Number of all files 2 63
Length of the file name 255 bytes
File system size 16 egg
Allowed characters in the file name All bytes except NULL and /
properties
Dates of a file supported
Forks supported
File attributes up to 64 KiB of any binary data per file in the journal
File rights management ACL supported
Transparent compression No
Transparent encryption No
Supporting operating systems IRIX , Linux , FreeBSD

XFS is a journaling file system developed by Silicon Graphics (SGI) for Unix-like operating systems such as Linux . The 64-bit file system developed exclusively for IRIX until the end of 1994 is known for its high speed. Since May 1, 2001, the file system has also been officially open source for Linux version 2.4 and higher . It has been an official part of the kernel since kernel version 2.6 . XFS offers access control lists and as of version 1.0 XFS also supports quotas for both individual users and groups. The proprietary solution CXFS (Cluster XFS) is available for simultaneous and conflict-free access to XFS .

History of XFS

XFS is one of the oldest journaling file systems available for Unix . It is characterized by a mature, largely error-free code base . The development of XFS originally began at SGI ; it was first presented on IRIX in 1994 , where it replaced the Extent File System (EFS) that had been used up until then, from IRIX version 5.3 or 6 . In 2000, XFS was finally licensed under the GPL and first appeared on Linux in 2001 . Almost all of today's Linux distributions include XFS support.

General values ​​and properties

use

The XFS file system can be found in NAS devices , for example , and also in televisions with a USB recording function. XFS is not natively supported by Windows or MacOS .

Special features of XFS

Directory structure

In order to be able to access special files quickly, directory contents are saved in a B⁺ tree with XFS . This slightly increases the latency when outputting a complete directory content, but it reduces the access time to individual files in directories with many file entries.

Maximum file size

XFS is characterized by a complete 64-bit concept. The data structures are designed to store files with a size of up to 8 Exbibytes (2 63 ) on an XFS-formatted data carrier . Today's operating systems do not yet take advantage of these limits. Linux 2.4 supports a maximum file size of 16 Tebibytes (2 44 = 2 12 2 32 ) with a memory page size of 4 Kibibytes (2 12 ) and 64 Tebibytes (2 46 = 2 14 2 32 ) with a memory page size of 16 Kibibytes ( 2 14 ).

journal

The journal kept by XFS is stored serially (there is no storage in complex data structures such as trees or heaps ). The journal can be stored in the areas reserved for this on the corresponding data carrier as well as on external storage media. However, XFS adds transactions on the file system to the journal asynchronously (the file system driver works without blocking ). This allows operations to be carried out faster than on comparable systems, but in the event of a fault (power failure), some entries in the journal may be missing.

A check of the file system following an error, however, will at least restore consistency and fill data areas that could not be written with zeros. This eliminates possible errors due to "residual data".

Special memory allocation

Occupancy groups

Another special feature of XFS are so-called occupation groups ( english allocation group ). These form a separate unit in the XFS system and independently manage both the free memory and inodes . This means that several processes can access a file system at the same time (provided that each process accesses a different allocation group).

Size-based allocation

Information about free memory areas is stored in B⁺-trees , which makes it possible to find suitable memory areas and thus largely avoid fragmentation .

XFS supports block sizes from 512 bytes to 64 Kibibytes . This allows a file system to be created that is adapted to the expected use. Both small and large files can be managed well.

Delayed occupancy

In addition to size-based allocation, XFS also offers a further reduction in possible fragmentation due to delayed allocation. Files are kept in memory for as long as possible before they are written to the data carrier. This increases the probability that the XFS driver can find a suitable memory area and thus avoid fragmentation. However, this increases the risk of data loss, for example due to power outages.

Disadvantages of XFS

The design of XFS also has disadvantages compared to some other file systems: In current implementations, it is not possible to shrink an XFS file system. Once deleted, files cannot be recovered. Due to the delayed writing of data, data losses in currently open files in the event of a system crash (e.g. power failure) may be greater than with other file systems (see section: Delayed allocation ) .

The journal is optimized for high performance and is therefore architecture-dependent: If the processor architecture is changed (e.g. from IA-32 to x64 ), the journal must also be xfs_repairemptied before the file system is mounted .

See also

Web links

Individual evidence

  1. Thorsten Leemhuis: The innovations of Linux 4.9. In: Heise online . October 17, 2016 (update). Retrieved February 6, 2017.