GlusterFS分布式文件系统入门指南,多个技能多条路,大文件存储就是这么简单

GlusterFS (Gluster File System) 是一个开源的分布式文件系统,通熟点讲就是将多个服务器上分散的多个磁盘通过网络协议进行合并,组成一块超大号的磁盘。

官方文档:
https://docs.gluster.org/en/latest/

简介

开始搭建前介绍一些术语知识:

名称 解释
brick 最基本的存储单元
volume 存储卷,在逻辑上由N个 bricks 组成
gluster 管理存储的程序,对 glusterfs 中的资源进行查看及操作
glusterd 服务端进程,用来加载多个 bricks 并开启相关网络端口供客户端连接
node 安装有 glusterd 守护进程的主机,提供多个 bricks 存储

整个架构来说比较简单:

  • 主机上安装glusterfs服务端程序glusterd

  • 将多个主机通过gluster命令将其组成一个集群

  • 在每个主机上创建若干相关的目录

  • 通过gluster将相关节点及目录构建出一个存储卷并启用

  • 在任意安装有支持glusterfs的主机上挂载存储卷即可使用

环境

  • centos 7.8.2003

  • glusterfs 9.3

主机 备注
10.255.129.100 client 用于挂载存储卷的客户机
10.255.129.101 node1 节点1 服务机
10.255.129.102 node2 节点2 服务机
10.255.129.103 node3 节点3 服务机

安装

在有网的情况下,安装相对比较简单。

建议配置中科大的源进行加速:https://mirrors.ustc.edu.cn/help/centos.html

sed -e 's|^mirrorlist=|#mirrorlist=|g' \
         -e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.ustc.edu.cn/centos|g' \
         -i.bak \
         /etc/yum.repos.d/CentOS-Base.repo
yum makecache

默认源上其实是已经有 glusterfs 相关软件包的,只是相对较旧,我们这里要安装较新一点的版本。

https://wiki.centos.org/SpecialInterestGroup(2f)Storage.html

更新软件源:

yum install -y centos-release-gluster
yum info glusterfs
Name        : glusterfs
Arch        : x86_64
Version     : 9.3
Release     : 1.el7
Size        : 647 k
Repo        : centos-gluster9/7/x86_64
Summary     : Distributed File System
URL         : http://docs.gluster.org/
License     : GPLv2 or LGPLv3+
Description : GlusterFS is a distributed file-system capable of scaling to several
            : petabytes. It aggregates various storage bricks over TCP/IP interconnect
            : into one large parallel network filesystem. GlusterFS is one of the
            : most sophisticated file systems in terms of features and extensibility.
            : It borrows a powerful concept called Translators from GNU Hurd kernel.
            : Much of the code in&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值