How to create and use XFS system in Linux system

  
                

The XFS file system is a 64-bit high-performance file system with very powerful features. Originally used in irix systems, how do you create and mount XFS file systems on Linux systems? Let's learn together with Xiaobian.

Question: I heard about a cattle X file system XFS, I am going to try XFS on my disk. What is the Linux command to format and mount the XFS file system?

XFS is a high-performance file system, and SGI is designed for their IRIX platform. Since porting to the Linux kernel in 2001, XFS has become the first choice for many enterprise systems due to its high performance, especially with large amounts of data that require structural scalability and stability. For example, RHEL/CentOS 7 and Oracle Linux use XFS as the default file system, and SUSE/openSUSE has long-term support for XFS.

XFS has many unique performance enhancements that make it stand out from many file systems, such as scalable/parallel IO, metadata logging, hot defragmentation, IO pause/resume, and latency allocation.

If you want to create and mount an XFS file system to your Linux platform, here are the relevant operational commands.

XFS system installation toolset

First, you need to install the XFS system toolset, which allows you to perform many administrative tasks associated with XFS. (eg format, extend, fix, set quotas, change parameters, etc.)

Debian, Ubuntu, Linux Mint system:

$ sudo apt-get install xfsprogs

Fedora, CentOS, RHEL system:

$ sudo yum install xfsprogs

Other versions of Linux:

$ sudo pacman -S xfsprogs

Create XFS format partitions

Prepare a partition to create XFS. Assuming your partition /dev /sdb, as follows:

$ sudo fdisk /dev /sdb

hypothesis partition called /dev /sdb1 created here.

Next, format the partition to XFS, using the mkfs.xfs command. If another file system has been created on this partition, you must override it with the “-f” parameter.

$ sudo mkfs.xfs -f /dev /sdb1

At this point you are ready to mount after formatting the partition. Suppose /storage is the XFS local mount point. Mount with the following command:

$ sudo mount -t xfs /dev/sdb1 /storage

Verify that the XFS mount is successful:

$ df -Th /storage

If you want to automatically mount XFS partition on the startup /storage, add the following line to /etc /fstab:

/dev /sdb1 /storage xfs defaults 0 0

The above is the introduction of the Linux system to create and mount the XFS file system. Since the XFS file system has very high performance, you can try the method described in this article if you want to use it on Linux.

Copyright © Windows knowledge All Rights Reserved