glusterfs分布式文件系统
第一:安装依赖包:
yum install libibverbs librdmacm xfsprogs nfs-utils rpcbind libaio liblvm2app lvm2-devel libevent-devel nfs-utils-lib-devel tcl-devel libsysfs-devel userspace-rcu atop iozone fio iperf
安装gluserfs server 和 client
yum install glusterfs glusterfs-server glusterfs-fuse
# yum install glusterfs-3.7.9-12 glusterfs-server-3.7.8-1.el7.x86_64
yum -y install glusterfs glusterfs-client
8.组建集群
/etc/init.d/glusterd start
chkconfig glusterd on
登陆服务器server1,执行命令
[root@server1 yum.repos.d]# gluster peer probe server2
[root@server1 yum.repos.d]# gluster peer probe server3
使用 gluster peer status 查看状态
9.创建卷
1.确定创建卷的类型
2.去创建卷的brick列表
3.确定创建卷的网络类型(TCP/RDMA)
4.gluster volume create 创建复制卷,至少2台主机
卷里使用2台主机
gluster volume create testvol replica 3 server1:/brick1/images server2:/brick1/images
#分布式复制glusterfs卷,至少4台主机
#gluster volume create fengvol replica 2 transport tcp judge1:/data/feng judge2:/data/feng graph1:/data/feng graph2:/data/feng force
查看volume 卷信息
为硬盘访问设置权限:
Gluster volume set testVol auth.allow 172.16.1.*
启动创建的卷
gluster volume start testVol
查看卷的扩展属性
getfattr -d -m . -e hex /brick1/images
客户端挂载
mount -t glusterfs glusterfs1:/testvol /data
cat /etc/fstab
glusterfs1:/testvol /data glusterfs defaults 0 0
# 设置 cache 大小, 默认32MB
$ gluster volume set testvol performance.cache-size 4GB
# 设置 io 线程, 太大会导致进程崩溃
$ gluster volume set testvol performance.io-thread-count 16
# 设置 网络检测时间, 默认42s
$ gluster volume set testvol network.ping-timeout 10
# 设置 写缓冲区的大小, 默认1M
$ gluster volume set testvol performance.write-behind-window-size 1024MB
查看卷
Gluster volume info
删除卷
gluster volume stop testvol
gluster volume delete testvol
将机器移出集群
gluster peer detach 172.28.26.102
只允许172.28.0.0的网络访问glusterfs
gluster volume set testvol auth.allow 172.28.26.*
加入新的机器并添加到卷里(由于副本数设置为2,至少要添加2(4、6、8..)台机器)
gluster peer probe 172.28.26.105
gluster peer probe 172.28.26.106
gluster volume add-brick testvol 172.28.26.105:/data/gluster 172.28.26.106:/data/gluster
收缩卷
# 收缩卷前gluster需要先移动数据到其他位置
gluster volume remove-brick testvol 172.28.26.101:/data/gluster/testvol 172.28.26.102:/data/gluster/testvol start
# 查看迁移状态
gluster volume remove-brick testvol 172.28.26.101:/data/gluster/testvol 172.28.26.102:/data/gluster/testvol status
# 迁移完成后提交
gluster volume remove-brick testvol 172.28.26.101:/data/gluster/testvol 172.28.26.102:/data/gluster/testvol commit
迁移卷
# 将172.28.26.101的数据迁移到,先将172.28.26.107加入集群
gluster peer probe 172.28.26.107
gluster volume replace-brick testvol 172.28.26.101:/data/gluster/testvol 172.28.26.107:/data/gluster/testvol start
# 查看迁移状态gluster volume replace-brick testvol 172.28.26.101:/data/gluster/testvol 172.28.26.107:/data/gluster/testvol status
# 数据迁移完毕后提交gluster volume replace-brick testvol 172.28.26.101:/data/gluster/testvol 172.28.26.107:/data/gluster/testvol commit
# 如果机器172.28.26.101出现故障已经不能运行,执行强制提交然后要求gluster马上执行一次同步
gluster volume replace-brick testvol 172.28.26.101:/data/gluster/testvol 172.28.26.102:/data/gluster/testvol commit -force
gluster volume heal testvol s full
移除集群 gluster peer detach server3
glusterfs分布式文件系统的更多相关文章
- GlusterFS 分布式文件系统的使用入门-管理GlusterFS卷
GlusterFS 分布式文件系统的使用入门-管理GlusterFS卷 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.卷的扩容 您可以根据需要在群集联机且可用时扩展卷.例如,您 ...
- GlusterFS分布式文件系统部署及基本使用(CentOS 7.6)
GlusterFS分布式文件系统部署及基本使用(CentOS 7.6) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Gluster File System 是一款自由软件,主要由 ...
- GlusterFS分布式文件系统高速管理
TaoCloud XDFS基于GlusterFS开源分布式文件系统,进行了系统优化.project化.定制化和产品化工作,五年以上的实践积累了大量实践经验,包含客户案例.最佳实践.定制开发.咨询服务和 ...
- GlusterFS分布式文件系统的使用
glusterfs是一款开源的分布式文件系统. 它具备高扩展.高可用及高性能等特性,由于其无元数据服务器的设计,使其真正实现了线性的扩展能力,使存储总容量可轻松达到PB级别,支持数千客户端并发访问. ...
- GlusterFS分布式文件系统部署
GlusterFS是一个可伸缩的网络文件系统,使用常见的现成的硬件,您可以创建大型分布式存储流媒体解决方案.数据分析.和其他数据相关的任务.GlusterFS是自由和开源软件. 详细参考官网:http ...
- GlusterFS 分布式文件系统
简介 官方文档:https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/ Glusterfs是一个开源的分布式文件系统,是S ...
- CentOS7.5 GlusterFS 分布式文件系统集群环境搭建
环境准备: 系统版本:CentOS Linux release 7.5.1804 (Core) glusterfs:3.6.9 userspace-rcu-master: 硬件资源: 10.200.2 ...
- glusterFS分布式文件系统的搭建
准备工作 1.安装IBA yum install libradmacm librdmacm-devel libmlx4 infiniband-diags 2.配置IPOIB /etc/sysconfi ...
- GlusterFS分布式文件系统概述
一.GlusterFS概述 GlusterFS是一个开源的分布式文件系统,同时也是Scale-Out存储解决方案Gluster的核心,在存储数据方面有强大的横向扩展能力,通过扩展不同的节点可以支持PB ...
随机推荐
- 高并发第十二弹:并发容器J.U.C -- Executor组件FutureTask、ForkJoin
从本章开始就要说 Executor 的东西了.本次讲的是一个很常用的FutureTask,和一个不是那么常用的ForkJoin,我们现在就来介绍吧 引言 大部分时候创建线程的2种方式,一种是直接继承T ...
- AutoFac简介
在.NET上现在存在许多的依赖注入容器, 如:Castle Windsor.StructureMap.Autofac .Unity. 这里主要介绍一下Autofac,Autofac和其他容器的不同之处 ...
- 在GDI+中如何实现以左下角为原点的笛卡尔坐标系
今天写了一个求点集合的凸包的一个算法,虽然结果求解出来了,但是想将过程用GDI+绘制出来,就需要将点绘制出来,然而c#GDI+中绘图的坐标与我们常用数学中笛卡尔坐标系是不一样的,所以就要转换GDI+中 ...
- js-权威指南学习笔记7
第七章 数组 1.数组直接量的语法允许有可选的结尾的逗号,所以[ , , ]只有两个元素而非三个. 2.调用构造函数Array()创建数组时,传入一个参数时表示指定数组的长度. 3.所有的索引都是属性 ...
- 查看Linux 、Nginx、 MySQL 、 PHP 版本的方法
参考:查看Linux .Apache . MySQL . PHP 版本的方法 1.查看Linux版本: uname -a: more /etc/issue; cat /proc/version; 2. ...
- 如何解决css-子div设置margin-top后,父div与子div一起下移的bug?
根据规范,一个盒子如果没有上补白(padding-top)和上边框(border-top),那么这个盒子的上边距会和其内部文档流中的第一个子元素的上边距重叠. 这是规范引起的普遍问题. 只要给父盒子设 ...
- Hbase-indexer常用命令
1. 启动hbase-indexer服务 nohup ./hbase-indexer server -z s1:,s2:,s3:,s4:,s5: > /work/hbase-indexer.lo ...
- Android内核漏洞利用技术实战:环境搭建&栈溢出实战
前言 Android的内核采用的是 Linux 内核,所以在Android内核中进行漏洞利用其实和在 一般的 x86平台下的 linux 内核中进行利用差不多.主要区别在于 Android 下使用的是 ...
- Linux+db2+was部署问题总结
Linux+db2+was部署问题总结 前段日子在住建部进行了Linux环境下,db2+rbp+was的部署,由于是集群,切涉及到了很多was的东西,搞了很长时间,在此做一个问题总结,供后续查询 ...
- adb 脚本
1.打印可以ping到的IP地址 @echo offset a=1:startecho %a% \\把a打印到shellping 172.19.5.%a% -w 1 -n 1|find /i &quo ...