[转帖]Lustre文件系统安装配置_VMware, Unix及操作系统讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  VMware, Unix及操作系统讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3983 | 回复: 0   主题: [转帖]Lustre文件系统安装配置        下一篇 
lengyuLee
注册用户
等级:少校
经验:1118
发帖:83
精华:5
注册:2013-3-7
状态:离线
发送短消息息给lengyuLee 加好友    发送短消息息给lengyuLee 发消息
发表于: IP:您无权察看 2013-3-14 15:07:01 | [全部帖] [楼主帖] 楼主

文章转载自:http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=2152718&fromuid=28709874

安装简介:
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)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论