Use XFS File System on RedHatEnterpriseLinux5.5

Source: Internet
Author: User
Tags rpmbuild
To use the xfs File System on RedHatEnterpriseLinux5.5, some software packages of centos 5.5 must be used. For example, kmod-xfs is used to add the xfs. ko module, so that the 5.5 kernel supports the xfs file system. My kernel is compiled by myself, so xfs has been compiled in the kernel and does not need the kmod-xfs package. The detailed steps are as follows: download the required software package: wgetft

To use the xfs File System on Red Hat Enterprise Linux 5.5, some software packages of CentOS 5.5 must be used. For example, kmod-xfs is used to add the xfs. ko module, so that the 5.5 kernel supports the xfs file system. My kernel is compiled by myself, so xfs has been compiled in the kernel and does not need the kmod-xfs package.

The detailed steps are as follows:

Wget ftp://ftp.chg.ru/pub/Linux/CentOS/5.4/extras/SRPMS/xfsprogs-2.9.4-1.el5.centos.src.rpm
Wget http://rpm.pbone.net/index.php3/stat/26/dist/43/size/586492/name/xfsdump-2.2.46-1.el5.centos.src.rpm
Wget ftp://ftp.chg.ru/pub/Linux/CentOS/5.4/extras/SRPMS/dmapi-2.2.8-1.el5.centos.src.rpm
Rpm-ivh xfsprogs-2.9.4-1.el5.centos.src.rpm
Rpm-ivh xfsdump-2.2.46-1.el5.centos.src.rpm
Rpm-ivh dmapi-2.2.8-1.el5.centos.src.rpm

Compile:
Rpmbuild-ba/usr/src/RedHat/SPECS/xfsprogs. spec
Rpmbuild-ba/usr/src/redhat/SPECS/xfsdump. spec
Rpmbuild-ba/usr/src/redhat/SPECS/dmapi. spec

Installation:
Rpm-ivh/usr/src/redhat/RPMS/x86_64/xfsprogs-2.9.4-1.x86_64.rpm
Rpm-ivh/usr/src/redhat/RPMS/x86_64/xfsprogs-devel-2.9.4-1.x86_64.rpm
Rpm-ivh/usr/src/redhat/RPMS/x86_64/dmapi-2.2.8-1.x86_64.rpm
Rpm-ivh/usr/src/redhat/RPMS/x86_64/dmapi-devel-2.2.8-1.x86_64.rpm
Rpm-ivh/usr/src/redhat/RPMS/x86_64/xfsdump-2.2.46-1.x86_64.rpm

There will be mkfs. xfs fsck. xfs xfsdump xfsrestore commands

Format the hard disk:

Mkfs. xfs-f-d agcount = 4-l size = 128 m-I size = 512/dev/vg_root/lv_www

-I: The default value is 256.
-The default value of l is 10 m.
Agcount is automatically allocated by default.
-L lazy-count = value
This changes the method of logging various persistent counters in the superblock. under metadata intensive workloads, these counters are updated and logged frequently enough that the superblock updates become a serialisation point in the filesystem. the value can be either 0 or 1.
With lazy-count = 1, the superblock is not modified or logged on every change of the persis-tent counters. instead, enough information is kept in other parts of the filesystem to be able to maintain the persistent counter values without needed to keep them in the superblock. this gives significant improvements in performance on some deployments. the default value is 0 (off) so you must specify lazy-count = 1 if you want to make use of this feature.

Modify/etc/fstab

/Dev/vg_root/lv_www/www xfs defaults, nobarrier, logbufs = 8, logbsize = 32 k 1 2
Nobarrier
Many hardware RAID have a persistent write cache which preserves it has SS power failure, interface resets, system crashes, etc. using write barriers in this instance is not recommended and will in fact lower performance. therefore, it is recommended to turn off the barrier support and mount the filesystem with "nobarrier ". but take care about the hard disk write cache, which shoshould be off.
Logbufs = value
Set the number of in-memory log buffers. valid numbers range from 2-8 random Sive. the default value is 8 buffers for filesystems with a blocksize of 64 K, 4 buffers for filesystems with a blocksize of 32 K, 3 buffers for filesystems with a blocksize of 16 K, and 2 buffers for all other invocations. increasing the number of buffers may increase performance on some workloads at the cost of the memory used for the additional log buffers and their associated control structures.
Logbsize = value
Set the size of each in-memory log buffer. valid sizes are 16384 (16 K) and 32768 (32 K ). the default value for machines with more than 32 MB of memory is 32768, machines with less memory use 16384 by default.

Related Article

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.