注:原创文章,转载请注明出处
一、文档说明
Lustre
是一种强大的平行
分布式文件系统
,通常用于HPC行业。
主要组建包括:元数据服务器(Metadataservers, MDSs)、对象存储服务器(objectstorage servers, OSSs)和客户端。其中MDSs提供元数据服务,MGS管理服务器提供Lustre文件系统配置信息,OSS对象存储服务器expose块设备提供数据。
目前网上关于lustre的搭建文档比较少,且大多数文档是1.×版本或者是英文的文档,本篇文档基于centos7.4和最新的lustre2.10.1进行搭建整理,希望对大家有帮助
二、环境准备
1. 准备4台虚拟机,内存>=2G,硬盘>=20G,配置主机名和IP地址
centos1 192.168.11.148 (MDT)
centos2 192.168.11.149 (OST)
centos3 192.168.11.150 (OST)
centos4 192.168.11.151 (client)
2. 每台机器都需要关闭selinux和防火墙(如果会配置防火墙,
4台都要开启防火墙:988,1021,1022,1023端口)
[root@centos1 ~]# systemctl stop firewalld
[root@centos1 ~]# systemctl disable firewalld
[root@centos1 ~]#
sed -i -e "s/enabled/disabled/" /etc/sysconfig/selinux && reboot
3. 配置4台机器免密登录(这里不再赘述,以下是我的配置)
[root@centos1 ~]# cat /etc/hosts
192.168.11.148 centos1
192.168.11.149 centos2
192.168.11.150 centos3
192.168.11.151 centos4
[root@centos1 ~]# cat .ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCns/OqLy8ISef8eg9MAbLU8ic0zAvmoCYe5vAuiMj2HmtOjpA3zKqxGuoj3Uklrn+4mqmKWBiPq0q6NDwdPJD2c2sV+2Fd3HUIiz7POH+Co13VClBb9hH/v4Y69Qx3tOOuAxakaBfZu0QrBSi2X4xy2fNlECAcUR4M8s4DANNq8Pl2GN1kG2zIA3bQH1bjqZkKNEk0zOvEX5RIeCzIZ7cVPhqZSz6BBo+bJ1+Ct5w8yjzw1uBAqsTHAg4fhyf7uQ54j7qOB4crLA3T9djDNqQHq4tCG2wFN+GO+cTZAb7m1boQZUh+kbyZmeg5eof9zkyB93LYejVySZcjvCHQjI1 root@centos1
ssh-rsa AAAAB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