Using XFS file system in Linux environment

  

The XfS file system is an advanced log file system developed by SGI. XFS is very scalable and very robust. Fortunately, SGI ported it to the Lin ux system. In the Linux environment. The latest XFS file system available in the current version is version 1.2, which works well under 2.4 core.

I. Introduction to XFS File System

The main features include the following:

Data Completeness

Using XFS file system, when unexpected 宕After the machine occurs, first of all, because the file system has enabled the logging function, the files on your disk will no longer be accidentally crashed and destroyed. Regardless of the number of files and data stored on the current file system, the file system can quickly recover the contents of the disk file in a short period of time based on the recorded logs.

Transfer Features

The XFS file system uses an optimization algorithm that has minimal impact on overall file operations. XFS queries and allocates storage space very quickly. The xfs file system continuously provides fast response times. I have tested the XFS, JFS, Ext3, and ReiserFS file systems. The performance of the XFS file system is quite outstanding.

Scalability

XFS is a full 64-bit file system that supports millions of Tbytes of storage. Support for mega files and small files is outstanding and supports a very large number of directories. The maximum supported file size is 263 = 9 x 1018 = 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 be quickly searched and quickly allocated. XFS continues to provide high-speed operation, and the performance of the file system is not limited by the number of directories and files in the directory.

Transmission Bandwidth

XFS can store data close to the performance of raw device I/O. In a single file system test, the throughput is up to 7GB per second, and the read and write operations on a single file can reach 4GB per second.

Second, the use of XFS file system

1. Download and compile the kernel

Download the corresponding version of the kernel patch, unzip the patch package, and patch the system core

Download address:

Patch the kernel, download and extract it , get a file: xfs-1.1-2.4.18-all.patch file.

Patch the kernel as follows:

# cd /usr/src/linux

# patch -p1 " /path/to/xfs-1.1-2.4.18- All.patch

After the patching is completed, the next step is to compile the kernel and compile XFS into the Linux kernel.

First run the following command to select the core support XFS file system:

#make menuconfig

In the "File System" menu, select:

"*" SGI XFS filesystem support ##Note: Compile XFS file system support into the kernel

or

SGI XFS filesystem support ##Note: Support XFS in a dynamic load module File System

There are two more options:

Enable XFS DMAPI ## Description: API for disk management, storage management application use

Enable XFS Quota ## Description: Supports Quota to use disk space management for users

After finishing I and above, exit and save the core selection configuration.

After that, compile the kernel and install the kernel:

#make bzImage

#make module

#make module_install

#make Install

If you are impatient or unsure about the complex and cumbersome tasks above, you can download the patched core directly from the SGI site, version 2.4.18. It is a rpm package, you can simply install it. There are two cores submitted by SGI, which are used by smp and single-processor machines.

2. Creating an XFS File System

After completing the compilation of the kernel, you should also download the XFSprogs tool package, the mkfs.xfs tool. Otherwise we can't finish formatting the partition: we can't format a partition into the format of the XFS file system. The name of the package to download: xfsprogs-2.0.3.

Unzip the downloaded XFSProgs tool and install it. mkfs.xfs is automatically installed in the /sbin directory. Using XFS file system in Linux environment

Copyright © Windows knowledge All Rights Reserved