Linux Commands

What Are XFS Mount Options

Linux filesystems are arranged as a large tree and rooted at “/”. The system mounts or attaches the parent directory at “/”. Using the mount command, you can attach the other filesystems to the large tree of files which are rooted at “/”. Similarly, if you want to detach or unmount the filesystem from the root tree, you can use the umount command.

If you want to know the XFS mount options, read this tutorial completely. Here, we will give you a brief walkthrough on the mount options and methods to use them.

What Are XFS Mount Options (Explained)

There are some parameters of the mount command which you can use to mount the XFS file system. Here is the basic syntax of the mount:

mount [options] /dev/device mount point

Let’s take an example of mounting the XFS filesystem in Linux. First, we need to create a directory using the following command:

mkdir /mnt/xfs

The mkdir command creates the /mnt/xfs. Now, it is time to mount the XFS partition through the following mount command:

mount /dev/sda2 /mnt/xfs

If you want to verify the changes, you can check the partitions through the following command:

mount | grep /dev/sda2

In case your system has the filesystem or more than 2 TB, you can use the inode64 option as it is a benchmark mounting:

mount -o inode64 /dev/sda2 /mnt/xfs

Sometimes, XFS contains the write barriers for security. You can use the following command to disable the barrier:

mount -o nobarrier /dev/sda2 /mnt/xfs

Mount Command Options

You place the different flags in the options section to perform various tasks. To know more about mount command options, you can use the following command:

mount -h or mount --help

Here are the brief details about the mount command options that you can use while mounting the XFS file system:

Options Description
-a flag It can mount the filesystem which is mentioned in the fstab.
-c flag It does not canonicalize the paths.
-f flag It performs the dry run.
-F flag It forks off for every device.
-T flag It works as an alternative file to the /etc/fstab.
-i flag It does not call the mount helpers.
-l flag It displays the file system labels.
-n flag It does not write to /etc/mtab.

Conclusion

This article is all about the simple mount options of the XFS file system in Linux. We also explained how the mount works in the XFS filesystem and the different options that are used with the XFS mount. We hope that you get all the essential details about the XFS mount options that you can try.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.