企业网站建设的收获,wordpress 用户角色,企业网站维护工作,wordpress cat_name1.搭建双机lustre高可用集群:
1.环境说明: 主机名系统挂载情况IP地址Lustre集群名内存mds001Centos7.9(共享磁盘)1个mgs,1个MDT,2个OST192.168.10.21/209.21global1Gmds002Centos7.9(共享磁盘)1个mgs,1个MDT,2个OST192.168.10.22/209.22global1GclientCentos7.9无19…1.搭建双机lustre高可用集群:
1.环境说明:
主机名系统挂载情况IP地址Lustre集群名内存mds001Centos7.9(共享磁盘)1个mgs,1个MDT,2个OST192.168.10.21/209.21global1Gmds002Centos7.9(共享磁盘)1个mgs,1个MDT,2个OST192.168.10.22/209.22global1GclientCentos7.9无192.168.10.41无1Gmds01,mds02作为mds的同时 也做oss,做5个共享盘:1个mgs,2个mdt,2个ost,搭建一套高可用的lustre服务集群 2.两个虚拟机使用共享磁盘: 前提:两台虚拟机没有拍摄快照 在mds001主机中: 添加五块5G的硬盘 SCSI 创建新虚拟磁盘 指定磁盘容量 ,立即分配所有磁盘空间,将虚拟磁盘存储为单个文件 在mds001和mds002的虚拟机目录下,找个后缀名为vmx的文件,在文件末尾添加一下内容: scsi1.sharedBus = "virtual"
disk.locking = "false"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
disk.EnableUUID = "TRUE" 重启两台虚拟机发现,添加成功 [root@mds001 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part ├─centos-root 253:0 0 17G 0 lvm /└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 5G 0 disk
sdc 8:32 0 5G 0 disk
sdd 8:48 0 5G 0 disk
sde 8:64 0 5G 0 disk
sdf 8:80 0 5G 0 disk
sr0 11:0 1 9.5G 0 rom /mnt/cdrom 3.安装和配置Lustre: 两台主机都需要下载OSS服务器所需要的包:E2fsprogs包只是在Ext4的原版RPM包基础上增加了对Lustre⽀持 mkdir ~/e2fsprogs cd ~/e2fsprogs
wget -c -r -nd https://downloads.whamcloud.com/public/e2fsprogs/1.44.5.wc1/el7/RPMS/x86_64/
rm -rf index.html* unknown.gif *.gif sha256sum 全部rpm安装: [root@mds001 e2fsprogs]# cd ~/e2fsprogs rpm -Uvh *
准备中... ################################# [100%]
正在升级/安装... 1:libcom_err-1.42.12.wc1-4.el7.cent################################# [ 8%] 2:e2fsprogs-libs-1.42.12.wc1-4.el7.################################# [ 15%] 3:libcom_err-devel-1.42.12.wc1-4.el################################# [ 23%] 4:libss-1.42.12.wc1-4.el7.centos ################################# [ 31%] 5:e2fsprogs-1.42.12.wc1-4.el7.cento################################# [ 38%] 6:libss-devel-1.42.12.wc1-4.el7.cen################################# [ 46%] 7:e2fsprogs-devel-1.42.12.wc1-4.el7################################# [ 54%] 8:e2fsprogs-static-1.42.12.wc1-4.el################################# [ 62%] 9:e2fsprogs-debuginfo-1.42.12.wc1-4################################# [ 69%]
正在清理/删除...10:e2fsprogs-1.42.9-19.el7 ################################# [ 77%]11:e2fsprogs-libs-1.42.9-19.el7 ################################# [ 85%]12:libss-1.42.9-19.el7 ################################# [ 92%]13:libcom_err-1.42.9-19.el7 ################################# [100%] 两台主机都需要下载MDS服务器所需要的包: wget命令参数说明-c断点续传-r递归下载-nd不分层,所有文件下载到当前目录下 rpm包说明kernel-*.el7_lustre.x86_64.rpm带 Lustre 补丁的 Linux 内核kmod-lustre-*.el7.x86_64.rpmLustre 补丁内核模块kmod-lustre-osd-ldiskfs-*.el7.x86_64.rpm基于 ldiskfs 的 Lustre 后端文件系统工具lustre-*.el7.x86_64.rpmLustre 软件命令行工具lustre-osd-ldiskfs-mount-*.el7.x86_64.rpm基于ldiskfs 的 mount.lustre和mkfs。lustre相关帮助文档mkdir ~/lustre2.12.1 cd ~/lustre2.12.1
yum install -y wget
wget \
https://downloads.whamcloud.com/public/lustre/lustre-2.12.1/el7/server/RPMS/x86_64/kernel-3.10.0-957.10.1.el7_lustre.x86_64.rpm \
https://downloads.whamcloud.com/public/lustre/lustre-2.12.1/el7/server/RPMS/x86_64/kmod-lustre-2.12.1-1.el7.x86_64.rpm \
https://downloads.whamcloud.com/public/lustre/lustre-2.12.1/el7/server/RPMS/x86_64/kmod-lustre-osd-ldiskfs-2.12.1-1.el7.x86_64.rpm \
https://downloads.whamcloud.com/public/lustre/lustre-2.12.1/el7/server/RPMS/x86_64/lustre-2.12.1-1.el7.x86_64.rpm \
https://downloads.whamcloud.com/public/lustre/lustre-2.12.1/el7/server/RPMS/x86_64/lustre-osd-ldiskfs-mount-2.12.1-1.el7.x86_64.rpm 安装依赖(否则报错error: Failed dependencies:): yum clean all yum repolist
yum install -y linux-firmware dracut selinux-policy-targeted kexec-tools libyaml perl 全部rpm安装:(如果无法安装就强行安装) cd ~/lustre2.12.1 rpm -ivh *.rpm --force 重启服务器: init 6 检查内核: [root@master ~]# uname -r
3.10.0-957.el7_lustre.x86_64 加载Lustre模块(此为临时加载,重启失效): [root@master ~]# modprobe lustre lsmod | grep lustre
lustre 758679 0
lmv 177987 1 lustre
mdc 232938 1 lustre
lov 314581 1 lustre
ptlrpc 2264705 7 fid,fld,lmv,mdc,lov,osc,lustre
obdclass 1962422 8 fid,fld,lmv,mdc,lov,osc,lustre,ptlrpc
lnet 595941 6 lmv,osc,lustre,obdclass,ptlrpc,ksocklnd
libcfs 421295 11 fid,fld,lmv,mdc,lov,osc,lnet,lustre,obdclass,ptlrpc,ksocklnd 查看lustre版本: [root@mds001 ~]# modinfo lustre
filename: /lib/modules/3.10.0-957.10.1.el7_lustre.x86_64/extra/lustre/fs/lustre.ko
license: GPL
version: 2.12.1
description: Lustre Client File System
author: OpenSFS, Inc. http://www.lustre.org/
retpoline: Y
rhelversion: 7.6
srcversion: E50D950B04B4044ABCBCFA3
depends: obdclass,ptlrpc,libcfs,lnet,lmv,mdc,lov
vermagic: 3.10.0-957.10.1.el7_lustre.x86_64 SMP mod_unload modversions 只有在某个节点挂载上了,才表明MGS,MDT或者是OST被创建了 五个硬盘都在mds001服务器上格式化,因为是共享硬盘,所以在mds002服务器上可以查看到格式化类型: 格式化参数说明--fsname设置Lustre集群的名称,Lustre文件系统的标识,必须唯一--servicenodemgs节点的IP地址,Lnet网络--mgsnodemgs节点的IP地址,Lnet网络--mgs将分区格式化为MGS,MGS(ManaGe Server)是⽤来记录整个Lustre状态的服务--mdt将分区格式化为MDT,MDT(MetaData Target)是存放Lustre元数据服务的设备--ost将分区格式化为OST,OST(Object Storage Target)则是存储Lustre数据的设备--index设置设备的在lustre集群中的标签值,如:--mdt --index=1,LABEL="global-MDT0001",在同集群具有唯一性--reformat跳过检查,防止格式化操作清除已有的数据--replace替换# 关于MDT和OST,--index的值要从0开始ÿ