XFS

From LQWiki
Jump to navigation Jump to search

XFS is a journaling filesystem originally developed by SGI for their IRIX operating system. It supports things like extended attributes and ACL, quotas, B+ trees to speed up file lookup in large dirs, fully 64bits filesystem, so supports extremely large partitIons and files.

The theoretical partition and file size is 9 exabyte. But when run on a 32 bit platform, it is limited due to the Linux kernel block layer implementation to 16 terabyte.

Available in the Linux kernel as of version 2.6 and as an external patch for 2.4 kernels.

It also has the option of a realtime sub-volume (still an experimental feature in the linux version). Meaning a special part on the filesystem for data which needs near realtime responses (like when editing large video/multimedia data). The size of these sub-volumes is is currently limited to a maximum of 4 gigabytes.

Usage

An XFS filesystem is created by the mkfs.xfs command, simplest use is just:

# mkfs.xfs /dev/hdXX

Where XX is some existing device/partition. But mkfs accepts many tweak options like enabling realtime partition,block sizes, label and the position of the log (can be on a seperate device)

An XFS filesystem can be managed by a set of tools (xfs_*, usually available in a package named xfsprogs in your distribution), the most important/useful are:

  • xfs_admin -- change certain parameters like the label and UUID
  • xfs_check -- scan XFS filesystem for errors, kind of like fsck for XFS
  • xfs_copy -- copy or clone XFS filesystem
  • xfs_growfs -- expand an existing XFS partition
  • xfs_repair -- repair a damaged XFS partition
  • xfs_rtcp -- copy a file to a realtime partition on a XFS filesystem

External links


This article is a stub and needs to be finished. Plunge forward and help it grow !