热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

RedHatEnterpriseLinux5.5上使用XFS文件系统

要在RedHatEnterpriseLinux5.5上使用xfs文件系统,必须借助CentOS5.5对于版本的一些软件包。比如kmod-xfs,这个软件包是用来添加xfs.ko这个模块,使5.5内核支持xfs文件系统。我的内核是自己编译的,所以xfs已经编译在内核中,不需要kmod-xfs这个软件包。废话不说了,详细步骤如下,下载需要软件包:wgetft

要在Red Hat Enterprise Linux 5.5上使用xfs 文件系统,必须借助CentOS 5.5 对于版本的一些软件包。比如kmod-xfs,这个软件包是用来添加xfs.ko这个模块,使 5.5内核支持xfs 文件系统。我的内核是自己编译的,所以xfs已经编译在内核中,不需要kmod-xfs 这个软件包。

废话不说了,详细步骤如下,下载需要软件包:

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

编译:
rpmbuild -ba /usr/src/RedHat/SPECS/xfsprogs.spec
rpmbuild -ba /usr/src/redhat/SPECS/xfsdump.spec
rpmbuild -ba /usr/src/redhat/SPECS/dmapi.spec

安装:
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

就会有 mkfs.xfs fsck.xfs xfsdump xfsrestore 这两个命令

然后格式化硬盘:

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

-i 默认值为 256
-l 的默认值为 10m
agcount 默认自动分配
-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 configurations.  The default  value  is  0 (off) so you must specify lazy-count=1 if you want to make use of this feature.

修改/etc/fstab

/dev/vg_root/lv_www  /www xfs defaults,nobarrier,logbufs=8,logbsize=32k        1 2
nobarrier
Many hardware RAID have a persistent write cache which preserves it across 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 should be off.
logbufs=value
Set  the number of in-memory log buffers.  Valid numbers range from 2-8 inclusive.  The default value is 8 buffers for filesystems with a blocksize of 64K, 4 buffers for filesystems with a blocksize of 32K,  3 buffers for filesystems with a blocksize of 16K, and 2 buffers for all other configurations.  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 (16K) and 32768 (32K).  The default value for machines with more than 32MB of memory is 32768,  machines  with  less  memory  use  16384  by default.


推荐阅读
  • CentOS 7部署KVM虚拟化环境之一架构介绍
    本文介绍了CentOS 7部署KVM虚拟化环境的架构,详细解释了虚拟化技术的概念和原理,包括全虚拟化和半虚拟化。同时介绍了虚拟机的概念和虚拟化软件的作用。 ... [详细]
  • CEPH LIO iSCSI Gateway及其使用参考文档
    本文介绍了CEPH LIO iSCSI Gateway以及使用该网关的参考文档,包括Ceph Block Device、CEPH ISCSI GATEWAY、USING AN ISCSI GATEWAY等。同时提供了多个参考链接,详细介绍了CEPH LIO iSCSI Gateway的配置和使用方法。 ... [详细]
  • Nginx使用AWStats日志分析的步骤及注意事项
    本文介绍了在Centos7操作系统上使用Nginx和AWStats进行日志分析的步骤和注意事项。通过AWStats可以统计网站的访问量、IP地址、操作系统、浏览器等信息,并提供精确到每月、每日、每小时的数据。在部署AWStats之前需要确认服务器上已经安装了Perl环境,并进行DNS解析。 ... [详细]
  • 本文介绍了使用CentOS7.0 U盘刻录工具进行安装的详细步骤,包括使用USBWriter工具刻录ISO文件到USB驱动器、格式化USB磁盘、设置启动顺序等。通过本文的指导,用户可以轻松地使用U盘安装CentOS7.0操作系统。 ... [详细]
  • Linux服务器密码过期策略、登录次数限制、私钥登录等配置方法
    本文介绍了在Linux服务器上进行密码过期策略、登录次数限制、私钥登录等配置的方法。通过修改配置文件中的参数,可以设置密码的有效期、最小间隔时间、最小长度,并在密码过期前进行提示。同时还介绍了如何进行公钥登录和修改默认账户用户名的操作。详细步骤和注意事项可参考本文内容。 ... [详细]
  • 成功安装Sabayon Linux在thinkpad X60上的经验分享
    本文分享了作者在国庆期间在thinkpad X60上成功安装Sabayon Linux的经验。通过修改CHOST和执行emerge命令,作者顺利完成了安装过程。Sabayon Linux是一个基于Gentoo Linux的发行版,可以将电脑快速转变为一个功能强大的系统。除了作为一个live DVD使用外,Sabayon Linux还可以被安装在硬盘上,方便用户使用。 ... [详细]
  • CentOS 6.5安装VMware Tools及共享文件夹显示问题解决方法
    本文介绍了在CentOS 6.5上安装VMware Tools及解决共享文件夹显示问题的方法。包括清空CD/DVD使用的ISO镜像文件、创建挂载目录、改变光驱设备的读写权限等步骤。最后给出了拷贝解压VMware Tools的操作。 ... [详细]
  • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
  • 本文介绍了在Linux系统中设置文件ACL权限的方法和使用说明,包括在centos7.3和centos6.9中开启ACL权限的两种方法:在挂载时指定打开ACL权限和修改默认的属性信息。同时提供了对ACL权限的详细解释和应用场景。 ... [详细]
  • 本文介绍了在CentOS 6.4系统中更新源地址的方法,包括备份现有源文件、下载163源、修改文件名、更新列表和系统,并提供了相应的命令。 ... [详细]
  • Vagrant虚拟化工具的安装和使用教程
    本文介绍了Vagrant虚拟化工具的安装和使用教程。首先介绍了安装virtualBox和Vagrant的步骤。然后详细说明了Vagrant的安装和使用方法,包括如何检查安装是否成功。最后介绍了下载虚拟机镜像的步骤,以及Vagrant镜像网站的相关信息。 ... [详细]
  • Linux下安装依赖包版本高解决方法
    本文介绍了在Linux系统下,当已安装的依赖包版本高于需要安装的依赖包版本时,解决方法包括欺骗安装程序和修改相关配置文件等操作。针对不同情况,提供了不同的解决方案。 ... [详细]
  • centos安装Mysql的方法及步骤详解
    本文介绍了centos安装Mysql的两种方式:rpm方式和绿色方式安装,详细介绍了安装所需的软件包以及安装过程中的注意事项,包括检查是否安装成功的方法。通过本文,读者可以了解到在centos系统上如何正确安装Mysql。 ... [详细]
  • Centos下安装memcached+memcached教程
    本文介绍了在Centos下安装memcached和使用memcached的教程,详细解释了memcached的工作原理,包括缓存数据和对象、减少数据库读取次数、提高网站速度等。同时,还对memcached的快速和高效率进行了解释,与传统的文件型数据库相比,memcached作为一个内存型数据库,具有更高的读取速度。 ... [详细]
  • Centos7搭建ELK(Elasticsearch、Logstash、Kibana)教程及注意事项
    本文介绍了在Centos7上搭建ELK(Elasticsearch、Logstash、Kibana)的详细步骤,包括下载安装包、安装Elasticsearch、创建用户、修改配置文件等。同时提供了使用华为镜像站下载安装包的方法,并强调了保证版本一致的重要性。 ... [详细]
author-avatar
卢军好2602912493
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有