前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >源码编译Lustre-2.15.2

源码编译Lustre-2.15.2

作者头像
用户4700054
发布于 2023-02-26 06:49:21
发布于 2023-02-26 06:49:21
2.1K00
代码可运行
举报
运行总次数:0
代码可运行

AlmaLinux版本

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
// OS镜像:AlmaLinux-8.7-x86_64-dvd.iso
[root@Lustre-OS ~/Source/zfs]$ uname -a
Linux Lustre-OS 4.18.0-425.3.1.el8.x86_64 #1 SMP Tue Nov 8 14:08:25 EST 2022 x86_64 x86_64 x86_64 GNU/Linux

添加lustre.repo

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
// 需要把这个园添加到节点中,后面源码编译需要这个源安装系统包
[root@Lustre-OS ~/Source/lustre-2.15.2]$ cat /etc/yum.repos.d/lustre.repo 
[lustre-server]
name=lustre-server
baseurl=https://downloads.whamcloud.com/public/lustre/lustre-2.15.2/el8.7/server/
gpgcheck=0


[lustre-client]
name=lustre-client
baseurl=https://downloads.whamcloud.com/public/lustre/lustre-2.15.2/el8.7/client/
gpgcheck=0

[e2fsprogs-wc]
name=e2fsprogs-wc
baseurl=https://downloads.whamcloud.com/public/e2fsprogs/latest/el8/
gpgcheck=0

基于AlmaLinux安装系统依赖

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/********系统组件依赖**********
[root@Lustre-OS ~]$ yum -y groupinstall "Development Tools"

// 查看内核版本保持和kernel-devel和kernel保持一致,安装完毕后kernel的源码路径呈现在/usr/src/kernels/4.18.0-425.3.1.el8.x86_64路径
[root@Lustre-OS ~]$ rpm -qa|grep kernel
kernel-4.18.0-425.3.1.el8.x86_64
// lustre源中也有 kernel-devel,先尝试自带的kernel-devel安装
[root@Lustre-OS ~]$ yum install kernel-devel-4.18.0-425.3.1.el8.x86_64

[root@Lustre-OS ~]$ yum --nogpgcheck --enablerepo=*  install -y  audit-libs-devel binutils-devel elfutils-devel kabi-dw ncurses-devel newt-devel numactl-devel openssl-devel pciutils-devel perl perl-devel python2 python3-docutils xmlto xz-devel elfutils-libelf-devel libcap-devel libcap-ng-devel llvm-toolset libyaml libyaml-devel kernel-rpm-macros kernel-abi-whitelists uuid libuuid-devel libblkid libblkid-devel libtirpc-devel libtirpc libaio-devel libattr-devel   libffi-devel libudev-devel ncompress python3-cffi python3-devel python3-packaging  libmount libmount-devel make cmake automake gdb gcc

[root@Lustre-OS ~]$ yum --nogpgcheck --enablerepo=powertools  install libyaml-devel

[root@Lustre-OS ~]$ yum --nogpgcheck --disablerepo=* --enablerepo=e2fsprogs-wc  install  e2fsprogs e2fsprogs-devel e2fsprogs-libs libcom_err libcom_err-devel libss libss-devel 

[root@Lustre-OS ~]$ yum install  --disablerepo=*  --enablerepo=lustre-server kernel-debuginfo-common-x86_64.x86_64 -y

安装ZFS

  • 编译阶段
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/****************zfs****************/

// 开始配置和编译
[root@Lustre-OS ~/Source/zfs]$ git clone https://github.com/openzfs/zfs.git && cd zfs && git checkout zfs-2.1.5 
[root@Lustre-OS ~/Source/zfs]$ sh autogen.sh
[root@Lustre-OS ~/Source/zfs]$ ./configure --with-spec=redhat  --with-linux=/usr/src/kernels/4.18.0-425.3.1.el8.x86_64/

// 开始编译
[root@Lustre-OS ~/Source/zfs]$ make pkg-utils pkg-kmod

// 编译结果查看
[root@Lustre-OS ~/Source/zfs]$ mkdir -p zfs-rpm &&  mv *.rpm zfs-rpm/
[root@Lustre-OS ~/Source/zfs]$ ls zfs-rpm/ -l
total 126072
-rw-r--r--. 1 root root  1577432 Feb  8 20:38 kmod-zfs-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 16429760 Feb  8 20:38 kmod-zfs-debuginfo-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root   403868 Feb  8 20:38 kmod-zfs-devel-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root    37160 Feb  8 20:34 libnvpair3-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root    93268 Feb  8 20:34 libnvpair3-debuginfo-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root    32808 Feb  8 20:34 libuutil3-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root    64156 Feb  8 20:34 libuutil3-debuginfo-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root   234608 Feb  8 20:34 libzfs5-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root   584520 Feb  8 20:34 libzfs5-debuginfo-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root   384956 Feb  8 20:34 libzfs5-devel-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root  1341368 Feb  8 20:34 libzpool5-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root  3948900 Feb  8 20:34 libzpool5-debuginfo-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root   120496 Feb  8 20:34 python3-pyzfs-2.1.5-1.el8.noarch.rpm
-rw-r--r--. 1 root root 34776594 Feb  8 20:30 zfs-2.1.5-1.el8.src.rpm
-rw-r--r--. 1 root root   673984 Feb  8 20:34 zfs-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root  1030124 Feb  8 20:34 zfs-debuginfo-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root  2579340 Feb  8 20:34 zfs-debugsource-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root    17140 Feb  8 20:34 zfs-dracut-2.1.5-1.el8.noarch.rpm
-rw-r--r--. 1 root root 34772834 Feb  8 20:34 zfs-kmod-2.1.5-1.el8.src.rpm
-rw-r--r--. 1 root root  2208320 Feb  8 20:38 zfs-kmod-debugsource-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 27365996 Feb  8 20:34 zfs-test-2.1.5-1.el8.x86_64.rpm
-rw-r--r--. 1 root root   365848 Feb  8 20:34 zfs-test-debuginfo-2.1.5-1.el8.x86_64.rpm
  • 安装阶段
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@Lustre-OS ~/Source/zfs/zfs-rpm]$ yum localinstall  -y  libuutil*.rpm libnvpair*.rpm zfs-debuginfo*.rpm zfs-debugsource*.rpm 

[root@Lustre-OS ~/Source/zfs/zfs-rpm]$ yum localinstall  -y  libzfs5*.rpm libzfs5*.rpm libzpool5*.rpm  zfs-kmod-debugsource*.rpm

[root@Lustre-OS ~/Source/zfs/zfs-rpm]$ yum localinstall  -y  kmod-zfs*.rpm zfs-2.1.5-1.el8.x86_64.rpm

m


[root@Lustre-OS ~/Source/zfs/zfs-rpm]$ rpm -ivh zfs-2.1.5-1.el8.src.rpm

// 确认下安装的包是否有遗漏
[root@Lustre-OS ~/Source/zfs/zfs-rpm]$ yum localinstall  -y  libuutil*.rpm libnvpair*.rpm  {zfs-[0-9].*,zfs-dracut-[0-9].*,kmod-zfs-[0-9].*,kmod-zfs-devel-[0-9].*,lib*}.*.rpm

// 内核加载zfs
[root@Lustre-OS ~/Source/zfs/zfs-rpm]$ modprobe zfs

安装Lustre Server

  • 编译阶段
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/**************lustre -server ******/

[root@Lustre-OS ~]$ git clone git://git.whamcloud.com/fs/lustre-release.git
[root@Lustre-OS ~]cd lustre-release && git checkout 2.15.2 
[root@Lustre-OS ~]mv  lustre-release  lustre-2.15.2 && cd ~/Source/lustre-2.15.2
[root@Lustre-OS ~/Source/lustre-2.15.2]$ sh autogen.sh
[root@Lustre-OS ~/Source/lustre-2.15.2]$ make distclean


// 执行configure会报错,需要安装过程中的依赖libnl和libnl3-devel
[root@Lustre-OS ~/Source/lustre-2.15.2]$ wget https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz
[root@Lustre-OS ~/Source/lustre-2.15.2]$ tar zxvf libnl-3.2.25.tar.gz 
[root@Lustre-OS ~/Source/lustre-2.15.2]$ cd libnl-3.2.25 && ./configure && make && make install

[root@Lustre-OS ~/Source/lustre-2.15.2]$ yum --nogpgcheck --enablerepo=*   install -y  libnl3-devel

// 添加用户自定义的lib路径
[root@Lustre-OS ~/Source/lustre-2.15.2]$ cat <<EOF >> /etc/ld.so.conf
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
EOF

// 重新加载链接库
[root@Lustre-OS ~/Source/lustre-2.15.2]$ ldconfig



// 支持编译ldiskfs-osd先决条件是安装zfs和kernel-debuginfo-common-x86_64
// 编译zfs-osd和ldiskfs-osd
[root@Lustre-OS ~/Source/lustre-2.15.2]$ rm -rf configure.log && ./configure  --enable-quota --enable-server \
--with-linux=/usr/src/kernels/4.18.0-425.3.1.el8.x86_64  --with-zfs=/usr/src/zfs-2.1.5/  >> configure.log 2>&1 &

[root@Lustre-OS ~/Source/lustre-2.15.2]$ make rpms 
[root@Lustre-OS ~/Source/lustre-2.15.2]$ mkdir -p server-rpm &&mv *.rpm server-rpm/
  • 安装阶段
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
// kmod-lustre安装
[root@Lustre-Server ~/Source/lustre-2.15.2/server-rpm]$ yum localinstall -y kmod-lustre-2.15.2-1.el8.x86_64.rpm kmod-lustre-debuginfo-2.15.2-1.el8.x86_64.rpm   lustre-debuginfo-2.15.2-1.el8.x86_64.rpm lustre-debugsource-2.15.2-1.el8.x86_64.rpm

[root@Lustre-Server ~/Source/lustre-2.15.2/server-rpm]$ yum -y localinstall kmod-lustre-osd-*.rpm  lustre-osd-ldiskfs-mount-2.15.2-1.el8.x86_64.rpm lustre-osd-zfs-mount-2.15.2-1.el8.x86_64.rpm

[root@Lustre-Server ~/Source/lustre-2.15.2/server-rpm]$ yum -y localinstall   lustre-2.15.2-1.el8.x86_64.rpm   lustre-devel-2.15.2-1.el8.x86_64.rpm lustre-iokit-2.15.2-1.el8.x86_64.rpm lustre-osd-zfs-mount-debuginfo-2.15.2-1.el8.x86_64.rpm  lustre-osd-ldiskfs-mount-debuginfo-2.15.2-1.el8.x86_64.rpm

// 查看lustre的加载的内核模块
[root@Lustre-Server ~/Source/lustre-2.15.2/server-rpm]$ modprobe  -v lustre
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/kernel/net/sunrpc/sunrpc.ko.xz 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/net/libcfs.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/net/lnet.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/obdclass.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/ptlrpc.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/fld.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/fid.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/osc.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/lov.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/mdc.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/lmv.ko 
insmod /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/lustre/fs/lustre.ko

安装Lustre Client

  • 编译阶段
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/**************lustre client ******/
[root@Lustre-OS ~]$ cd && cd lustre-2.15.2 
[root@Lustre-OS ~/Source/lustre-2.15.2]$ make clean &&  make distclean
[root@Lustre-OS ~/Source/lustre-2.15.2]$  rm -rf configure.log && ./configure   --disable-server --enable-client \
--with-linux=/usr/src/kernels/4.18.0-425.3.1.el8.x86_64 >> configure.log 2>&1 &

[root@Lustre-OS ~/Source/lustre-2.15.2]$ make rpms 
[root@Lustre-OS ~/Source/lustre-2.15.2]$ mkdir -p client-rpm &&mv *.rpm client-rpm/
  • 安装阶段
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@Lustre-Client ~/Source/lustre-2.15.2]$ yum localinstall -y   kmod-lustre-client-2.15.2-1.el8.x86_64.rpm \
 kmod-lustre-client-debuginfo-2.15.2-1.el8.x86_64.rpm          \
 lustre-client-2.15.2-1.el8.x86_64.rpm                         \
 lustre-client-debuginfo-2.15.2-1.el8.x86_64.rpm               \
 lustre-client-debugsource-2.15.2-1.el8.x86_64.rpm             \
 lustre-client-devel-2.15.2-1.el8.x86_64.rpm                   \
 lustre-iokit-2.15.2-1.el8.x86_64.rpm
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2023-02-10,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 存储内核技术交流 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
centos7源码编译和安装lustre
linux内核版本 $ uname -r 3.10.0-1160.42.2.el7.x86_64 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) // lustre安装版本需要和https://downloads.whamcloud.com/public/lustre/lustre-2.12.7/el7.9.2009/server/RPMS/ 查看对应的版本 os安装依赖 $ yum install asciidoc aud
用户4700054
2022/08/17
2.1K0
Lustre部署
kernel版本信息 [root@CentOS1 ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) [root@CentOS1 ~]# uname -r 3.10.0-1062.el7.x86_64 配置lustre安装源 // lustre-2.14.0 内核刚好匹配 kernel 3.10.0-1062.el7.x86_64 [root@CentOS1 lustre]# pwd /root/lustre [root@Ce
用户4700054
2022/08/17
2.1K1
Lustre部署
Lustre集群部署
kernel版本信息 [root@CentOS1 ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) [root@CentOS1 ~]# uname -r 3.10.0-1062.el7.x86_64 配置lustre安装源 // lustre-2.14.0 内核刚好匹配 kernel 3.10.0-1062.el7.x86_64 [root@CentOS1 lustre]# pwd /root/lustre [root@Ce
用户4700054
2022/08/17
1.5K0
Lustre集群部署
如何优雅地编译kernel
linux内核有社区版本,升级和发布很快。redhat会选择一个内核版本构建自己的发行版,发行版除了内核还包括众多内核之上的软件如bash/gcc/glibc/systemd/开发库等等,redhat的策略是长期维护,只backport和bugfix升级小版本,并且保证任何backport和bugfix不影响原来的使用场景,比如升级内核小版本原来自己开发的内核模块代码不用修改,但在主线linux内核升级估计就得修改代码,再比如原来生产环境有一些脚本和配置文件,小版本升级后这些脚本和配置不用做任何修改,但不用redhat维护的版本,自己升级开源的版本恐怕升级后这些脚本和配置文件都未必能正常工作,维护周期结束后redhat会对大版本做一次升级,至少这个维护周期生产环境可以正常升级。所以生产环境都用redhat的企业版本linux,centos就是去掉商标后的redhat免费企业版,不想付费就用centos。
惠伟
2021/07/08
1.1K0
Lustre文件系统安装
1. 环境 1.1 创建临时的yum源 cat >/tmp/lustre-repo.conf <<\__EOF [lustre-server] name=lustre-server baseurl=https://downloads.whamcloud.com/public/lustre/latest-release/el7/server # exclude=*debuginfo* gpgcheck=0 [lustre-client] name=lustre-client baseurl=https://
Lucien168
2020/07/20
1.4K0
在Linux下源码编译安装GreatSQL/MySQL
本次介绍如何利用Docker来将GreatSQL源码编译成二进制文件,以及制作二进制包、RPM包等。
老叶茶馆
2021/08/26
2.4K0
在CentOS环境下编译GreatSQL RPM包
此链接 https://gitee.com/GreatSQL/GreatSQL/releases/tag/GreatSQL-8.0.32-25,找到 greatsql-8.0.32-25.tar.xz 下载GreatSQL源码包,放在上面创建的 /root/rpmbuild/SOURCES 目录下,并解压缩。
GreatSQL社区
2024/01/10
2040
在CentOS环境下编译GreatSQL RPM包
在CentOS环境下编译GreatSQL RPM包
戳此链接 https://gitee.com/GreatSQL/GreatSQL/releases/tag/GreatSQL-8.0.32-25,找到 greatsql-8.0.32-25.tar.xz 下载GreatSQL源码包,放在上面创建的 /root/rpmbuild/SOURCES 目录下,并解压缩。
老叶茶馆
2024/01/01
2530
在CentOS环境下编译GreatSQL RPM包
OpenSSH9.8p1编译rpm包
实际升级openssh过程中只需要这3个文件即可,不需要使用debuginfo文件
何宇
2024/08/19
9762
安装 PostgreSQL
由于特性丰富,很多 CMDB 都是基于它开发的,再加上当前的物联网热潮,IOT 场景中大量涉及时空数据的处理,这些方面都是它的专长
franket
2021/08/12
2.7K0
YUM下载全量依赖
在离线的内网环境下进行安装一些软件的时候会出现依赖不完整的情况,一般情况下会使用如下方式进行下载依赖包
小陈运维
2021/10/13
1.2K0
MySQL 9.0 风云再起:全面解析最新创新版发布!
身份验证 在 MySQL 8.0 中弃用的插件已被删除,并且服务器不再接受来自不具备相应能力的旧客户端程序的认证请求。为了向后兼容,MySQL 客户端仍然保留了一种方式,即将客户端端内建的认证插件转换为动态可加载的插件。
DBA实战
2024/09/06
1840
MySQL 9.0 风云再起:全面解析最新创新版发布!
Install PostgreSQL
PostgreSQL 的影响力越来越大了,虽然长期居于数据库排行榜的第四名(前三分别为 oracle, mysql, sqlserver),不过近三年来(2015-2018年),却是受关注涨幅最大的数据库,并且长期保持稳步增涨的态势,可能与其丰富的特性迎合了现代互联网的发展需求有一定关联
franket
2021/08/11
2.4K0
MySQL 8.X 版本安装及用户管理
软件包下载地址:http://mirrors.sohu.com/mysql/MySQL-8.0/
星哥玩云
2022/08/18
5920
​ARM架构源码编译zfs
内核信息 内核版本 内核版本 CPU架构 ubuntu 5.15.0-39-generic ARM 前置系统依赖 // 系统包依赖 $ sudo apt install -y \ alien \ autoconf \ automake \ build-essential \ dkms \ fakeroot \ gawk \ gdebi-core \ libacl1-dev \ libaio-dev \ libattr1
用户4700054
2022/08/17
1.3K0
Install Otrs
前言 Otrs 是一个开源的工单系统 OTRS is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. With a fast implementation and easy customization to your needs it helps you reducing costs and increasing the effi
franket
2021/08/11
5820
mysql 读写分离之主从配置
1)每个从数据库会使用一个MySQL账号来连接主数据库,所以我们要在主数据库里创建一个账号,并且该账号要授予 REPLICATION SLAVE 权限,你可以为每个从数据库分别创建账号,当然也可以用同一个!)
一笠风雨任生平
2019/08/02
6870
mysql 读写分离之主从配置
Install LAMP
由 Linux 提供运行环境,Mysql 提供关系型存储,Apache 提供 Web 服务,PHP 完成应用逻辑
franket
2021/08/11
2K0
安装 OpenShift Origin
这两年容器技术太火了,很多大公司后台的应用都完成了容器化的转变,容器化代表了 DevOps 领域的一个未来趋势
franket
2021/08/12
1.4K0
编译 Libvirt 源码 并 创建yum源
有时候需要测试特定版本的libvirt或者需要测试自己修改过的libvirt。这时候就需要重新编译libvirt,并做成yum源
后端云
2022/11/25
2.4K0
相关推荐
centos7源码编译和安装lustre
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档