Article Title: How to Use the XFS File System in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
XfS file system is an advanced Log File System developed by SGI. XFS is highly scalable and robust. Fortunately, SGI transplanted it to the Linux system. In linux. The latest XFS file system available in the current version is version 1.2, which can work well under the 2.4 core.
1. Introduction to XFS File System
The main features include the following:
Data Integrity
When XFS file system is used, when unexpected downtime occurs, first of all, because the file system has enabled the log function, the files on your disk will not be damaged by unexpected downtime. Regardless of the number of files and data stored in the file system, the file system can quickly restore the disk file content according to the recorded logs.
Transmission features
The XFS file system adopts an optimization algorithm. log records have little impact on file operations. XFS queries and allocates storage space very quickly. The xfs file system continuously provides fast response time. I have tested the XFS, JFS, Ext3, and ReiserFS file systems, and the XFS file system has outstanding performance.
Scalability
XFS is a fully 64-bit file system that supports storage of millions of T bytes. The support for ultra-large files and small-sized files is outstanding, and supports ultra-large directories. The maximum supported file size is 263 = 9x1018 = 9 exabytes, and the maximum file system size is 18 exabytes.
XFS uses a high table structure (B + tree) to ensure that the file system can quickly search for and quickly allocate space. XFS provides continuous high-speed operations, and the file system performance is not limited by the number of directories and files in the directory.
Transmission bandwidth
XFS can store data close to bare device I/O performance. In the test of a single file system, the throughput can reach up to 7 GB per second. For read/write operations on a single file, the throughput can reach 4 GB per second.
Ii. Use of XFS File System
1. Download and compile the kernel
Download the corresponding version of the kernel patch, decompress the patch package, and patch the system core
Ftp://oss.sgi.com/projects/xfs/d... 4.18-all.patch.bz2
Install patches on the core, download and unzip, and get a file: xfs-1.1-2.4.18-all.patch file.
Fix the core as follows:
# Cd/usr/src/linux
# Patch-p1 </path/to/xfs-1.1-2.4.18-all.patch
After the patch is completed, the next step is to compile the core, and compile XFS into the Linux core.
First, run the following command to select the core supporting XFS File System:
# Make menuconfig
In the file system menu, select:
<*> Sgi xfs filesystem support # Note: The XFS File System support is compiled into the core or sgi xfs filesystem support # Note: The XFS file system is supported by Dynamic Loading modules.
There are two other options:
Enable xfs dmapi # Description: disk management API, used by storage management applications
Enable XFS Quota # Description: You can use Quota to manage the disk space used by users.
After completing the preceding steps, exit and save the core selection configuration.
Then, compile the kernel and install the core:
# Make bzImage
# Make module
# Make module_install
# Make install
If you are not patient or unsure about the complex and tedious work, you can download the core of the patch from the SGI website. The version is 2.4.18. It is an rpm software package. You only need to install it easily. There are two core SGI submissions for smp and single-processor machines.
2. Create an XFS File System
After compiling the core, you should also download the supporting XFSprogs tool package, that is, mkfs. xfs. Otherwise, the partition format cannot be completed: you cannot format a partition into the XFS file system format. Package name to download: xfsprogs-2.0.3.
Decompress and install the downloaded XFSProgs tool. mkfs. xfs is automatically installed in the/sbin directory.
# Tar? Xvf xfsprogs-2.0.3.src.tar.gz
# Cd xfsprogs-2.0.3src
#./Configure
# Make
# Make install
[1] [2] Next page