centos lustre 简单 安装教程

原文:http://www.weiruoyu.cn/?p=524


感谢rainbird2哥们,我是在他的基础上改进的,增加了测试功能。

因为业务需要,需要做一个分布式的lustre,提高I/O性能。

测试环境:centos5.6 32位,内核:2.6.18-238.el5

mds 192.168.229.155

ost1 192.168.229.156

ost2 192.168.229.157

client 192.168.229.158

1.下载安装包,去官网下就可以:

http://downloads.lustre.org/public/lustre/v1.8/lustre_1.8.7/rhel5-i686/

需要下载7个包:我的是1.87版本

e2fsprogs-1.41.12.2.ora1-0redhat.rhel5.i386.rpm

kernel-2.6.18-194.17.1.el5_lustre.1.8.7.i686.rpm

lustre-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.i686.rpm

lustre-client-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.i686.rpm

lustre-client-modules-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.i686.rpm

lustre-ldiskfs-3.1.6-2.6.18_194.17.1.el5_lustre.1.8.7.i686.rpm

lustre-modules-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.i686.rpm

2.安装

将下载的软件包拷贝到四台机器上,执行命令:

rpm -ivh -aid --force *.rpm

安装完成后,grub被自动修改为已经修改过内核的启动项,直接重启机器即可。
3.配置
1)mds服务器执行以下操作
modprobe lustre
modprobe ldiskfs
modprobe lnet 'network="tcp0(eth0)"'
mkfs.lustre --fsname=test
--reformat --mdt --mgs /dev/sdb
注:如果硬盘没有被格式化或者里面有数据的话需要加 --reformat参数格式化!
mkdir /mnt/lustre
mount.lustre /dev/sdb /mnt/lustre
2)在两台 ost 上执行以下操作
modprobe lustre
modprobe ldiskfs
modprobe lnet 'network="tcp0(eth0)"'
mkfs.lustre --fsname=test --ost
--reformat --mgsnode=192.168.229.155 @tcp0 /dev/sdb1
#
同样如果 sdb1 没有被格式化或者有数据必须加 --reformat参数
mkdir /mnt/lustre
mount.lustre /dev/sdb1 /mnt/lustre
另一台机器上,也执行同样的操作,这样就把lustre的分布文件系统建立起来了。
3) client服务器上执行
mount.lustre
192.168.229.155 @tcp0:/test /mnt
4.测试
client:
[root@localhost ~]# dd if=/dev/zero of=/mnt/test.img bs=1M count=4500
4500+0 records in
4500+0 records out
4718592000 bytes (4.7 GB) copied, 83.8186 seconds, 56.3 MB/s
mds上
[root@localhost ~]# dd if=/dev/zero of=/tmp/test.img bs=1M count=4500
4500+0 records in
4500+0 records out
4718592000 bytes (4.7 GB) copied, 19.5914 seconds, 241 MB/s
其中一台ost上
[root@localhost ~]# dd if=/dev/zero of=/tmp/test.img bs=1M count=3000
3000+0 records in
3000+0 records out
3145728000 bytes (3.1 GB) copied, 38.8462 seconds, 81.0 MB/s
一台真实的IBM服务器:
[root@bogon ~]# dd if=/dev/zero of=/tmp/test.img bs=1M count=4500
4500+0 records in
4500+0 records out
4718592000 bytes (4.7 GB) copied, 5.7876 seconds, 815 MB/s
=====================================================================
可能是用虚拟机做的,效果还没有单台机器快,可能是vm的网络受限。
5.停止lustre文件系统

剩下更详细请参考:http://www.weiruoyu.cn/?p=524


你可能感兴趣的:(安装,centos,职场,教程,休闲,Lustre)