The Linux XFS file system was transplanted by the SGI development team to ensure data integrity, transmission characteristics, scalability, and transmission bandwidth of the XFS file system, this greatly enriches the file integrity of the Linux open-source community. We can try to use this special Linux XFS file system.
Use of Linux 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
:
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: Compile the support of the XFS file system into the core
Or
Sgi xfs filesystem support # Description: supports XFS file systems by dynamically 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 a Linux 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
Format the disk as an xfs File System Using mkfs. xfs as follows:
#/Sbin/mkfs. xfs/dev/sda6 # Description: format the partition as an xfs file system. The following content is displayed:
Meta-data =/dev/sda6 isize = 256 agcount = 8, agsize = 128017 blks
Data = bsize = 4096 blocks = 1024135, imaxpct = 25
= Sunit = 0 swidth = 0 blks, unwritten = 0
Naming = version 2 bsize = 4096
Log = internal log bsize = 4096 blocks = 1200
Realtime = none extsz = 65536 blocks = 0, rtextents = 0
When formatting a disk, if mkfs. xfs prompts you That the partition has been formatted as another file system, you can use the-f parameter to forcibly format it:
#/Sbin/mkfs. xfs-f/dev/sda6
3. Load the Linux XFS File System
# Mount-t xfs/dev/sda6/xfs # Where/xfs is a directory under the primary partition.
Finally, to enable automatic loading after the system is started, you should change/etc/fstab so that the system will automatically load the xfs partition after the system is started, instead of manually loading each time.
Note that the current xfs is limited by the linux memory page. In x86 versions, the block size of the file system can only be 4 kb. In addition, the XFS file system can be mounted in different ways, that is, the file system can be loaded in Read mode or read/write mode. This is because when the xfs file system is used as the root file system, read-only loading is required for security purposes. However, this does not allow the Linux XFS file system to be used. The following steps are required for further analysis in the next article.
- Introduction to the use of Linux XFS File System II)
- How to Use the Linux rescue mode
- Ten common linux management errors
- How to configure access for different network segments in Linux
- Summary of Linux shortcut keys