长期支持版本

    社区创新版本

      简介

      Lustre 是一个开源的分布式并行文件系统,具有高可扩展、高性能、高可用等特点。Lustre 运行于 Linux 系统之上提供符合 POSIX 标准的 UNIX 文件系统接口。

      一个部署好的 Lustre 集群系统包含包括4个主要组件:

      • Management Server (MGS): 存储Lustre文件系统的配置信息。
      • Metadata Server (MDS): 为文件系统提供元数据服务。
      • Object Storage Server (OSS): 以对象方式存储文件数据。
      • Lustre clients: 挂着 Lustre 文件系统的主机。

      这些组件通过 Lustre 网络(LNet)互联起来。如下图所示。

      图片来源Lustre manual 1.2章节。

      环境要求

      服务器配置

      • 安装 openEuler 22.03 LTS SP3 的 x86/ARM 服务器一台或多台。
      • 服务器除了系统盘外,还需要配置额外的盘给 Luste 使用。
      • 插有以太网或者 IB 网卡。

      须知:

      如是生产环境,请详细参阅Lustre manual 第五和第六章 Lustre 硬件配置和存储组RAID要求。

      安装

      在所有节点上执行以下命令安装 lustre。

      1. 安装 Lustre rpm repo 包。
      sudo dnf install lustre-release
      
      1. 安装 Lustre 相关 rpm 包。
      sudo dnf install lustre lustre-tests
      

      须知:

      目前的 Lustre rpm 包是基于内核 in-tree IB 驱动编译, 而且只编译了ldiskfs后端,如需基于第三方IB驱动编译(例如MLX IB网卡驱动),或者编译zfs后端支持,请重新编译 lustre src rpm 包。

      lustre src rpm 下载路径: https://repo.openeuler.org/

      目录:openEuler-22.03-LTS-SP3/EPOL/[update/]multi_version/lustre/2.15/source/

      安装编译依赖

      sudo dnf builddep --srpm lustre-2.15.3-2.oe2203sp3.src.rpm
      

      基于MLX IB驱动重新编译

      需要先安装好 MLX IB 驱动。

      rpmbuild --rebuild --with mofed lustre-2.15.3-2.oe2203sp3.src.rpm
      

      支持zfs后端重新编译

      请使用验证分支zfs-2.1-release来编译zfs。

      git clone -b zfs-2.1-release https://github.com/openzfs/zfs
      
      cd zfs && sh autogen.sh && ./configure --with-spec=redhat && make rpms
      
      sudo dnf install ./*$(arch).rpm
      
      rpmbuild --rebuild --with zfs lustre-2.15.3-2.oe2203sp3.src.rpm
      

      部署

      须知:

      以下是简单的部署步骤,如是生产环境,建议按照Lustre manual 第四章“安装概述”的详细步骤进行部署。

      配置网络

      如有多块网卡或者 IB 网卡,需要配置指定哪块为 Lustre 使用,例如指定一块以太网和 IB 网卡给 lustre 使用。

      $ cat /etc/modprobe.d/lustre.conf 
      options lnet networks="tcp(enp125s0f0),o2ib(enp133s0f0)
      

      加载lustre模块

      并检查lnet网络是否ok。

      $ sudo modproe lustre
      $ sudo lctl list_nids
      175.200.20.14@tcp
      10.20.20.14@o2ib
      

      单机快速部署

      如需要快速拉起测试验证单机环境,可以执行以下命令。

      $ sudo /lib64/lustre/tests/llmount.sh
      $ mount
      ...
      192.168.1.203@tcp:/lustre on /mnt/lustre type lustre (rw,checksum,flock,user_xattr,lruresize,lazystatfs,nouser_fid2path,verbose,encrypt)
      $ lfs df -h
      UUID                       bytes        Used   Available Use% Mounted on
      lustre-MDT0000_UUID        95.8M        3.2M       90.5M   4% /mnt/lustre[MDT:0]
      lustre-OST0000_UUID       239.0M        3.0M      234.0M   2% /mnt/lustre[OST:0]
      lustre-OST0001_UUID       239.0M        3.0M      234.0M   2% /mnt/lustre[OST:1]
      
      filesystem_summary:       478.0M        6.0M      468.0M   2% /mnt/lustre
      

      多机集群部署

      在 MGS/MDS 节点上,增加一个 MDT, lustre 文件系统名为 temp。

      $ sudo mkfs.lustre --fsname=temp --mgs --mdt --index=0 /dev/vdb
         Permanent disk data:
      Target:     temp:MDT0000
      Index:      0
      Lustre FS:  temp
      Mount type: ldiskfs
      Flags:      0x65
                    (MDT MGS first_time update )
      Persistent mount opts: user_xattr,errors=remount-ro
      Parameters:
      
      device size = 81920MB
      formatting backing filesystem ldiskfs on /dev/vdb
              target name   temp:MDT0000
              kilobytes     83886080
              options        -J size=3276 -I 1024 -i 2560 -q -O dirdata,uninit_bg,^extents,dir_nlink,quota,project,huge_file,ea_inode,large_dir,^fast_commit,flex_bg -E lazy_journal_init="0",lazy_itable_init="0" -F
      mkfs_cmd = mke2fs -j -b 4096 -L temp:MDT0000  -J size=3276 -I 1024 -i 2560 -q -O dirdata,uninit_bg,^extents,dir_nlink,quota,project,huge_file,ea_inode,large_dir,^fast_commit,flex_bg -E lazy_journal_init="0",lazy_itable_init="0" -F /dev/vdb 83886080k
      Writing CONFIGS/mountdata
      
      $ sudo mkdir /mnt/lustre-mdt1
      $ sudo mount -t lustre /dev/vdb /mnt/lustre-mdt1
      

      可以按照同样的方法增加多块 MDT, --index递增。

      在OSS节点上,增加一块 OST。

      $ sudo lctl list_nids
      192.168.1.203@tcp
      ]$ sudo mkfs.lustre --fsname=temp --mgsnode=192.168.1.203@tcp --ost --index=0 /dev/vdc
         Permanent disk data:
      Target:     temp:OST0000
      Index:      0
      Lustre FS:  temp
      Mount type: ldiskfs
      Flags:      0x62
                    (OST first_time update )
      Persistent mount opts: ,errors=remount-ro
      Parameters: mgsnode=192.168.1.203@tcp
      
      device size = 51200MB
      formatting backing filesystem ldiskfs on /dev/vdc
              target name   temp:OST0000
              kilobytes     52428800
              options        -J size=1024 -I 512 -i 69905 -q -O extents,uninit_bg,dir_nlink,quota,project,huge_file,^fast_commit,flex_bg -G 256 -E resize="4290772992",lazy_journal_init="0",lazy_itable_init="0" -F
      mkfs_cmd = mke2fs -j -b 4096 -L temp:OST0000  -J size=1024 -I 512 -i 69905 -q -O extents,uninit_bg,dir_nlink,quota,project,huge_file,^fast_commit,flex_bg -G 256 -E resize="4290772992",lazy_journal_init="0",lazy_itable_init="0" -F /dev/vdc 52428800k
      Writing CONFIGS/mountdata
      $ sudo mkdir /mnt/lustre-ost1
      $ sudo mount -t lustre /dev/vdc /mnt/lustre-ost1
      

      可以按照同样的方法增加多块 OST, --index递增。

      在 client 节点上,挂着 lustre 文件系统, 测试文件读写。

      $ sudo mount -t lustre 192.168.1.203@tcp:/temp /mnt/lustre
      $ mount
      ...
      192.168.1.203@tcp:/temp on /mnt/lustre type lustre (rw,checksum,flock,nouser_xattr,lruresize,lazystatfs,nouser_fid2path,verbose,encrypt)
      $ lfs df -h
      UUID                       bytes        Used   Available Use% Mounted on
      temp-MDT0000_UUID          44.4G        4.8M       40.4G   1% /mnt/lustre[MDT:0]
      temp-OST0000_UUID          48.2G        1.2M       45.7G   1% /mnt/lustre[OST:0]
      
      filesystem_summary:        48.2G        1.2M       45.7G   1% /mnt/lustre
      
      $ echo "1234asdf"|sudo tee /mnt/lustre/testfile
      1234asdf
      $ cat /mnt/lustre/testfile
      1234asdf
      

      文档捉虫

      “有虫”文档片段

      问题描述

      提交类型 issue

      有点复杂...

      找人问问吧。

      PR

      小问题,全程线上修改...

      一键搞定!

      问题类型
      规范和低错类

      ● 错别字或拼写错误;标点符号使用错误;

      ● 链接错误、空单元格、格式错误;

      ● 英文中包含中文字符;

      ● 界面和描述不一致,但不影响操作;

      ● 表述不通顺,但不影响理解;

      ● 版本号不匹配:如软件包名称、界面版本号;

      易用性

      ● 关键步骤错误或缺失,无法指导用户完成任务;

      ● 缺少必要的前提条件、注意事项等;

      ● 图形、表格、文字等晦涩难懂;

      ● 逻辑不清晰,该分类、分项、分步骤的没有给出;

      正确性

      ● 技术原理、功能、规格等描述和软件不一致,存在错误;

      ● 原理图、架构图等存在错误;

      ● 命令、命令参数等错误;

      ● 代码片段错误;

      ● 命令无法完成对应功能;

      ● 界面错误,无法指导操作;

      风险提示

      ● 对重要数据或系统存在风险的操作,缺少安全提示;

      内容合规

      ● 违反法律法规,涉及政治、领土主权等敏感词;

      ● 内容侵权;

      您对文档的总体满意度

      非常不满意
      非常满意
      提交
      根据您的反馈,会自动生成issue模板。您只需点击按钮,创建issue即可。
      文档捉虫
      编组 3备份