xfsinfo
Display XFS filesystem information
SYNOPSIS
xfsinfo [ -v ] [ -V ] { mount-point | device }
PARAMETERS
-v
Verbose mode. Displays more detailed information about the XFS filesystem, including additional sections like quota parameters, and more in-depth data about allocation groups.
-V
Print version information. Displays the version number of the xfsinfo command and exits.
mount-point
Specifies the mount point (e.g., /mnt/data
) of the XFS filesystem for which information is to be displayed. This is typically a directory where the filesystem is mounted.
device
Specifies the device file (e.g., /dev/sda1
or /dev/mapper/vg0-lv0
) of the XFS filesystem for which information is to be displayed. This can be used for unmounted filesystems.
DESCRIPTION
xfsinfo is a command-line utility used to display detailed information about an XFS filesystem. It provides crucial metadata such as the filesystem's block size, inode size, log size, and comprehensive details about its data, log, and optional realtime sections. This command can be used on either a mounted XFS filesystem by specifying its mount point, or on an unmounted XFS device. It is an invaluable tool for system administrators and users needing to understand the underlying structure, configuration, and parameters of an XFS volume, aiding in diagnostics, verification, or planning. As a read-only operation, xfsinfo ensures no modifications are made to the filesystem.
CAVEATS
xfsinfo can only display information for XFS filesystems; it will return an error or unexpected output on other filesystem types.
When querying an unmounted device, root privileges are typically required for access.
The command provides static filesystem structure information and metadata; for dynamic real-time usage statistics (like free space or inode usage), other tools such as df(1) or xfs_bmap(8) should be used.
OUTPUT DETAILS
The output of xfsinfo is typically structured into several distinct sections, each providing specific details about the XFS filesystem's configuration and layout:
- Data Section: Displays information about the main data area of the filesystem, including its logical and physical block sizes, the number of allocation groups (AGs), and the total number of data blocks.
- Log Section: Provides details regarding the XFS journal log, such as its size, log block size, and whether it's an internal (on the data partition) or external log.
- Realtime Section: If the XFS filesystem was created with a dedicated realtime data area (often used for streaming or multimedia applications), this section provides information on its size, block size, and allocation policies.
- Quota Section (with -v): When the -v (verbose) option is used and filesystem quotas are enabled, this section will display detailed information about user, group, and project quota limits and usage settings.
HISTORY
The xfsinfo command is an integral part of the xfsprogs package, a comprehensive suite of utilities designed for managing the XFS filesystem. XFS was originally developed by SGI (Silicon Graphics, Inc.) for its IRIX operating system and later became a prominent journaling filesystem in the Linux kernel. The xfsprogs utilities, including xfsinfo, have consistently evolved alongside the XFS filesystem itself, gaining new features and improvements to maintain compatibility with the latest XFS versions and Linux kernel advancements.
SEE ALSO
mkfs.xfs(8), xfs_admin(8), xfs_growfs(8), xfs_repair(8), df(1), mount(8)