XFS

XFS

Infobox Filesystem
name = XFS
full_name = XFS
developer = Silicon Graphics Inc.
introduction_os = IRIX v5.3
introduction_date = 1994
partition_id =
directory_struct = B+ trees
file_struct = B+ trees
bad_blocks_struct =
max_filename_size = 255 bytes
max_files_no =
max_volume_size = 16 exabytes | max_file_size = 8 exabytes (minus 1 byte)
filename_character_set = All bytes except NULL
dates_recorded = Yes
date_range =
date_resolution = 1ns
forks_streams =
attributes = Yes
file_system_permissions = Yes
compression = No
single_instance_storage = No
encryption = No (provided at the block device level)
OS = IRIX, Linux, FreeBSD (experimental)

XFS is a high-performance journaling file system created by Silicon Graphics, originally for their IRIX operating system and later ported to Linux kernel.

History

XFS is (along with JFS) among the oldest journaling file systems available for UNIX systems, and has a mature, stable and well-debugged codebase.Fact|date=December 2007 Development of XFS was started by Silicon Graphics, in 1993, with first deployment being seen on IRIX 5.3 in 1994. The filesystem was released under the GNU General Public License in May 2000, and ported to Linux, with the first distribution support appearing in 2001/2002. It is available in almost all Linux distributions today, with the notable exception of Red Hat Enterprise Linux. [http://oss.sgi.com/archives/xfs/2005-08/msg00133.html]

XFS has been merged into the mainline Linux 2.4 (as of 2.4.25, when Marcelo Tosatti judged it stable enough) and 2.6 kernels, making it almost universally available on Linux systems. Installation programs for the Arch, SUSE, Gentoo, Mandriva, Fedora, Slackware, Kate OS, Zenwalk, VectorLinux, Ubuntu and Debian Linux distributions all offer XFS as a choice of filesystem. FreeBSD gained read-only support for XFS in December 2005 and in June 2006 experimental write support was introduced; however this is supposed to be used only as an aid in migration from Linux, not to be used as a "main" filesystem.

Specifications

Capacity

XFS is a 64-bit file system. It supports a maximum file system size of 8 exbibytes minus one byte, though this is subject to block limits imposed by the host operating system. On 32-bit Linux systems, this limits the file and file system sizes to 16 terabytes.

Journaling

Journaling is an approach to guaranteeing file system consistency even in presence of power failures or system crashes. XFS provides journaling for file system metadata, where file system updates are first written to a serial journal before the actual disk blocks are updated. The journal is a circular buffer of disk blocks that is never read in normal filesystem operation. The XFS journal is limited to a maximum size of both 64k blocks and 128MB with the minimum size dependent upon a calculation of the filesystem block size and directory block size. Placing the journal on an external device larger than the maximum journal size will cause the extra space to be unused. It can be stored within the data section of the filesystem (an internal log), or on a separate device to minimize disk contention. On XFS the journal contains “logical” entries that describe at a high level what operations are being performed (as opposed to a “physical” journal that stores a copy of the blocks modified during each transaction). Journal updates are performed asynchronously to avoid incurring a performance penalty. In the event of a system crash, operations immediately prior to the crash can be redone using data in the journal, which allows XFS to retain file system consistency. Recovery is performed automatically at file system mount time, and the recovery speed is independent of the size of the file system. Where recently modified data has not been flushed to disk before a system crash, XFS ensures that any unwritten data blocks are zeroed on reboot, obviating any possible security issues arising from residual data (as far as access through the filesystem interface is concerned, as distinct from accessing the raw device or raw hardware). XFS's journaling procedures are similar to the "writeback" level of ext3.

Allocation groups

XFS filesystems are internally partitioned into "allocation groups", which are equally sized linear regions within the file system. Files and directories can span allocation groups. Each allocation group manages its own inodes and free space separately, providing scalability and parallelism — multiple threads and processes can perform I/O operations on the same filesystem simultaneously. This architecture helps to optimise parallel I/O performance on multiprocessor or multicore systems, as metadata updates are also parallelisable. The internal partitioning provided by allocation groups can be especially beneficial when the file systems spans multiple physical devices, allowing for optimal usage of bandwidth of the underlying storage components.

Striped allocation

If an XFS filesystem is to be created on a striped RAID array, a "stripe unit" can be specified when the file system is created. This maximises throughput by ensuring that data allocations, inode allocations and the internal log (journal) are aligned with the stripe unit.

Extent based allocation

Blocks used in files stored on XFS filesystems are managed with variable length extents where one extent describes one or more contiguous blocks. This can shorten the list considerably compared to file systems that list all blocks used by a file individually. Also many file systems manage space allocation with one or more block oriented bitmaps — in XFS these structures are replaced with an extent oriented structure consisting of a pair of B+ trees for each filesystem allocation group (AG). One of the B+ trees is indexed by the length of the free extents, while the other is indexed by the starting block of the free extents. This dual indexing scheme allows for highly efficient location of free extents for file system operations.

Variable block sizes

The file system block size represents the minimum allocation unit. XFS allows file systems to be created with block sizes ranging between 512 bytes and 64 kilobytes, allowing the file system to be tuned for the expected use. Where a large amount of small files is to be expected, a small block size would typically be used to maximize capacity, but for a system dealing mainly with large files, a larger block size can provide a performance advantage.

Delayed allocation

XFS makes use of lazy evaluation techniques for file allocation. When a file is written to the buffer cache, rather than allocating extents for the data, XFS simply reserves the appropriate number of file system blocks for the data held in memory. The actual block allocation occurs only when the data is finally flushed to disk. This improves the chance that the file will be written in a contiguous group of blocks, reducing fragmentation problems and increasing performance.

Sparse files

XFS provides a 64-bit sparse address space for each file, which allows both for very large file sizes, and for "holes" within files for which no disk space is allocated. As the file system uses an extent map for each file, the file allocation map size is kept small. Where the size of the allocation map is too large for it to be stored within the inode, the map is moved into a B+ tree which allows for rapid access to data anywhere in the 64-bit address space provided for the file.

Extended attributes

XFS provides multiple data streams for files through its implementation of extended attributes. These allow the storage of a number of name/value pairs attached to a file. Names are null-terminated printable character strings of up to 256 bytes in length, while their associated values can contain up to 64 KiB of binary data. They are further subdivided into two namespaces, root and user. Extended attributes stored in the root namespace can be modified only by the superuser, while attributes in the user namespace can be modified by any user with permission to write to the file. Extended attributes can be attached to any kind of XFS inode, including symbolic links, device nodes, directories, etc. The attr program can be used to manipulate extended attributes from the command line, and the xfsdump and xfsrestore utilities are aware of them and will back up and restore their contents. Most other backup systems are not aware of extended attributes.

Direct I/O

For applications requiring high throughput to disk, XFS provides a direct I/O implementation that allows non-cached I/O directly to userspace. Data is transferred between the application's buffer and the disk using DMA, which allows access to the full I/O bandwidth of the underlying disk devices.

Guaranteed rate I/O

The XFS guaranteed rate I/O system provides an API that allows applications to reserve bandwidth to the filesystem. XFS will dynamically calculate the performance available from the underlying storage devices, and will reserve bandwidth sufficient to meet the requested performance for a specified time. This feature is unique to the XFS file system. Guarantees can be "hard" or "soft", representing a trade off between reliability and performance, though XFS will only allow "hard" guarantees if the underlying storage subsystem supports it. This facility is most used by real-time applications, such as video-streaming.

DMAPI

XFS implements the DMAPI interface to support Hierarchical Storage Management. While this functionality has been ported to the Linux implementations of XFS, it is not yet a part of the mainline Linux kernel source.

Snapshots

XFS does not provide direct support for snapshots, as it expects the snapshot process to be implemented by the volume manager. Taking a snapshot of an XFS filesystem involves freezing I/O to the filesystem using the xfs_freeze utility, having the volume manager perform the actual snapshot, and then unfreezing I/O to resume normal operations. The snapshot can then be mounted read-only for backup purposes. XFS releases on IRIX incorporated an integrated volume manager called XLV. This volume manager has not been ported to Linux. In recent Linux kernels, the xfs_freeze functionality is implemented in the VFS layer, and happens automatically when the Volume Manager's snapshot functionality is invoked.

Online defragmentation

Although the extent based nature of XFS and the delayed allocation strategy it uses significantly improves the file system's resistance to fragmentation problems, XFS provides a filesystem defragmentation utility (xfs_fsr, short for XFS filesystem reorganizer) that can defragment a mounted and active XFS filesystem.

Online resizing

XFS provides the xfs_growfs utility to perform online resizing of XFS file systems. XFS filesystems can be grown provided there is remaining unallocated space on the device holding the filesystem. This feature is typically used in conjunction with volume management, as otherwise the partition holding the filesystem will need enlarging separately.

Native backup/restore utilities

XFS provides the xfsdump and xfsrestore utilities to aid in backup of data held on XFS file systems. The xfsdump utility backs up an XFS filesystem in inode order, and in contrast to traditional UNIX file systems which must be unmounted before dumping to guarantee a consistent dump image, XFS file systems can be dumped while the file system is in use. XFS dumps and restores are also resumable, and can be interrupted without difficulty. The multi-threaded operation of xfsdump provides high performance of backup operations by splitting the dump into multiple streams, which can be sent to different dump destinations. The multi stream capabilities have not been fully ported to Linux yet, however.

Disadvantages

* There is no undelete utility for XFS
* An XFS file system cannot be shrunk
* Creation and deletion of directory entries is a much slower metadata operation than other file systems. cite web|url = http://everything2.com/index.pl?node_id=1479435|author=Simon Kongshøj|title = Filesystem performance tweaking with XFS on Linux
* Failure-handling policies can be improved [http://pages.cs.wisc.edu/~vshree/xfs.pdf]
* The use of XFS file systems on LVM2 logical volumes can cause system freezes under Linux based operating systems if the kernel is compiled with option CONFIG_4KSTACKS enabled [http://www.noogies.org/node/3] . This happens when the system is under high disk I/O and require more than 4kB of thread stack.

See also

* List of file systems
* Comparison of file systems
* CXFS, the clustered form of XFS

External links

* [http://oss.sgi.com/projects/xfs/ XFS: A high-performance journaling filesystem]
* [http://www-106.ibm.com/developerworks/linux/library/l-fs9.html Advanced filesystem implementor's guide - Introducing XFS]
* [http://www-106.ibm.com/developerworks/linux/library/l-fs10.html Advanced filesystem implementor's guide - Deploying XFS]
* [http://madpenguin.org/cms/?m=show&opt=printable&id=6045 File System Design part 1: XFS] by Narayan Newton on madpenguin.org

Sources

* [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=bks&srch=&fname=/SGI_Admin/LX_XFS_AG/sgi_html/ch01.html XFS for Linux Administration (SGI Document Number: 007-4273-003)]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • XFS — Desarrollador(a) Silicon Graphics Nombre completo XFS Introducido 1994 (IRIX v5.3) Identificador de la partición Estructuras Contenido del directorio …   Wikipedia Español

  • XFS — XFS  высокопроизводительная журналируемая файловая система, созданная компанией Silicon Graphics для собственной операционной системы IRIX. 1 мая 2001 года Silicon Graphics выпустила XFS под GNU General Public License. XFS отличается от …   Википедия

  • Xfs — steht für: XFS (Dateisystem), ein von der Firma Silicon Graphics entwickeltes Journaling Dateisystem für UNIX basierte Betriebssysteme X font server, Bestandteil des X Window Systems, der grafischen Oberfläche für UNIX und Linux Extension for… …   Deutsch Wikipedia

  • XFS — steht für: XFS (Dateisystem), ein von der Firma Silicon Graphics entwickeltes Journaling Dateisystem für UNIX basierte Betriebssysteme X font server, Bestandteil des X Window Systems, der grafischen Oberfläche für UNIX und Linux Extension for… …   Deutsch Wikipedia

  • XFS — est un système de fichiers 64 bit journalisé de haute performance créé par SGI pour son système d exploitation IRIX. En mai 2000, SGI place XFS sous la licence GPL. XFS est inclus par défaut avec les versions du noyau Linux 2.5.xx et 2.6.xx, mais …   Wikipédia en Français

  • XFS — es un sistema de archivos con journaling de alto rendimiento creado por SGI (antiguamente Silicon Graphics Inc.) para su implementación de UNIX llamada IRIX. En mayo del 2000, SGI liberó XFS bajo una licencia de código abierto. Sus… …   Enciclopedia Universal

  • XFS — ● 1. ►en n. m. ►GESTFICH eXtended FileSystem (?). Système de gestion de fichier (voir SGF) journalisé conçu par Silicon Graphics, pour ses systèmes Irix. XFS est un système 64 bits sachant gérer de très gros fichiers (jusqu à 1 To) avec un taux d …   Dictionnaire d'informatique francophone

  • XFS (Dateisystem) — XFS Hersteller Silicon Graphics Inc. Vollständige Bezeichnung XFS Erstveröffentlichung 1994 (IRIX v5.3) Technische Umsetzung Verzeichnisse B⁺ Baum Dateien extent …   Deutsch Wikipedia

  • XFS (Netzwerk-Dateisystem) — xFS ist ein verteiltes und dezentrales Netzwerk Dateisystem der Berkeley Universität von Kalifornien. Dieses Dateisystem befindet sich seit 1993 in der Entwicklung. Die Abkürzung steht für x File System. Da sich die Entwickler über keinen Namen… …   Deutsch Wikipedia

  • xFS (Netzwerk-Dateisystem) — xFS ist ein verteiltes und dezentrales Netzwerk Dateisystem der Berkeley Universität von Kalifornien. Dieses Dateisystem befindet sich seit 1993 in der Entwicklung. Die Abkürzung steht für x File System. Da sich die Entwickler über keinen Namen… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”