rocks制作lustre-roll
来源:互联网 发布:lookup table知乎 编辑:程序博客网 时间:2024/06/05 11:10
本次所有操作均在rocks cluster 6.1.1的前端节点上
官方网站默认没有提供针对lustre的roll,所以为了需要,就自己制作了lustre-client-2.5.2版本的roll,总体步骤如下
◆首先在前端节点上安装lustre-client
◆通过安装目录制作出roll所需要的lustre-client所有安装目录的rpm包
◆最后配置节点XML文件和图XML文件来生成针对lustre的roll
◆测试制作好的lustre-roll
以下为详细步骤
一:下载和编译安装lustre-client-2.5.2-2.6.32_431.17.1.el6.x86_64.src.rpm
1.下载地址如下:
https://downloads.hpdd.intel.com/public/lustre/lustre-2.5.2/el6/client/SRPMS/lustre-client-2.5.2-2.6.32_431.17.1.el6.x86_64.src.rpm
2.编译安装lustre-client-2.5.2
[root@cluster ~]# rpm -ivh lustre-client-2.5.2-2.6.32_431.17.1.el6.x86_64.src.rpm
安装完成后,会在root家目录下自动创建一个rpmbuild目录
[root@cluster~]# ls -ld /root/rpmbuild/
drwxr-xr-x4 root root 4096 Sep 9 20:20 /root/rpmbuild/
[root@cluster~]# ls -l /root/rpmbuild/
total 8
drwxr-xr-x2 root root 4096 Sep 9 20:20 SOURCES
drwxr-xr-x2 root root 4096 Sep 9 20:20 SPECS
[root@cluster~]#
3.进入/root/rpmbuild/SPECS目录并生成源码包
[root@cluster~]# cd /root/rpmbuild/SPECS/
[root@clusterSPECS]# rpmbuild -bp lustre.spec
Executing(%prep):/bin/sh -e /var/tmp/rpm-tmp.AFE5TH
+ umask022
+ cd/root/rpmbuild/BUILD
+ cd/root/rpmbuild/BUILD
+ rm-rf lustre-2.5.2
+/usr/bin/gzip -dc/root/rpmbuild/SOURCES/lustre-2.5.2.tar.gz
+/bin/tar -xf -
+STATUS=0
+ '[' 0-ne 0 ']'
+ cdlustre-2.5.2
+/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ lnlustre/ChangeLog ChangeLog-lustre
+ lnlnet/ChangeLog ChangeLog-lnet
+ exit0
[root@clusterSPECS]#
生成的源码包就在/root/rpmbuild/SOURCES目录下
[root@clusterSOURCES]# pwd
/root/rpmbuild/SOURCES
[root@clusterSOURCES]# ls -l
total8612
-rw-r--r--.1 root root 8816336 Jul 1502:27 lustre-2.5.2.tar.gz
[root@clusterSOURCES]#
4.下面编译lustre
[root@clusterSOURCES]# tar xzvf lustre-2.5.2.tar.gz
[root@clusterSOURCES]# cd lustre-2.5.2
[root@clusterlustre-2.5.2]# ./configure --prefix=/opt/lustre --disable-server (因为是client端,所以不需要支持server)
[root@clusterlustre-2.5.2]# make
[root@clusterlustre-2.5.2]# make install
[root@clusterlustre-2.5.2]# mv /sbin/mount.lustre /opt/lustre/sbin/
[root@clusterlustre-2.5.2]# depmod -a
5.验证lustre是否安装成功
[root@cluster~]# modprobe -l |grep lustre
extra/kernel/fs/lustre/obdecho.ko
extra/kernel/fs/lustre/lov.ko
extra/kernel/fs/lustre/llite_lloop.ko
extra/kernel/fs/lustre/ptlrpc.ko
extra/kernel/fs/lustre/mgc.ko
extra/kernel/fs/lustre/lustre.ko
extra/kernel/fs/lustre/osc.ko
extra/kernel/fs/lustre/lvfs.ko
extra/kernel/fs/lustre/fld.ko
extra/kernel/fs/lustre/fid.ko
extra/kernel/fs/lustre/mdc.ko
extra/kernel/fs/lustre/obdclass.ko
extra/kernel/fs/lustre/lmv.ko
extra/kernel/net/lustre/ko2iblnd.ko
extra/kernel/net/lustre/ksocklnd.ko
extra/kernel/net/lustre/libcfs.ko
extra/kernel/net/lustre/lnet.ko
extra/kernel/net/lustre/lnet_selftest.ko
[root@cluster~]#
有以上可知,lustre-client安装成功
二:根据安装目录生成roll所需要的rpm包
1.生成lustre客户端安装目录的rpm包
[root@cluster~]# rocks create package /opt/lustre lustre version=2.5.2
[root@cluster~]# ls -l lustre-2.5.2-1.x86_64.rpm
-rw-r--r--1 root root 14402660 Nov 27 15:21 lustre-2.5.2-1.x86_64.rpm
2.生成lustre客户端模块的rpm包
[root@cluster~]# rocks create package /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/kernel lustre-modules version=2.5.2
[root@cluster~]# ls -l lustre-modules-2.5.2-1.x86_64.rpm
-rw-r--r--1 root root 17495488 Nov 27 15:25 lustre-modules-2.5.2-1.x86_64.rpm
[root@cluster~]#
三:制作lustre-roll
1.创建roll开发环境
[root@cluster~]# mkdir -p /export/src/roll
2.创建一个名称为lustre的roll
[root@cluster~]# cd /export/src/roll/
[root@clusterroll]# rocks create new roll 2.5.2 lustre
3.创建RPM包目录并把刚才所生成的2个rpm包复制进去
[root@clusterroll]# mkdir -p /export/src/roll/lustre/RPMS/x86_64
[root@clusterroll]# cp /root/{lustre-2.5.2-1.x86_64.rpm,lustre-modules-2.5.2-1.x86_64.rpm}/export/src/roll/lustre/RPMS/x86_64/
4.配置节点XML文件
[root@clusterroll]# cd /export/src/roll/lustre/nodes/
[root@clusternodes]# mv lustre.xml lustre-base.xml
[root@clusternodes]# cat lustre-base.xml ###红色字体处为最新添加
<?xmlversion="1.0" standalone="no"?>
<kickstart>
<description>
Your lustre roll description here
</description>
<copyright>
Copyright (c) 2000 - 2014 The Regentsof the University of California.
All rights reserved. Rocks(r) v6.1.1www.rocksclusters.org
</copyright>
<changelog>
$Log$
</changelog>
<package>lustre</package>
<package>lustre-modules</package>
<package>roll-lustre-usersguide</package>
<post>
/bin/mv /opt/lustre/sbin/mount.lustre /sbin/
/bin/ln -s /opt/lustre/sbin/* /usr/local/sbin/
/bin/ln -s /opt/lustre/bin/* /usr/local/bin/
/sbin/depmod -a
</post>
</kickstart>
[root@clusternodes]#
5.配置图XML文件
[root@clusternodes]# cd /export/src/roll/lustre/graphs/default/
[root@clusterdefault]# cat lustre.xml
<?xmlversion="1.0" standalone="no"?>
<graph>
<description>
The lustre Roll
</description>
<copyright>
Copyright (c) 2000 - 2014 The Regentsof the University of California.
All rights reserved. Rocks(r) v6.1.1www.rocksclusters.org
</copyright>
<changelog>
$Log$
</changelog>
<!-- add edges here -->
<edge from="base">
<to>lustre-base</to>
</edge>
</graph>
[root@clusterdefault]#
6.修改对应版本信息
[root@clusternodes]# cd /export/src/roll/lustre/
[root@clusterlustre]# vi version.mk
修改完毕后如下所示
[root@clusterlustre]# cat version.mk
ROLLNAME = lustre
VERSION = 2.5.2
RELEASE = 1
COLOR = springgreen
REDHAT.ROOT = $(CURDIR)
[root@clusterlustre]#
[root@clusterlustre]# cd /export/src/roll/lustre/src/usersguide/
[root@clusterusersguide]# vi version.mk
修改完毕后如下所示
[root@clusterusersguide]# cat version.mk
ROLL = lustre
VERSION = 2.5.2
NAME = roll-$(ROLL)-usersguide
RELEASE = 1
SUMMARY_COMPATIBLE = $(VERSION)
SUMMARY_MAINTAINER = Rocks Group
SUMMARY_ARCHITECTURE = i386, x86_64
ROLL_REQUIRES = base kernel os
ROLL_CONFLICTS =
[root@clusterusersguide]#
7.最后创建lustre-roll
[root@clusterusersguide]# cd /export/src/roll/lustre/
[root@clusterlustre]# make roll
[root@clusterlustre]# ls -l lustre-2.5.2-1.x86_64.disk1.iso
-rw-r--r--1 root root 32407552 Nov 27 15:50 lustre-2.5.2-1.x86_64.disk1.iso
[root@clusterlustre]#
上面的这个lustre-2.5.2-1.x86_64.disk1.iso镜像文件就是我们需要的lustre-roll
8.验证所有期望的包都被创建进镜像文件内
◆在当前目录下创建一个名为manifest的文件,内容如下
[root@clusterlustre]# cat manifest
roll-lustre-kickstart
roll-lustre-usersguide
lustre
lustre-modules
test
[root@clusterlustre]#
◆然后执行一个python检查命令,如下所以
[root@clusterlustre]# /opt/rocks/share/devel/src/roll/bin/manifest-check.py
如果执行后,没有任何输出也就说明创建的镜像没有缺少相关包
四:测试刚才制作好的roll
1.重新安装一个前端节点,并查看目前所安装的roll列表
[root@cluster~]# rocks list roll
NAME VERSION ARCH ENABLED
web-server:6.1.1 x86_64 yes
os: 6.1.1 x86_64 yes
kernel: 6.1.1 x86_64 yes
perl: 6.1.1 x86_64 yes
ganglia: 6.1.1 x86_64 yes
python: 6.1.1 x86_64 yes
area51: 6.1.1 x86_64 yes
base: 6.1.1 x86_64 yes
hpc: 6.1.1 x86_64 yes
torque: 6.0.0 x86_64 yes
[root@cluster~]#
当然目前内核不支持lustre
2.添加制作的lustre-roll到目前的系统中去
[root@cluster~]# rocks add roll lustre-2.5.2-1.x86_64.disk1.iso
Copyinglustre to Rolls.....62533 blocks
[root@cluster~]# rocks enable roll lustre
[root@cluster~]# cd /export/rocks/install/
[root@clusterinstall]# rocks create distro
[root@clusterinstall]# rocks run roll lustre | bash
Rocks-6.1.1 |3.6 kB 00:00
Rocks-6.1.1/primary_db | 2.2MB 00:00
Settingup Install Process
ResolvingDependencies
-->Running transaction check
--->Package lustre.x86_64 0:2.5.2-1 will be installed
-->Finished Dependency Resolution
DependenciesResolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
lustre x86_64 2.5.2-1 Rocks-6.1.1 14 M
TransactionSummary
================================================================================
Install 1 Package(s)
Totaldownload size: 14 M
Installedsize: 45 M
DownloadingPackages:
lustre-2.5.2-1.x86_64.rpm | 14 MB 00:00
Runningrpm_check_debug
RunningTransaction Test
TransactionTest Succeeded
RunningTransaction
Installing : lustre-2.5.2-1.x86_64 1/1
Verifying : lustre-2.5.2-1.x86_64 1/1
Installed:
lustre.x86_64 0:2.5.2-1
Complete!
Settingup Install Process
ResolvingDependencies
-->Running transaction check
--->Package lustre-modules.x86_64 0:2.5.2-1 will be installed
--> FinishedDependency Resolution
DependenciesResolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
lustre-modules x86_64 2.5.2-1 Rocks-6.1.1 17 M
TransactionSummary
================================================================================
Install 1 Package(s)
Totaldownload size: 17 M
Installedsize: 102 M
DownloadingPackages:
lustre-modules-2.5.2-1.x86_64.rpm | 17 MB 00:00
Runningrpm_check_debug
RunningTransaction Test
TransactionTest Succeeded
RunningTransaction
Installing :lustre-modules-2.5.2-1.x86_64 1/1
Verifying : lustre-modules-2.5.2-1.x86_64 1/1
Installed:
lustre-modules.x86_64 0:2.5.2-1
Complete!
Settingup Install Process
ResolvingDependencies
-->Running transaction check
--->Package roll-lustre-usersguide.x86_64 0:2.5.2-1 will be installed
-->Finished Dependency Resolution
DependenciesResolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
roll-lustre-usersguide x86_64 2.5.2-1 Rocks-6.1.1 110 k
TransactionSummary
================================================================================
Install 1 Package(s)
Totaldownload size: 110 k
Installedsize: 145 k
DownloadingPackages:
roll-lustre-usersguide-2.5.2-1.x86_64.rpm | 110 kB 00:00
Runningrpm_check_debug
RunningTransaction Test
TransactionTest Succeeded
RunningTransaction
Installing :roll-lustre-usersguide-2.5.2-1.x86_64 1/1
Verifying : roll-lustre-usersguide-2.5.2-1.x86_64 1/1
Installed:
roll-lustre-usersguide.x86_64 0:2.5.2-1
Complete!
[root@clusterinstall]# init 6
3.重启后再次查看目前所安装的roll列表
[root@cluster~]# rocks list roll
NAME VERSION ARCH ENABLED
web-server:6.1.1 x86_64 yes
os: 6.1.1 x86_64 yes
kernel: 6.1.1 x86_64 yes
perl: 6.1.1 x86_64 yes
ganglia: 6.1.1 x86_64 yes
python: 6.1.1 x86_64 yes
area51: 6.1.1 x86_64 yes
base: 6.1.1 x86_64 yes
hpc: 6.1.1 x86_64 yes
torque: 6.0.0 x86_64 yes
lustre: 2.5.2 x86_64 yes
[root@cluster~]#
当然目前内核已经支持lustre
[root@cluster~]# modprobe -l |grep lnet
extra/kernel/net/lustre/lnet.ko
extra/kernel/net/lustre/lnet_selftest.ko
[root@cluster~]# modprobe -l |grep lustre
extra/kernel/fs/lustre/obdecho.ko
extra/kernel/fs/lustre/lov.ko
extra/kernel/fs/lustre/llite_lloop.ko
extra/kernel/fs/lustre/ptlrpc.ko
extra/kernel/fs/lustre/mgc.ko
extra/kernel/fs/lustre/lustre.ko
extra/kernel/fs/lustre/osc.ko
extra/kernel/fs/lustre/lvfs.ko
extra/kernel/fs/lustre/fld.ko
extra/kernel/fs/lustre/fid.ko
extra/kernel/fs/lustre/mdc.ko
extra/kernel/fs/lustre/obdclass.ko
extra/kernel/fs/lustre/lmv.ko
extra/kernel/net/lustre/ko2iblnd.ko
extra/kernel/net/lustre/ksocklnd.ko
extra/kernel/net/lustre/libcfs.ko
extra/kernel/net/lustre/lnet.ko
extra/kernel/net/lustre/lnet_selftest.ko
[root@cluster~]#
以后安装计算节点时也会自动安装此lustre-roll
网上下载lustre-roll:点击打开链接
- rocks制作lustre-roll
- Unity制作Roll-a-Ball游戏
- ROLL A BALL (Unity 3D 入门) 游戏制作指导
- ODBC Rocks!
- VTK rocks
- Lustre Recovery
- Lustre资源
- lustre安装
- lustre升级
- Roll to roll architecture
- ROLL A BALL (Unity 3D 入门) 游戏制作指导 - 滚珠游戏介绍
- ROLL A BALL (Unity 3D 入门) 游戏制作指导 - 移动游戏对象
- Microsoft "Live.Com" Rocks :-)
- ActionScript 3.0 rocks!
- OpenGL + CUDA + DevIL rocks!
- www.diigo.com rocks
- Html5 Rocks 镜像
- JavaScript Performance Rocks
- 2D绘图中设置图幅比例
- A*算法最强分析和实现
- Oracle 10g/11g 导入导出整理
- 12月计划
- button使用时,type默认为submmit类型
- rocks制作lustre-roll
- javascript后台直接返回Boolean类型处理
- Collections类使用,模拟斗地主洗牌
- lsof 命令
- android WifiDisplay 源码分析系列 (二)
- 10个程序员必须学会接受的残酷真相
- VS2010 LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 的解决方法
- 自动布局autolayout使用总结(源码含swift版本)
- 深入浅出学习正则表达式(一)(转 sema)