Skip to main content
Engineering LibreTexts

04-D.11.2: File System Management - xfs Tools

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Linux File System Management Tools (continued)

    XFS Tools

    Just as there are command line tools to manage the ext filesystem, there are tools that allow you to work with the XFS file system. Here are a few of them:

    xfs_growfs - this allows you to grow an XFS file system. You need to specify a new size of mount point along with -D switch. -D takes argument number as file system blocks. Without the -D switch, xfs_growfs will grow the filesystem to the maximum available on the specified device.

    xfs_repair - performs a file system consistency check and repair of the filesystem. Running the command with -n switch will only scan and report which modifications need to be done. If you run the command without -n switch, it will modify the file system as necessary to make it clean.

    xfs_db - normally used for examining the XFS file system. The version command used to enable features in the file system. Without any argument, the current version and feature bits are printed.

    pbmac@pbmac-server # umount /home
    pbmac@pbmac-server # xfz_db /dev/xvdf5
    xfz_db> version
    xfz_db> quit

    xfs_info - displays details of the XFS file system like block size and number of blocks which helps you in calculating new block numbers for growing XFS file system.

    xfs_admin - used to change the parameters of an XFS file system, such as the label and/or UUID.

    xfs_metadump - will copy the superblock metadata of the XFS file system to a disk file.

    xfs_copy - used to copy the contents of the XFS file system to another location.

    04-D.11.2: File System Management - xfs Tools is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?