免费注册 查看新帖 |

Chinaunix

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

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

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-02-05 09:11 |只看该作者 |倒序浏览


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


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/29960/showart_242847.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP