centos7 部署glusterfs集群,服务端和客户端演示

说明

glusterfs 分布式文件服务,详细可以百度
官网文档:

  • https://docs.gluster.org/en/latest/

环境说明

  • 3台机器:2台服务器(node01、node02)、2台客户端(client01)
  • 环境均是centos7

服务端部署流程

1、配置 glusterfs.repo

  • 注意:(路径/etc/yum.repos.d/glusterfs.repo 两台服务器均需要操作)
[myglusterfs]
name=glusterfs
baseurl=http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-9/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

2、服务端安装,

  • 两台服务器均需要操作
yum -y install glusterfs-server

3、启动服务

  • 两台服务器均需要操作
# 启动服务
systemctl start glusterd
# 查看服务状态
systemctl status glusterd
# 设置随机启动
systemctl enable glusterd

4、设置信任池

  • 在 node01 机器上执行 (也可以在node2上执行)
gluster peer probe node02
# 查看结果
gluster peer status

正常情况显示:

Number of Peers: 1Hostname: node02
Uuid: xxxxxx-xxxx-xxxxxxxxxxxxxxxxx
State: Peer in Cluster (Connected)

5、创建分布式卷、挂载卷

  • 在两台服务器分别创建存放glusterfs卷的路径
# 2台服务器均需要操作
mkdir -p /data/test/glusterfs/gv0 # 创建卷
gluster volume create testVolume node01:/data/test/glusterfs/gv0 node02:/data/test/glusterfs/gv0  force
# 查看卷的情况
gluster volume info
# 启动卷
gluster volume start testVolume
# 查看卷的状态
gluster volume status   # 创建挂载卷的路径
mkdir /mnt/gluster
# 挂载卷
mount -t glusterfs node01:/testVolume /mnt/gluster

6、演示

  • 写入一个测试文件
echo "this is a test demo" > /mnt/gluster/test.txt

正常情况在 服务器 node01、node02 都可以在 /mnt/gluster/下面看到test.txt

客户端安装 Gluster Native Client

  • 说明 Gluster Native Client是基于FUSE的,所以需要保证客户端安装了FUSE。这个是官方推荐的客户端,支持高并发和高效的写性能。

  • 客户端安装前, 确保客户机器能够访问 服务器的 TCP、UDP的24007~24008 端口、还要确保 49152 ~49156 端口可以访问

  • 官网文档说明

Ensure that TCP and UDP ports 24007 and 24008 are open on all Gluster servers. Apart from these ports,
you need to open one port for each brick starting from port 49152 (instead of 24009 onwards as with previous releases).
The brick ports assignment scheme is now compliant with IANA guidelines. For example: if you have five bricks, you need to have ports 49152 to 49156 open.From Gluster-10 onwards, the brick ports will be randomized. A port is randomly selected within the range of
base_port to max_port as defined in glusterd.vol file and then assigned to the brick. For example: if you havefive bricks, you need to have at least 5 ports open within the given range of base_port and max_port. To reduce the number of open ports (for best security practices), one can lower the max_port value in the glusterd.vol file and restart glusterd to get it into effect.

确保端口可以添加链接描述访问、客户端部署很简单

# 将FUSE可加载内核模块(LKM)添加到Linux内核
modprobe fuse
# 验证是否已加载FUSE模块
dmesg | grep -i fuse
# 安装glusterfs-client客户端
yum -y install glusterfs-client
# 创建挂载目录
mkdir /mnt/gluster
# 挂载/gv0
mount -t glusterfs node01:/testVolume /mnt/gluster

参考文档

https://www.cnblogs.com/yinzhengjie/p/10395281.html
https://www.cnblogs.com/linuxk/p/9449566.html#autoid-1-0-0
https://docs.gluster.org/en/latest/Administrator-Guide/Setting-Up-Clients/

centos7 部署glusterfs集群,服务端和客户端演示相关推荐

  1. [Eureka集群] 在linux上部署SpringCloudEureka的集群服务端(Dalston.SR5版本)

    搭配使用 logback日志配置: https://blog.csdn.net/a755199443/article/details/92208902 Eureka单机服务端配置: https://b ...

  2. Centos7部署Kubernetes集群

    1.环境介绍及准备: 1.1 物理机操作系统 物理机操作系统采用Centos7.3 64位,细节如下. [root@localhost ~]# uname -a Linux localhost.loc ...

  3. 实战CentOS系统部署Hadoop集群服务

    导读 Hadoop是一个由Apache基金会所开发的分布式系统基础架构,Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS.HDFS有高 ...

  4. 实战Centos系统部署Codis集群服务

    导读 Codis 是一个分布式 Redis 解决方案, 对于上层的应用来说, 连接到 Codis Proxy 和连接原生的 Redis Server 没有明显的区别 (不支持的命令列表), 上层应用可 ...

  5. 离线部署 Cloudera Manager 5 和 CDH 5.12.1 及使用 CDH 部署 Hadoop 集群服务

    Cloudera Manager Cloudera Manager 分为两个部分:CDH和CM. CDH是Cloudera Distribution Hadoop的简称,顾名思义,就是cloudera ...

  6. pushlet实现单机-集群服务端消息推送

    一.什么是pushlet? 1.pushlet推送是一种将java后台数据推送到web页面的框架技术,实现了comet. 2.comet是一个用于描述客户端和服务器之间交互的术语,即使用长期保持的ht ...

  7. centos7 部署k8s集群

    操作环境为VMware 虚拟机 部署前最好 yum update 更新一下系统的服务(时间较长) #1.能访问外网#2.关闭防火墙: systemctl stop firewalld &&am ...

  8. Centos7部署kubernetes集群CA证书创建和分发(二)

    1.解压软件包 [root@linux-node1 ~]# cd /usr/local/src/ [root@linux-node1 src]# ls k8s-v1.10.1-manual.zip [ ...

  9. GBase XDM集群服务配置

    集群配置"包括"库名"."超级用户"."集群服务端口号". 单击主界面左侧树的 "集群服务器配置"项,打开&q ...

最新文章

  1. P - The Shortest Path in Nya Graph HDU - 4725
  2. iOS 生日字符串转化年龄
  3. 肝了一个月,终于搞到了 30 页的 Python 进阶面试题
  4. 这是300年后的人类生活!你相信吗?
  5. VUE自学日志04-Data Property 和方法
  6. 剑指offer——面试题52:构建乘积数组
  7. 【渝粤教育】国家开放大学2018年春季 8668-22T汽车涂装技术(A) 参考试题
  8. fluent设置uds c语言程序,Fluent中UDF和UDS二次开发高级实例专题
  9. pe系统服务器怎么做双盘备份,韩博士教你如何使用pe备份系统
  10. 进华为你必须了解的——华为精神
  11. linux接口vlan tag,linux c vlan tag 技术详解
  12. win10无法装载iso文件_win10系统打开iso格式文件的四种方法
  13. python的设计哲学是什么意思_哲学是什么?
  14. IDA 中怎么查看函数的调用关系
  15. Android SIGABRT的可能原因及开启手机Log日志
  16. 运行github上下载的vue项目
  17. 9大时序异常检测方法汇总
  18. MFC如何在单文档下添加背景图片
  19. 在win20008上运行U890破解提示sorry,this application cannot run under a virtual machine
  20. Pycharm的快捷键

热门文章

  1. 服务器 希捷1t硬盘,希捷推出全球首款SAS接口1TB硬盘-通信/网络-与非网
  2. VBA学习笔记之VBA学习思路
  3. 线性杂双功能PEG试剂OPSS-PEG-Acid,OPSS-PEG-COOH,巯基吡啶聚乙二醇羧基
  4. CSDN的md示例模板
  5. 细说数组名、数组地址、数组首字节地址之间的关系
  6. 再见Print ! 这个神器PySnooper 来了!
  7. DTable7发布OleDB版本,可以链接ACCESS和其它更多的数据库
  8. 看我怎么把别人的女朋友搞到手的(四)
  9. 安卓和ios的ui设计区别_安卓界面设计与iPhone界面设计区别在哪里?
  10. PyQt5实现侧面菜单栏-仿QQ设置--以及透明选中按钮效果(详细讲解)