Lustre安装配置文档

来源:互联网 发布:遥知兄弟登高处的翻译 编辑:程序博客网 时间:2024/04/29 11:23

部署环境:

centos5.5 _x64

MDS:172.16.19.140

OSS:172.16.19.141

Client:172.16.19.142

 

一、概述

Lustre是一个以GNUGeneral Public为许可证的,开源的分布式并行文件系统。其最大可支持10,000个节点的集群、PB级的存储量、100GB/S的传输速度,同时具有完善的安全性和可管理性。Lustre使用基于对象的设备管理,来替代以往的磁盘块管理方法。

Lustre是一个面向对象的文件系统。它由三个部件组成:元数据服务器(Metadataservers, MDSs)、对象存储服务器(objectstorage servers, OSSs)和客户端。

MDS(元数据服务器):提供元数据服务。相应的,MDC(元数据客户端)是这些服务的客户端

OSS(对象存储服务器):expose块设备并提供数据。OSC(对象存储客户端)则是这些服务的客户端。

 

二、安装配置

注意:安装之前先关闭防火墙和selinux,否则在安装过程中可能会报错。

2.1 安装软件包

安装lustre-1.8.7所需要的安装包如下:

e2fsprogs-1.41.12.2.ora1-0redhat.rhel5.x86_64.rpm

kernel-2.6.18-194.17.1.el5_lustre.1.8.7.x86_64-ext4.rpm

lustre-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64-ext4.rpm

lustre-client-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-ldiskfs-3.1.6-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64-ext4.rpm

lustre-modules-1.8.7-2.6.18_194.17.1.el5_lustre.1.8.7.x86_64-ext4.rpm

# rpm –ivh –aid --force *.rpm

下载地址为:http://downloads.lustre.org/public/lustre/v1.8/lustre_1.8.7/

安装完成后,grub被自动修改为已经修改过的内核的启动项(如下内容),重启机器即可。

# vim /etc/grub.conf

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title CentOS(2.6.18-194.17.1.el5_lustre.1.8.7)

       root (hd0,0)

       kernel /vmlinuz-2.6.18-194.17.1.el5_lustre.1.8.7 roroot=/dev/VolGroup00/LogVol

00

       initrd /initrd-2.6.18-194.17.1.el5_lustre.1.8.7.img

title CentOS (2.6.18-194.el5)

       root (hd0,0)

       kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00

       initrd /initrd-2.6.18-194.el5.img

# uname –a

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


2.2 创建并挂载MDS,OSS

2.2.1在MDS上执行以下操作:

# modprobe lustre

# modprobe ldiskfs

# modprobe lnet'network="tcp0(eth0)"'      (eth0是网卡的名称,需要根据机器的网卡的名称替换。)

# mkfs.lustre  --reformat --fsname=test --mdt --mgs /dev/vdb

如果硬盘没有被格式化或者里面有数据的话,需要加上--reformat

挂载lustre文件系统:

# mkdir /mnt/lustre

# mount.lustre /dev/vdb /mnt/lustre

2.2.2在OSS上执行以下操作:

# modprobe lustre

# modprobe ldiskfs

# modprobe lnet 'network="tcp0(eth0)"'

挂载:

# mkdir /mnt/lustre

# mkfs.lustre  --reformat --fsname=test --ost--mgsnode=172.16.19.140@tcp0 /dev/vdb

--fsname是Lustre集群的名称,OSS上的fsname和MDS上的要一致

-- mgsnode是"modprobe lnet"命令创建的lnet,172.16.19.140是MDS的IP

# mount.lustre /dev/vdb /mnt/lustre

2.3 在客户端上执行如下操作:

# mkdir /mnt/lustre

# mount.lustre 172.16.19.140@tcp0:/test/mnt/lustre

通过# df –h查看挂载情况:

2.4 停止lustre文件系统:

停止顺序和启动顺序相反,先停止客户端,然后OSS,最后是MDS,umount即可。

0 0
原创粉丝点击