Changing XFS File System Feature Options

Use the xfs_admin command to update or change XFS file system features on an unmounted device.

The xfs_admin command can change feature options on an unmounted XFS file system. For example, you can:

  • Enable or disable lazy counters

  • Enable or disable other feature options such as bigtime and inobtcount.

  • Change the file system UUID

  • Change the file system label

For more information, see the mkfs_admin(8) manual page.

Note:

You can't change a mounted XFS file system.

  • View and apply a new label to the file system.

    To display the existing label, run:

    sudo xfs_admin -l /dev/sdb

    To apply a new label, run:

    sudo xfs_admin -L "VideoRecords" /dev/sdb

    Note:

    The label can be a maximum of 12 characters in length.

  • View, generate, or clear the UUID of the file system.

    To display the existing UUID, run:

    sudo xfs_admin -u /dev/sdb

    To generate a new UUID, run:

    sudo xfs_admin -U generate /dev/sdb

    To clear the UUID altogether, run:

    sudo xfs_admin -U nil /dev/sdb
  • Disable or enable lazy counters.

    To disable lazy counters, run:

    sudo xfs_admin -c 0 /dev/sdb

    To enable lazy counters, run:

    sudo xfs_admin -c 1 /dev/sdb
  • Enable bigtime or inobtcount.

    These features are disabled by default on Oracle Linux 8, because the functionality isn't available for RHCK and UEK R6. To use these features, upgrade to the latest UEK R7. Note that you can't mount the file system on earlier kernels after you perform this operation.

    To enable bigtime on a file system formatted without this option, run:
    sudo xfs_admin -O bigtime=1 /dev/sdb
    To enable inobtcount on a file system formatted without this option, run:
    sudo xfs_admin -O inobtcount=1 /dev/sdb