全部博文(293)
分类: LINUX
2009-12-11 08:15:48
一、内核升级,可以到
tar -xzvf linux-2.6.29.3.tar.gz cp reiser4-for-2.6.29.patch.gz linux-2.6.29.3/ cd linux-2.6.29.3 gunzip -c reiser4-for-2.6.29.patch.gz | patch -p1 #安装REISERFS内核补丁,下载地址在后文中 make mrproper make menuconfig #选择让内核支持EXT4,JFS,XFS,REISERFS,如图
make dep make clean make bzImage cp arch/x86_64/boot/bzImage /boot/vmlinuz-2.6.29.3 make modules make modules_install cd /boot mkinitrd initrd-2.6.29.3.img 2.6.29.3 PS:如果编译的内核出现No module mptscsi found for kernel 2.6.29.3, aborting. 先要修改一下/etc/modprobe.conf文件,把里面的alias scsi_hostadapter1 mptscsi注释掉 cd /root/linux-2.6.29.3 cp System.map /boot/System.map-2.6.29.3 cp .config /boot/config-2.6.29.3 cd /boot ln -s System.map-2.6.29.3 System.map vi /boot/grub/grub.conf title 2.6.29.3 root (hd0,0) kernel /vmlinuz-2.6.29.3 ro root=LABEL=/ initrd /initrd-2.6.29.3.img reboot #重启系统
二、安装EXT4
Linux kernel 自 2.6.28 开始正式支持新的文件系统 Ext4。内核升级到2.6.29后,安装最新的e2fsprogs,可以到。
tar -xzvf e2fsprogs-1.41.5.tar.gz cd e2fsprogs-1.41.5 mkdir build; cd build ../configure make make install mkfs.ext4 -V mke2fs 1.41.5 (23-Apr-2009) Using EXT2FS Library version 1.41.5 mkfs.ext4 /dev/DEV mount -t ext4 /dev/DEV /wherever ext2升级到ext3 tune2fs -j /dev/DEV ext3升级到ext4 tune2fs -O extents,uninit_bg,dir_index /dev/DEV
三、安装Reiserfs(记得在升级内核的时候,先打上补丁,可以到)
3.1安装libaal,可以到
tar -xzvf libaal-1.0.5.tar.gz cd libaal-1.0.5 ./configure make make install
3.2安装reiser4progs,可以到
tar -xzvf reiser4progs-1.0.7.tar.gz cd reiser4progs ./configure make make install mkfs.reiser4 -V mkfs.reiser4 1.0.7 Copyright (C) 2001-2005 by Hans Reiser, licensing governed by reiser4progs/COPYING.
四、安装JFS,可以到
tar -xzvf jfsutils-1.1.14.tar.gz cd jfsutils-1.1.14 ./configure make make install mkfs.jfs -V mkfs.jfs version 1.1.14, 06-Apr-2009
五、安装XFS,可以参考我以前的文章,可以。
XFS 最初是由 Silicon Graphics,Inc. 于 90 年代初开发的。那时,SGI 发现他们的现有文件系统(existing filesystem,EFS)正在迅速变得不适应当时激烈的计算竞争。为解决这个问题,SGI 决定设计一种全新的高性能 64 位文件系统,而不是试图调整 EFS在先天设计上的某些缺陷。因此,XFS 诞生了,并于 1994 年随 IRIX 5.3 的发布而应用于计算。它至今仍作为 SGI 基于 IRIX 的产品(从工作站到超级计算机)的底层文件系统来使用。现在,XFS 也可以用于 Linux。XFS 的 Linux 版的到来是激动人心的,首先因为它为 Linux 社区提供了一种健壮的、优秀的以及功能丰富的文件系统,并且这种文件系统所具有的可伸缩性能够满足最苛刻的存储需求。
1、首先确定自己的平台和版本,以redhat4为例
[root@snparty1 ~]# uname -a
Linux 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
2、根据自己的平台到下载XFS以及相关包。
kernel-module-xfs-2.6.9-22.EL-0.1-1.src.rpm v0.1, for kernels before 2.6.9-42 kernel-module-xfs-2.6.9-42.0.2.EL-0.2-1.src.rpm v0.2, for kenrels at and after 2.6.9-42 dmapi-2.2.8-1.el4.centos.x86_64.rpm kernel-module-xfs-2.6.9-22.EL-0.1-1.src.rpm kernel-module-xfs-2.6.9-42.0.2.EL-0.2-1.src.rpm xfsdump-2.2.46-1.el4.centos.x86_64.rpm xfsprogs-2.9.4-1.el4.centos.x86_64.rpm3、编译安装
rpmbuild --rebuild --target x86_64 --define \ "kernel_topdir /lib/modules/2.6.9-22.EL/build" \ kernel-module-xfs-2.6.9-22.EL-0.1-1.src.rpm To rebuild, do something like this: rpmbuild --rebuild --target i686 --define "kernel_topdir /lib/modules/2.6.9-22.EL/build" \ kernel-module-xfs-2.6.9-22.EL-0.1-1.src.rpm rpmbuild --rebuild --target x86_64 -define \ "kernel_topdir /lib/modules/2.6.9-42.ELsmp/build" \ kernel-module-xfs-2.6.9-42.0.2.EL-0.2-1.src.rpm cd /usr/src/redhat/RPMS/x86_64 [root@nslave200 x86_64]# rpm -ivh kernel-module-xfs-2.6.9-42.ELsmp-0.2-1.x86_64.rpm Preparing... ########################################### [100%] 1:kernel-module-xfs-2.6.9########################################### [100%] ################################################################# # # # NOTICE # # This xfs module rpm is reasonably tested, but problems may # # still exist. In particular, you may have issues with the # # 4KSTACKS option on RHEL4 ia32 kernels, depending on your IO # # hardware, layering, nfs usage, etc. # # # # Please do NOT report any problems with this module, or with # # the kernel when this module is loaded, to Red Hat. # # You may report issues to the linux-xfs@oss.sgi.com list, or # # to the packager, Eric Sandeen# # (Please also report successes!) # # # ################################################################# rpm -ivh xfsprogs-2.9.4-1.el4.centos.x86_64.rpm warning: xfsprogs-2.9.4-1.el4.centos.x86_64.rpm: V3 DSA signature: NOKEY, key ID 443e1821 Preparing... ########################################### [100%] 1:xfsprogs ########################################### [100%] rpm -ivh dmapi-2.2.8-1.el4.centos.x86_64.rpm warning: dmapi-2.2.8-1.el4.centos.x86_64.rpm: V3 DSA signature: NOKEY, key ID 443e1821 Preparing... ########################################### [100%] 1:dmapi ########################################### [100%] rpm -ivh xfsdump-2.2.46-1.el4.centos.x86_64.rpm warning: xfsdump-2.2.46-1.el4.centos.x86_64.rpm: V3 DSA signature: NOKEY, key ID 443e1821 Preparing... ########################################### [100%] 1:xfsdump ########################################### [100%] warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root /sbin/mkfs.xfs -V mkfs.xfs version 2.9.44、将需要安装的磁盘转化成XFS
df -h Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p6 95G 43G 48G 48% /u01 /dev/cciss/c0d0p5 15G 688M 14G 5% /var umount /dev/cciss/c0d0p6 #格式化/dev/cciss/c0d0p6,如果有重要数据先备份 /sbin/mkfs.xfs -f /dev/cciss/c0d0p6 meta-data=/dev/cciss/c0d0p6 isize=256 agcount=16, agsize=1579891 blks = sectsz=512 attr=0 data = bsize=4096 blocks=25278256, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=12342, version=1 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 mount /dev/cciss/c0d0p6 /u01 df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/cciss/c0d0p5 ext3 15G 688M 14G 5% /var /dev/cciss/c0d0p6 xfs 97G 42G 55G 44% /u01修改/etc/fstab启动的时候自动挂载
cat /etc/fstab #LABEL=/u01 /u01 ext3 defaults 1 2 /dev/cciss/c0d0p6 /u01 xfs defaults 1 2OK,至此安装全部完成。
转自: