Introduction to xfsprogs

The xfsprogs package contains administration and debugging tools for the XFS file system.

This package is known to build and work properly using an LFS-7.9 platform.

This package is known to build properly using the gcc-6 compiler.

Package Information

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/xfs

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel:

File systems --->
  <*/M> XFS filesystem support [CONFIG_XFS_FS]

Installation of xfsprogs

Install xfsprogs by running the following commands:

make DEBUG=-DNDEBUG     \
     INSTALL_USER=root  \
     INSTALL_GROUP=root \

This package does not come with a test suite.

Now, as the root user:

make PKG_DOC_DIR=/usr/share/doc/xfsprogs-4.7.0 install     &&
make PKG_DOC_DIR=/usr/share/doc/xfsprogs-4.7.0 install-dev &&

rm -rfv /usr/lib/libhandle.a                               &&
rm -rfv /lib/libhandle.{a,la,so}                           &&
ln -sfv ../../lib/libhandle.so.1 /usr/lib/libhandle.so     &&
sed -i "s@libdir='/lib@libdir='/usr/lib@" /usr/lib/libhandle.la

Command Explanations

make DEBUG=-DNDEBUG: Turns off debugging symbols.

INSTALL_USER=root INSTALL_GROUP=root: This sets the owner and group of the installed files.

LOCAL_CONFIGURE_OPTIONS="...": This passes extra configuration options to the configure script. The example --enable-readline parameter enables linking the XFS programs with the libreadline.so library, in order to allow editing interactive commands.

OPTIMIZER="...": Adding this parameter to the end of the make command overrides the default optimization settings.


Installed Programs: fsck.xfs, mkfs.xfs, xfs_admin, xfs_bmap, xfs_copy, xfs_db, xfs_estimate, xfs_freeze, xfs_fsr, xfs_growfs, xfs_info, xfs_io, xfs_logprint, xfs_mdrestore, xfs_metadump, xfs_mkfile, xfs_ncheck, xfs_quota, xfs_repair, and xfs_rtcp
Installed Libraries: libhandle.so
Installed Directories: /usr/include/xfs and /usr/share/doc/xfsprogs-4.7.0

Short Descriptions


simply exits with a zero status, since XFS partitions are checked at mount time.


constructs an XFS file system.


changes the parameters of an XFS file system.


prints block mapping for an XFS file.


copies the contents of an XFS file system to one or more targets in parallel.


for each directory argument, estimates the space that directory would take if it were copied to an XFS filesystem (does not cross mount points).


is used to debug an XFS file system.


suspends access to an XFS file system.


applicable only to XFS filesystems, improves the organization of mounted filesystems, the reorganization algorithm operates on one file at a time, compacting or othewise improving the layout of the file extents (contiguous blocks of file data).


expands an XFS file system.


is equivalent to invoking xfs_growfs, but specifying that no change to the file system is to be made.


is a debugging tool like xfs_db, but is aimed at examining the regular file I/O path rather than the raw XFS volume itself.


prints the log of an XFS file system.


restores an XFS metadump image to a filesystem image.


copies XFS filesystem metadata to a file.


creates an XFS file, padded with zeroes by default.


generates pathnames from inode numbers for an XFS file system.


is a utility for reporting and editing various aspects of filesystem quota.


repairs corrupt or damaged XFS file systems.


copies a file to the real-time partition on an XFS file system.


contains XFS-specific functions that provide a way to perform certain filesystem operations without using a file descriptor to access filesystem objects.

Last updated on 2016-08-07 15:28:55 -0500