免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 16105 | 回复: 14
打印 上一主题 下一主题

[Lustre] Lustre文件系统安装配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-16 18:03 |只看该作者 |倒序浏览
安装简介:
1.        源代码安装
需要重新编写内核,更改grub或lilo引导信息,较为繁琐。
2.        rpm包安装
只需更改grub或lilo引导信息,比较简单易行,本次测试采用rpm包安装方式。
                         测试需要下列安装包:
                 kernel-smp-2.6.9-42.0.2.EL_lustre.1.4.7.1.i686.rpm
kernel-source-2.6.9-42.0.2.EL_lustre.1.4.7.1.i686.rpm
lustre-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
lustre-debuginfo-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
lustre-modules-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
lustre-source-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
a)        安装Lustre启动需要得内核patch
rpm –ivh kernel-smp-2.6.9-42.0.2.EL_lustre.1.4.7.1.i686.rpm
rpm –ivh kernel-source-2.6.9-42.0.2.EL_lustre.1.4.7.1.i686.rpm
b)        更改/etc/grub.conf
注视掉原内核引导信息,以Lustre内核引导启动。
title Red Hat Enterprise Linux AS (2.6.9-42.0.2.EL_lustre.1.4.7.1smp)
        root (hd0,0)
        kernel boot/vmlinuz-2.6.9-42.0.2.EL_lustre.1.4.7.1smp ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.9-42.0.2.EL_lustre.1.4.7.1smp.img
#title Red Hat Enterprise Linux AS (2.6.9-42.EL)
#       root (hd0,0)
#       kernel /boot/vmlinuz-2.6.9-42.EL ro root=LABEL=/1 rhgb quiet
#       initrd /boot/initrd-2.6.9-42.EL.img
c)        重新启动系统,uname –r查看是否使用Lustre内核启动。
d)        安装Lustre文件系统
rpm –ivh lustre-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
rpm –ivh lustre-modules-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
rpm –ivh lustre-source-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
rpm –ivh lustre-debuginfo-1.4.7.1-2.6.9_42.0.2.EL_lustre.1.4.7.1smp.i686.rpm
安装完毕。
配置:
         1.  前期部署,需要那些服务器做mds,ost,client,所有服务器ip,定义的服务器里节点名,写入/etc/hosts。每个节点服务器都需要。下例hosts文件内容。
            192.168.40.4    node-mds      
        192.168.40.5    node-ost1
        192.168.40.4    node-ost2
2. 编写配置档config.xml得shell脚本。(可在任何一个Lustre节点上进行)
  #!/bin/bash
#config.sh
#创建节点
rm –rf config.xml
lmc –m config.xml --add net --node node-mds --nid node-mds --nettype tcp
lmc -m config.xml --add net --node node-ost1 --nid node-ost1 --nettype tcp
lmc -m config.xml --add net --node node-ost2 --nid node-ost2 --nettype tcp
lmc -m config.xml --add net --node node-ost3 --nid node-ost3 --nettype tcp
lmc -m config.xml --add net --node client '*' --nettype tcp
#创建MDS
lmc -m config.xml --add mds --node node-mds --mds mds-scratch --fstype ext3 --dev /dev/sda3
#创建 LOV
lmc -m config.xml --add lov --lov lov-scratch --mds mds-scratch --stripe_sz 1048576 --stripe_cnt 0 --stripe_pattern 0
# 配置 OSTs
lmc -m config.xml --add ost --node node-ost1 --lov lov-scratch --ost ost1-scratch --fstype ext3 --dev /dev/sda4
lmc -m config.xml --add ost --node node-ost2 --lov lov-scratch --ost ost2-scratch --fstype ext3 --dev /dev/sda3
lmc -m config.xml --add ost --node node-ost3 --lov lov-scratch --ost ost3-scratch --fstype ext3 --dev /dev/sda3
lmc -m config.xml --add ost --node node-ost4 --lov lov-scratch --ost ost4-scratch --fstype ext3 --dev /dev/sda3
# 配置Configure client
lmc -m config.xml --add mtpt --node client --path /scratch --mds mds-scratch --lov lov-scratch
3. 运行config.sh 生成config.xml,把config.xml复制在所有节点上。
启动和停掉服务:
     Lustre文件系统讲究启动和停止的顺序:
     启动:按 OST -> MDS -> CLIENT顺序启动服务
1.        # 启动 OSTs, 首次启动需要加 –reformat选项 (格式化,以前数据全部清除)
lconf --reformat --node node-ost1 config.xml
lconf --reformat --node node-ost2 config.xml
lconf --reformat --node node-ost3 config.xml
2.        # 启动MDS
          lconf --reformat --node node-mds config.xml
3.        #启动client
     lconf --node client config.xml
     启动完成,可以用df -h查询分区加载情况:
     Filesystem            Size  Used Avail Use% Mounted on
     /dev/sda1             1.5G  493M  908M  36% /
      none                 982M     0  982M   0% /dev/shm
     /dev/sda2             9.7G  6.4G  2.8G  71% /usr
    /dev/sda3             2.0G  245M  1.7G  13% /var
    /dev/sda6             9.2G  416M  8.4G   5% /home
    config                395G  1.3G  373G   1% /scratch

停止服务:按 CLIENT -> MDS ->OST 顺序停止服务
1.        停掉CLIENT
    lconf -d --node client config.xml
2.        停掉MDS
    lconf -d --node node-mds config.xml
3.        停掉OST
    lconf -d --node node-ost1 config.xml
    lconf -d --node node-ost2 config.xml
    lconf -d --node node-ost3 config.xml
    Lustre提供一个启动,停止服务的工具# sh /etc/init.d/lustre start, 具体需要更改配置。还没有做研究。
在现有文件系统基础上增加OST:
1.        停掉(卸载)client服务
    lconf -d ---node client config.xml
2.        停掉mds服务
    lconf -d --node node-mds config.xml
3.  修改所有节点上/etc/hosts
4.         创建新的config.xml
     把新增加的ost添加进config.sh, 生成新的config.xml,copy配置文件到所有节点。
5.  格式化新增的ost节点分区。
     lconf --reformat --node node-ost3 config.xml
6.  升级mds的配置信息
     lconf --write-conf config.xml
7.  启动mds
     lconf --node node-mds config.xml (不可加--reformat)
8.  启动client
     lconf --node client config.xml

论坛徽章:
0
2 [报告]
发表于 2006-11-16 18:06 |只看该作者

求助关于增加ost

测试基本完成,也就懂了一点点,求助关于增加ost,需要停掉client,领导说这个太麻烦,我想lustre肯定也有别的办法解决,只是自己还没有看见,有哪个兄弟以前做过这方面得研究,请说一下,怎样mds自动识别新增加得ost,不用停掉client?多谢,还有多谢版主支持。

论坛徽章:
0
3 [报告]
发表于 2006-11-16 21:51 |只看该作者
1.6x版本可以动态增加OST,但是不能减少,大家多交流哦。我也是玩lustre的
我的msn cds0309(at)hotmail.com

论坛徽章:
0
4 [报告]
发表于 2006-11-20 13:48 |只看该作者
怎么动态增加那,另外公司需要得是多处多个小文件得,看nntp版主得帖子,发现这类文件系统并不适合处理大量小文件,对于处理大量小文件,不知道你们用过什么比较好得,可以推荐一下么?

论坛徽章:
0
5 [报告]
发表于 2006-11-20 14:05 |只看该作者
学习ing, 马上也要组lustre群集,多谢

论坛徽章:
0
6 [报告]
发表于 2006-11-24 13:24 |只看该作者
最近也在做这个,学习学习!

论坛徽章:
0
7 [报告]
发表于 2006-11-24 13:28 |只看该作者
那大家多交流哦

论坛徽章:
0
8 [报告]
发表于 2006-12-03 14:43 |只看该作者
前段时间了解过hadoop的文件系统,它是基于块操作的,可以自定义在存储是把文件分成的块的大小,我想,这个对小文件的处理会有所改善。
但hadoop没有一个好的接口,使用时需要输入很长的命令,而且能对文件的操作有限。

希望对你有 帮助。

论坛徽章:
0
9 [报告]
发表于 2006-12-03 14:45 |只看该作者
另外,把stripe_sz 设小一点,不知道对小文件的性能会好一点。有待测试。

论坛徽章:
0
10 [报告]
发表于 2008-11-26 14:09 |只看该作者

回复 #9 lurejohn 的帖子

学习中!!!!!!!!!!!!!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP