记一次有关于ubuntu20.04的Lustre文件系统安装

Lustre server安装

本文是基于系统环境:ubuntu20.04,linux-5.4.0-122-generic的一次Lustre server安装

一台server 一台oss 一台client

由于官网的文档有些许错误,而且在安装的时候自己也遇到了很多问题,就此整理了一下依赖包等,对于ubuntu的集群来部署Lustre文件系统,有任何问题欢迎讨论。

先简单介绍一下Lustre,Lustre是一个开源的、全局单个命名空间的、符合POSIX标准的分布式并行文件系统,旨在实现系统的可扩展性、高性能和高可用性。Lustre在基于Linux的操作系统上运行,并采用客户端-服务器模式的网络架构。Lustre的存储由一组服务器提供,这些服务器可以扩展到多达数百台的数量。运行着单个文件系统实例的Lustre服务器总共可以向数千个计算客户端提供高达几十PB的存储容量,总吞吐量超过1TB/s。

Lustre是一个文件系统,可扩展以满足从小型HPC环境到超级计算机等不同规模的系统上运行的各种应用程序的需求,而且Lustre是使用基于对象的存储构建块创建的,这样可以最大限度地提高系统扩展性。

当元数据和数据存储在独立的服务器上时,冗余服务器可以支持存储故障转移功能,这样每个文件系统可以针对不同的工作负载进行优化。Lustre可以通过高速网络结构(如英特尔全路径架构( OPA )、InfiniBand*和以太网)向应用程序提供快速的IO。

1.安装构建依赖包

sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list && sudo apt update
sudo apt install -y linux-image-5.4.0-122-generic linux-modules-5.4.0-122-generic linux-modules-extra-5.4.0-122-generic
sudo apt install -y git libtool libtool-bin libyaml-dev ed libreadline-dev dpatch libsnmp-dev mpi-default-dev module-assistant quilt
sudo apt install -y libncurses5-dev libncurses-dev bison flex gnupg libelf-dev gcc libssl-dev bc bzip2 build-essential udev kmod cpio
sudo apt install -y libfuse-dev libattr1-dev libblkid-dev uuid-dev devscripts fakeroot kernel-wedge libudev-dev libpython3-dev swig
sudo apt install -y gettext texinfo debhelper dh-exec update-notifier-common sg3-utils attr mpi-default-bin selinux-utils
sudo apt install -y python python2 python2-minimal python2.7 libpython2-stdlib libsgutils2-2 libpython2.7-stdlib python2.7-minimal libpython2.7-minimal libkeyutils-dev libmount-dev dwarves python3-distutils

2.构建内核${BUILDPATH}=/home/build

在构建Lustre服务器支持之前,需要有一个可用的编译过的内核源码目录,适用于使用的内核版本。如果打算使用LDISKFS作为备份文件系统,则需要使用一个特定的内核版本来生成LDISKFS模块。首先通过执行以下程序找出你的目标服务器上的内核版本,然后为你使用的发行版下载正确的内核:

uname -r 显示出:5.4.0-122-generic
cd /home/build
sudo apt source linux-image-unsigned-5.4.0-122-generic

接下来需要该版本的内核配置。获得该配置的最简单的方法是从运行该版本的服务器上抓取。

cd linux-5.4.0
sudo cp /boot/config-5.4.0-122-generic .config
一旦有了配置文件,就需要确保Ubuntu使用的相同版本号嵌入到内核中:
sudo touch .scmversion
sudo sed -i 's/^VERSION = .*/VERSION = 5/' Makefile
sudo sed -i 's/^PATCHLEVEL = .*/PATCHLEVEL = 4/' Makefile
sudo sed -i 's/^SUBLEVEL = .*/SUBLEVEL = 0/' Makefile
sudo sed -i 's/^EXTRAVERSION =.*/EXTRAVERSION = -122-generic/' Makefile
sudo sed -i 's/^NAME =.*/NAME = Focal Fossa/' Makefile
最后,可以编译内核的源代码,使其可以被Lustre使用:
sudo make -j $(nproc)
注意:"nproc"返回CPU的数量。如果你没有那个工具或者希望使用不同的并行性,只需在该位置输入并行进程的数量。

3.为支持LDISKFS而构建经过修改的e2fsprogs

cd /home/build
git clone git://git.whamcloud.com/tools/e2fsprogs.git
cd e2fsprogs
git checkout master-lustre(注意git checkout 对应版本)
sed -i 's/ext2_types-wrapper.h$//g' lib/ext2fs/Makefile.in
sudo mkdir build && cd build
sudo ../configure && sudo make && sudo make check
sudo make install && sudo make install-lib
dpkg-buildpackage -b -us -uc

这将在/home/build中创建几个".deb "文件。
将它们保存在合理的地方,这样以后就可以在目标服务器上安装修改后的e2fsprogs。

4.构建Lustre服务器包

从Git repo中下载最新的Lustre源代码:

cd /home/build
git clone git://git.whamcloud.com/fs/lustre-release.git
cd lustre-release
git checkout master(注意git checkout 对应版本)
编译Lustre服务器包的方式非常直接:
sudo sh autogen.sh 
sudo ./configure --with-linux=/home/build/linux-5.4.0/ 
sudo make debs -j $(nproc)

如果编译成功,则应该在"lustre-release/debs "下再次找到服务器模块。
把这些模块复制到一个合理的位置,这样就可以用它们来安装Lustre服务器。

5.检验

sudo modprobe lustre && sudo modprobe ldiskfs 

没有报错即安装成功

6.参考链接

https://wiki.whamcloud.com/display/PUB/Build+Lustre+MASTER+with+Ldiskfs+on+Ubuntu+20.04.1+from+Git
参考链接中有许多小错误,确实仅供参考。

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
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>
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值