XFS development was started in 1993 by Silicon Graphics Inc. and released the following year on their IRIX operating system. It is a high performance 64-bit journaling file system, excelling in parallel input/output operations. The maximum supported data volume size is 16EB and a maximum file size of 8EB.
In 2000 XFS was released under the GNU General Public License (GPL) and ported for the Linux operating system, and released the following year. In 2014 Redhat Linux started using XFS as the default file system, including support as the boot partition. The specifications have been released, the details of which can be utilised for the purposes of XFS data recovery, to overcome a variety of file system problems.
Features of XFS Data Volumes
As is now common, XFS uses journaling to enable the recovery of all system metadata following a crash or power failure. XFS introduced 64 bit date times extending the Unix date range beyond 2038, along with nanosecond resolution, rather than the traditional 1 second resolution of UFS.
A unique feature of XFS is the pre-allocation of I/O bandwidth at a pre-determined rate. This is suitable for many real-time applications. This feature is however, only supported on IRIX using specialised hardware.
XFS Data Volume Internals
XFS splits the file system into Allocation Groups (AG) with no pre-defined inodes allocated. All inodes are dynamically allocated, and referenced according to their AG and position within it. The only pre-allocated system structures are the superblocks, a copy in each AG, and the data block usage bitmaps. This avoids wasting space for a file system containing only a small number of files, but conversely does not place an arbitrary limitation on the number of files and directories allowed.
Directories are stored using a BTree, which allows fast and efficient searching and sorting. Files allocation uses extents, these also stored in a BTree, which allows for fast access of any data block; very useful for real time systems.
XFS Data Recovery
While XFS is fairly complex, the specifications are readily available, making the development of data recovery tools relatively simple. The most common reasons for XFS data recovery are due to hardware failure, deletion of the partition, or reformatting the volume.
The metadata structures, allow the file system to be readily scanned during data recovery for lost files and directories, following the loss of important sections of the file system.
When an XFS volume is formatted, only the initial inode allocation (usually 128 entries) including the root directory is overwritten, along with the data block usage bitmaps. This allows data recovery to be performed upon a data volume which has been reformatted, with only minimal data loss, depending upon the amount of data written after the format procedure.