Install XFS File System in RedhatEnterpriseLinux5

Source: Internet
Author: User
XFS is a file system developed by SGI. It has many advantages over other file systems, such as scalability (supporting the largest file and partition), performance, quick recovery, and a valid log structure. The earliest file system embedded in Linux was Ext2 and later Ext3, and Ext4 will be available in the future. Due to the various features of xfs and many customer groups, many Linux releases also began to support Xfs embedded, for example, SUSE/Knoppix/DebianLi XFS is a file system developed by SGI, which has many advantages over other file systems, such as scalability (supporting the largest file and partition), performance, quick recovery, and a valid log structure. The earliest file system embedded in Linux was Ext2 and later Ext3, and Ext4 will be available in the future. Due to the various features of xfs and many customer groups, many Linux releases also began to support Xfs embedded, for example, SUSE/Knoppix/Debian Linux, but Currently RedHat is not embedded with xfs due to technical support and other reasons, so if we want to use xfs file system, we must manually add it. The following is an example of Xfs installation on RHEL5.
 
The system is configured as RHEL5, 64-bit, and Kernel 2.6.18-8. el5. The steps are as follows. At the beginning, it mainly involves some preparation work, such as installing the RHEL5 kernel source code, rpmbuild tool, and gcc compilation tool.
 
1) install the kernel source code of RHEL5, and install the corresponding devel RPM package on the CD. Find the package and run the following command:
[Root @ localhost Server] # rpm-ivh kernel-devel-2.6.18-8.el5.x86_64.rpm
[Root @ localhost Server] # rpm-ivh kernel-xen-devel-2.6.18-8.el5.x86_64.rpm
 
2) install the rpmbuild RPM toolkit and find the corresponding files on the installation disk. Due to the dependency, you also need to install the other two RPM packages.
[Root @ localhost Server] # rpm-ivh elfutils-libs-0.125-3.el5.x86_64.rpm
[Root @ localhost Server] # rpm-ivh elfutils-0.125-3.el5.x86_64.rpm
[Root @ localhost Server] # rpm-ivh rpm-build-4.4.2-37.el5.x86_64.rpm
Then the rpmbuild tool is successfully installed. You can use man rpmbuild to check how to use it.
 
3) install the gcc compilation tool. The corresponding RPM package can also be found on the installation disk. Due to the dependency, you also need to install other corresponding RPM packages. The related commands are as follows.
[Root @ localhost Server] # rpm-ivh glibc-headers-2.5-12.x86_64.rpm
[Root @ localhost Server] # rpm-ivh glibc-devel-2.5-12.x86_64.rpm
[Root @ localhost Server] # rpm-ivh libgomp-4.1.1-52.el5.x86_64.rpm
[Root @ localhost Server] # rpm-ivh gcc-4.1.1-52.el5.x86_64.rpm
The preparation is complete. The following describes how to install xfs.
 
4) Because RHEL5 does not provide official support for xfs, the corresponding xfs source file package can be downloaded from a third party, it is recommended to http://sandeen.net/rhel5_xfs/download, there is a corresponding kmodsource file package xfs-kmod-0.4-
2.2.6.18 _ 8. el5.src. rpm, and can be compiled in Linux of Different kernel versions, which is very convenient.
 
5) Compile the xfs RPM package. Because my Linux kernel version is the same as this package version, you only need to execute the following command.
[Root @ localhost xfs] # rpmbuild -- rebuild xfs-kmod-0.4-2.2.6.18_8.el5.src.rpm
 
6) after the success, the kmod-xfs-0.4-2.2.6.18_8.el5.x86_64.rpm and kmod-xfs-xen-0.4-2.2.6.18_8.el5.x86_64.rpm package is generated under the/usr/src/redhat/RPMS/x86_64 directory, and the following command is executed to install the xfs kmod package.
[Root @ localhost x86_64] # rpm-ivh kmod-xfs-0.4-2.2.6.18_8.el5.x86_64.rpm
After installation, run the following command to confirm
[Root @ localhost x86_64] # rpm-qa | grep xfs
Xorg-x11-xfs-1.0.2-3.1
Kmod-xfs-0.4-2.2.6.18_8.el5
 
7) Basically, the xfs module file has been installed successfully and can be manually loaded.
# Modprobe xfs
Then you can use lsmod to check that the xfs module has been successfully loaded.
 
8) the last step is to install the xfs management toolkit xfsprogs. Because Redhat does not officially support xfs, you can refer to the existing CentOS package, such as to download the xfsprogs file to the http://mirror.centos.org/centos/5/centosplus/x86_64/RPMS/, and then
Install.
[Root @ localhost xfs] # rpm-ivh xfsprogs-2.9.4-1.el5.centos.x86_64.rpm
 
9) Everything is fine. The xfs management tools include creation, modification, and migration. You can use man mkfs. xfs to check the command. Then use fdisk to create a new partition, such as/dev/sdb1, to create a new xfs file system, mkfs. xfs/dev/sdb1. After mounting, you can use mount/dev/sdb1/mnt.
 
If you need to start the automatic mount file system every time, add it to/etc/fstab. The xfs module automatically loads the file when the system needs to mount the file containing the xfs partition. manual intervention is not required, which is very convenient. Of course, if you are a lazy person, you 'd better configure yum to allow the system to automatically install the corresponding file package, instead of using my step-by-step method :-)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.