lustre安装

Lustre安装(1.8.7)

Lustre是一个并行文件系统,性能良好,supercomputers top 500中半数以上采用lustre作为文件系统。lustre的具体内容可以参考http://en.wikipedia.org/wiki/Lustre_(file_system)
本文介绍Lustre 1.8.7在CentOS 5.5上的安装。

Lustre分为三部分:

1. MDS (metadata server)

Lustre的元数据服务器,在Lustre集群上仅有一个MDS。MDS上有一个MDT(metadata target),用于存储Lustre的一些元数据信息,例如存储在Lustre上的文件的路径,访问权限等。用户访问Lustre上的数据时,需要向MDT请求来进行查找文件的路径,检查访问权限等工作,然后才能访问Lustre的实际数据。

2. OSS (object storage servers)

OSS通过OST(object storage target)用于存储Lustre上的实际文件数据。一个Lustre集群上可以用多个OSS,一个OSS上也可以有多个OST

3. Client

用户通过Lustre的Client来访问Lustre集群。

 

Lustre1.8.7安装

  • MDT  :192.168.111.150
  • OST  :192.168.111.172
  • Client:192.168.111.155

1.软件

  • OS:CentOS 5.5
  • Lustre:1.8.7

Lustre1.8.7可以在http://downloads.lustre.org/public/lustre/v1.8/lustre_1.8.7/上下载。下载需要注意选在与OS匹配和CPU匹配的lustre包。CentOS系统选择rhel的包。另外还要和32/64位匹配。32位系统选择rhel5-i686,64位系统选择rhel5-x86-64。

以rhel5-x86-64为例,需要下载一下rpm包

  • kernel-2.6.18-194.17.1.el5_lustre.1.8.7.i686.rpm
  • e2fsprogs-1.41.12.2.ora1-0redhat.rhel5.x86_64.rpm
  • lustre-ldiskfs-3.1.6-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64.rpm
  • lustre-modules-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64.rpm
  • lustre-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64.rpm
  • lustre-client-modules-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64.rpm
  • lustre-client-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64.rpm

 

2.安装Lustre基础环境

Lustre的各个部分都有一些基础的软件需要安装

1) 安装Linux内核补丁

Lustre修改了Linux的内核,安装Lustre必须打Linux内核补丁。在Lustre的网站上也列出了当前版本的Lustre支持的操作系统版本,因此选择操作系统时,也需要选择与此相对应的操作系统。

1 #rpm -ivh kernel-2.6.18-194.17.1.el5_lustre.1.8.7.i686.rpm --force

 

安装完补丁后,重启系统,并选择安装的内核版本启动。然后执行uname -a命令。

1 #uname -a

 

可以看到内核版本改为Lustre内核补丁的版本。Lustre只能在这个内核上正常运行。

2) 安装e2fsprogs

3) 安装安装lustre-ldisks

4) 安装lustre-module

5) 安装lustre

6) 将lustre加载到系统内核模块中

1 #modprobe lustre
2 #modprobe ldiskfs
3 #modprobe lnet 'network="tcp0(eth1)"'

 eth0是网卡的名称,需要根据机器的网卡的名称替换。至此,完成lustre软件的安装。

 

3.安装Lustre MDT

1)格式化MDT分区

Lustre的MDT需要一个单独的系统分区,Lustre会将该分区格式化为Lustre的文件系统格式。
假定现在系统挂载了一个新的硬盘/dev/sdb。如果这个分区已经挂载到系统中,需要先将该分区从系统中umount下来。然后执行以下命令。

1 mkfs.lustre --fsname=geobeans --reformat --mdt --mgs /dev/sdb

 该命令将/dev/sdb分区格式化为lustre文件系统格式。

注意:--fsname=geobeans参数,geobeans就是这个Lustre集群的名称,挂载OST和Client都需要这个名称。

2)  挂载MDT

创建挂载点路径

1 #mkdir /lustre_mdt

 挂载Lustre MDT

1 #mount.lustre /dev/sdb /mnt/lustre_mdt

  至此,完成了MDT的安装。

 

4. 安装OST

1) 格式化OST分区

将OST安装到/storage分区上,需要先从系统中卸载/storage分区。记住/storage分区为/dev/hda3设备。

格式化/dev/hda3分区

1 #mkfs.lustre --fsname=geobeans --ost --mgsnode=192.168.111.150@tcp0 /dev/hda3

 

  • --fsname即为Lustre集群的名称,这里是geobeans
  • --mgsnode即为"modprobe lnet"命令创建的lnet,192.168.111.150为MDT的IP

2) 挂载OST分区

1 #mount.lustre /dev/hda3 /storage

至此就完成了lustre服务端的安装。再安装lustre的客户端,连接到lustre的mdt上,就可以操作lustre集群了。

 

5.安装Client

1) 安装client

1 #rpm -ivh lustre-client-modules-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64.rpm --force
2 #rpm -ivh lustre-client-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64.rpm --force

 

2) 挂载client到mdt上

创建挂载点

1 #mkdir /lustre

 

挂载lustre client

1 #mount.lustre 192.168.111.150@tcp0:/geobeans /lustre

 

192.168.111.150@tcp0:/geobeans即为lustre mdt的路径,在安装mdt时,通过modprobe lnet命令创建。

至此就完成了整个lustre的安装。现在可以在Lustre Client上通过以下的命令查看lustre集群的状况

1 lfs df -Th

可以看到现在Lustre集群上的MDT和OST的信息。

 

Lustre遵循POSIX规范,因此在Lustre Client上,可以像使用ext3等文件系统一样使用/lustre分区。例如用mkdir命令创建文件夹,用cp命令复制文件。

Lustre is a shared disk file system, generally used for large scale cluster computing. The name Lustre is a portmanteau of Linux and cluster. The project aims to provide a file system for clusters of tens of thousands of nodes with petabytes of storage capacity, without compromising speed or security. Lustre is available under the GNU GPL.<br><br>Lustre is designed, developed and maintained by Sun Microsystems, Inc. with input from many other individuals and companies. Sun completed its acquisition of Cluster File Systems, Inc., including the Lustre file system, on October 2, 2007, with the intention of bringing the benefits of Lustre technologies to Sun's ZFS file system and the Solaris operating system.<br><br>Lustre file systems are used in computer clusters ranging from small workgroup clusters to large-scale, multi-site clusters. Fifteen of the top 30 supercomputers in the world use Lustre file systems, including the world's fastest supercomputer, the Blue Gene/L at Lawrence Livermore National Laboratory (LLNL). Other supercomputers that use the Lustre file system include systems at Oak Ridge National Laboratory, Pacific Northwest National Laboratory, and Los Alamos National Laboratory in North America, the largest system in Asia at Tokyo Institute of Technology, and the largest system in Europe at CEA.<br><br>Lustre file systems can support up to tens of thousands of client systems, petabytes (PBs) of storage and hundreds of gigabytes per second (GB/s) of I/O throughput. Businesses ranging from Internet service providers to large financial institutions deploy Lustre file systems in their datacenters. Due to the high scalability of Lustre file systems, Lustre deployments are popular in the oil and gas, manufacturing, rich media and finance sectors.<br>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值