使用架构:

2台机器安装 GlusterFS 组成一个 Distributed Replicated Volumes集群

192.168.0.92 服务端
192.168.0.93 服务端
192.168.0.91 客户端 环境配置请参照:https://www.cnblogs.com/effortsing/p/10367025.html #关掉selinux、防火墙 2台服务器安装glusterFS yum install centos-release-gluster -y yum install -y glusterfs glusterfs-server glusterfs-fuse glusterfs-rdma 3.启动 systemctl start glusterd 设置开机启动 systemctl enable glusterd 4.加入 trusted storage pool 在任意节点执行 gluster peer probe,本文在192.168.0.92执行 gluster peer probe 192.168.0.93 查看节点信息 gluster peer status 5.创建数据存储目录 所有节点创建目录 mkdir -p /gluster/data/ 6.创建Distributed Replicated Volumes gluster volume create file-service replica 2 transport tcp 192.168.0.92:/gluster/data/ 192.168.0.93:/gluster/data/ force 这条命令的意思是使用Replicated的方式,建立一个名为file-service的卷(Volume),存储块(Brick)为2个 只在其中一个节点执行 启动volume gluster volume start file-service 只在其中一个节点执行 查看 volume状态 gluster volume info 7.安装客户端 在客户端执行 yum -y install glusterfs glusterfs-fuse 创建目录 mkdir -p /gluster/data/ 将服务器上的逻辑卷file-service挂在到本地/gluster/data mount -t glusterfs 192.168.0.92:/file-service /gluster/data 查看挂在 df -h 8.测试 在客户端挂载目录/gluster/data建立文件以测试GlusterFS是否正常工作。 cd /gluster/data touch file1 file2 file3 因为建立的是Distributed Replicated Volumes,所以在客户端写入的文件会同时出现在192.168.0.92:/gluster/data和192.168.0.93:/gluster/data 注意 volume create: file-service: failed: The brick 192.168.0.92:/gluster/data is being created in the root partition. It is recommended that you don’t use the system’s root partition for storage backend. Or use ‘force’ at the end of the command if you want to override this behavior. 这是因为我们创建的brick在系统盘,这个在gluster的默认情况下是不允许的,如果必须这样请使用force GlusterFS 几种volume 模式说明: 一、 Distributed Volumes,默认模式,DHT gluster volume create test-volume server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 二、 Replicated Volumes,复制模式,AFR gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 避免脑裂,加入仲裁 gluster volume create replica 3 arbiter 1 host1:brick1 host2:brick2 host3:brick3` 三、Striped Volumes gluster volume create test-volume stripe 2 transport tcp server1:/exp1 server2:/exp2 四、Distributed Striped Volumes,最少需要4台服务器。 gluster volume create test-volume stripe 4 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6 server7:/exp7 server8:/exp8 五、Distributed Replicated Volumes,最少需要4台服务器。 gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 六、Distributed Striped Replicated Volumes gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6 server7:/exp7 server8:/exp8 七、Striped Replicated Volumes gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 参照文档: https://www.2cto.com/kf/201712/704742.html

GlusterFS集群的更多相关文章

  1. 【云计算】Ubuntu14.04 搭建GlusterFS集群

    1.修改 /etc/hosts 所有服务节点执行(如果集群中没有DNS,可忽略此步骤): 10.5.25.37 glusterfs-1-5-25-3710.5.25.38 glusterfs-2-5- ...

  2. kubernetes实战(九):k8s集群动态存储管理GlusterFS及使用Heketi扩容GlusterFS集群

    1.准备工作 所有节点安装GFS客户端 yum install glusterfs glusterfs-fuse -y 如果不是所有节点要部署GFS管理服务,就在需要部署的节点上打上标签 [root@ ...

  3. Kubernetes之GlusterFS集群文件系统高可用安装,提供动态卷存储

    GlusterFS高可用安装 一. 准备工作 安装好的k8s集群,提供其中三个节点给GFS,这三个节点都至少有一个可用的裸块设备 在k8s所有节点安装所需要的组件 # ubuntu16.04 add- ...

  4. Centos7下GlusterFS分布式存储集群环境部署记录

    0)环境准备 GlusterFS至少需要两台服务器搭建,服务器配置最好相同,每个服务器两块磁盘,一块是用于安装系统,一块是用于GlusterFS. 192.168.10.239 GlusterFS-m ...

  5. GlusterFS分布式存储集群部署记录-相关补充

    接着上一篇Centos7下GlusterFS分布式存储集群环境部署记录文档,继续做一些补充记录,希望能加深对GlusterFS存储操作的理解和熟悉度. ======================== ...

  6. 通过Heketi管理GlusterFS为K8S集群提供持久化存储

    参考文档: Github project:https://github.com/heketi/heketi MANAGING VOLUMES USING HEKETI:https://access.r ...

  7. GlusterFS集群文件系统概述

    http://blog.csdn.net/zonelan/article/details/8468383 1.      GlusterFS概述 GlusterFS是Scale-Out存储解决方案Gl ...

  8. 基于开源软件构建高性能集群NAS系统,包括负载均衡(刘爱贵)

    大数据时代的到来已经不可阻挡,面对数据的爆炸式增长,尤其是半结构化数据和非结构化数据,NoSQL存储系统和分布式文件系统成为了技术浪潮,得到了长足的发展.非结构化数据目前呈现更加快速的增长趋势,IDC ...

  9. GlusterFS集群文件系统研究

    https://blog.csdn.net/liuaigui/article/details/6284551 1.      GlusterFS概述GlusterFS是Scale-Out存储解决方案G ...

随机推荐

  1. 【2-sat】8.14B. 黑心老板

    2-sat 只写过板子 题目大意 有一个长度为$k$取值只有01的序列,现在$n$个人每人下注三个位置,请构造一个序列使每个人最多猜对一个位置 $k\le 5000,n \le 10000$ 题目分析 ...

  2. flex布局详解

    1.背景介绍 传统的布局解决方案,基于盒状模型,依赖 display 属性 + position属性 + float属性.它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现. 2009年,W3C ...

  3. 中文录入问题 转载自:http://blog.csdn.net/ichsonx/article/details/8625925

    2.1中文录入问题 默认安装的msysgit的shell环境中无法输入中文,为了能在shell界面输入中文,需要修改配置文件/etc/inputrc,增加或修改相关配置如下: #disable/ena ...

  4. Python实现JSON生成器和递归下降解释器

    Python实现JSON生成器和递归下降解释器 github地址:https://github.com/EStormLynn/Python-JSON-Parser 目标 从零开始写一个JSON的解析器 ...

  5. BZOJ 2759 一个动态树好题 (LCT)

    PoPoQQQ 再一次orz-没看得特别明白的可以回来看看蒟蒻的补充口胡 我这里提一下关于splaysplaysplay维护的子树信息- 在原树上考虑,对于每一个点iii都有这样一个信息xi=ki∗x ...

  6. Luogu P5022 旅行 搜索+贪心

    好吧...一直咕..现在才过...被卡常卡到爆... 写的垃圾版本,$n^2$无脑删边..可以发现走出来的是棵树...更优秀的及数据加强版先咕着...一定写.qwq #include<cstdi ...

  7. 解决xftp远程连接后出现中文乱码

  8. csp-s模拟80(b)

    头一次中午考试,上来一看三个题目以为是三个板子,但一看数据范围就不对劲. T1: 考场上的想法是:找出循环节,对于数组一头一尾的不在循环节中的,维护出以某数结尾/开头的上升序列,对于中间的循环部分只取 ...

  9. Java 多线程:什么是线程安全性

    线程安全性 什么是线程安全性 <Java Concurrency In Practice>一书的作者 Brian Goetz 是这样描述"线程安全"的:"当多 ...

  10. openfalcon架构及相关服务配置详解(转)

    一:openfalcon组件 1.falcon-agent 数据采集组件 agent内置了一个http接口,会自动采集预先定义的各种采集项,每隔60秒,push到transfer. 2.transfe ...