安装配置Glusterfs
yum install rpcbind libaio lvm2-devel -y
[root@glusterfs01 ~]# cd Glusterfs-RPM安装包/
[root@glusterfs01 Glusterfs-RPM安装包]# yum install glusterfs-*.rpm -y
或者分开装:
分区过程忽略
[root@glusterfs01 ~]# mkdir /brick1 /brick2 #创建挂载目录
[root@glusterfs01 ~]# mount /dev/sdb1 /brick1
[root@glusterfs01 ~]# mount /dev/sdc1 /brick2
vim /etc/fastb或者/etc/rc.local
[root@glusterfs01 ~]# /etc/init.d/glusterd start
以上三个节点相同操作
添加其他节点:
[root@glusterfs01 ~]# gluster peer probe server2 #添加其他两台加入集群,只需要在一个节点操作
[root@glusterfs01 ~]# gluster peer probe server3
[root@glusterfs01 ~]# gluster peer status #同时在其他节点查看
[root@glusterfs01 ~]# gluster volume create testvo1 server1:/brick1/b1 #创建一个分布式卷,b1目录会自动创建,先使用一个节点,为后面扩展做准备
[root@glusterfs03 ~]# gluster volume start testvo1
[root@glusterfs03 ~]# gluster volume status
[root@glusterfs03 ~]# gluster volume info
[root@glusterfs01 b1]# gluster volume status
[root@fluster-client ~]# mount -t glusterfs server1:/testvo1 /mnt
[root@glusterfs01 ~]# gluster volume add-brick testvo1 server2:/brick1/b2 server3:/brick1/b3 #testvo1卷添加另外两个节点
[root@glusterfs01 ~]# gluster volume info
[root@fluster-client aa]# df -h #客户端查看扩展前后挂载目录的大小
客户端在测试添加一些数据到挂目录,看看节点上是否会有数据,已经分配是否均匀
[root@glusterfs01 hehe]# gluster volume remove-brick testvo1 server3:/brick1/b3 #删除一个节点
Removing brick(s) can result in data loss. Do you want to Continue? (y/n) y
[root@glusterfs01 hehe]# gluster volume info
[root@fluster-client aa]# df -h #客户端查看删除前后挂载目录的大小
[root@glusterfs01 hehe]# gluster volume rebalance testvo1 start #做数据的负载均衡
[root@glusterfs03 hehe]# rm -rf /brick1/b3/ #将之前的删除节点加入卷,需要先删除之前的数据目录
[root@glusterfs03 hehe]# gluster volume add-brick testvo1 server3:/brick1/b3
[root@glusterfs01 test]# gluster volume rebalance testvo1 start #添加删除节点应当都需要做数据负载均衡
[root@fluster-client ~]# umount /mnt/ #客户端卸载挂载点
[root@glusterfs01 test]# gluster volume stop testvo1
[root@glusterfs01 test]# gluster volume delete testvo1
[root@glusterfs01 brick1]# gluster volume create testov1 replica server1:/brick1/b1 server2:/brick1/b2
[root@glusterfs01 brick1]# gluster volume start testov1
[root@glusterfs01 brick1]# gluster volume info #查看Type 属性
[root@fluster-client ~]# mount -t glusterfs server1:/testov1 /mnt #客户端挂载,查看挂载目录大小
[root@fluster-client ~]# df -h #进入挂点添加一些数据,查看数据是否在两个节点中一致
[root@glusterfs03 vols]# rm -rf /var/lib/glusterd/vols/testov1/ #删除节点三的卷信息(没个节点卷信息都是一致的,即使数据不一致)
[root@glusterfs03 vols]# gluster volume sync server2 all #从节点2恢复卷信息
[root@glusterfs03 vols]# ll #刚刚被删除的内容有恢复了
[root@glusterfs01 b1]# gluster volume set testov1 auth.allow 192.168..* #允许访问(仅做IP访问控制,客户端已挂载需要重新挂载生效)
[root@glusterfs01 b1]# gluster volume set testov1 auth.reject 10.1..* #禁止访问,重新allow即可恢复被禁止的IP
[root@glusterfs01 b1]# gluster volume create dhtvol server1:/brick1/dht
[root@glusterfs01 b1]# gluster volume start dhtvol
[root@glusterfs01 b1]# gluster volume info dhtvol
[root@fluster-client mnt]# mount -t glusterfs server1:/dhtvol /media/ #客户端挂载
[root@fluster-client mnt]# df -h
[root@glusterfs01 b1]# gluster volume add-brick dhtvol server2:/brick1/dht #扩展卷的容量
安装配置Glusterfs的更多相关文章
- 2.GlusterFS 安装配置
2.1 GlusterFS 安装前的准备 服务器规划:(vmware 实验) 操作系统 IP 主机名 数据盘(2 块) CentOS 6.8 x86_64 10.1.0.151 mystorage1 ...
- glusterfs安装配置
目标: 原有的k8s的集群磁盘容量不够,数据迁移无法完成,数据迁移是物理机无法由于采购磁盘流程过程,申请虚拟机搭建glusterfs做分布式存储 磁盘规划: # 查看盘符 $ lsblk # 然后创建 ...
- Docker: 安装配置入门[二]
一.安装配置启动 1.环境 [root@docker1 ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@d ...
- Hive安装配置指北(含Hive Metastore详解)
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
- Hive on Spark安装配置详解(都是坑啊)
个人主页:http://www.linbingdong.com 简书地址:http://www.jianshu.com/p/a7f75b868568 简介 本文主要记录如何安装配置Hive on Sp ...
- ADFS3.0与SharePoint2013安装配置(原创)
现在越来越多的企业使用ADFS作为单点登录,我希望今天的内容能帮助大家了解如何配置ADFS和SharePoint 2013.安装配置SharePoint2013这块就不做具体描述了,今天主要讲一下怎么 ...
- Hadoop的学习--安装配置与使用
安装配置 系统:Ubuntu14.04 java:1.7.0_75 相关资料 官网 下载地址 官网文档 安装 我们需要关闭掉防火墙,命令如下: sudo ufw disable 下载2.6.5的版本, ...
- redis的安装配置
主要讲下redis的安装配置,以及以服务的方式启动redis 1.下载最新版本的redis-3.0.7 到http://redis.io/download中下载最新版的redis-3.0.7 下载后 ...
- Windows环境下的NodeJS+NPM+Bower安装配置
npm作为一个NodeJS的模块管理,之前我由于没有系统地看资料所以导致安装配置模块的时候走了一大段弯路,所以现在很有必要列出来记录下.我们要先配置npm的全局模块的存放路径以及cache的路径,例如 ...
随机推荐
- Vue学习入门
1.安装WebStorm: 2.激活WebStorm:https://blog.csdn.net/qq_40147863/article/details/81317709 3.安装全局脚手架:npm ...
- MySQL 有用的查询语句
查看指定数据库 db_name 的字符集和排序规则 USE db_name; SELECT @@character_set_database, @@collation_database; 显示索引信息 ...
- 为什么js 的constructor中是无限循环嵌套:Foo.__proto__.constructor.prototype.constructor.prototype.constructor.prototype.xxx ?
constructor始终指向创建当前对象实例的(构造)函数. 任何函数都是Function类的一个实例 那么根据上述可知:任何函数的constructor属性都指向Function类,而Functi ...
- 代理模式proxy
代理模式的共同优点如下: (1) 能够协调调用者和被调用者,在一定程度上降低了系统的耦合度. (2) 客户端可以针对抽象主题角色进行编程,增加和更换代理类无须修改源代码,符合开闭原则,系统具有较好的灵 ...
- C++Builder XE7 up1 简单测试
很久没用BCB了, 新装了BCBXE7up1试试了,发现有点找不到北了,好像与BCB6的一些默认设置项不一样,编译了一个空APP,提示找不到bpl 和 dll. 设置为不带包编译后,还是提示DLL找不 ...
- hadoop商业版本的选择介绍
记得刚接触到hadoop的时候跟大部分人一样都会抱怨hadoop的安装部署问题,对于一个新手来说这这的是个头疼的问题,可能需要花费一整天的时间才能把分布式环境安装配置好.在刚接触hadoop的一段时间 ...
- MySQL 5.7 Invalid default value for 'CREATE_TIME'报错的解决方法
出处:http://blog.itpub.net/15498/viewspace-2136006/ 由于数据库的升级,今天在执行从MySQL 5.6导出来的SQL文件时报错: mysql> so ...
- delphi内存映射 与 映射数据获取
一.原理 通过使用“内存映射文件”,实现内存共享 二.主要操作 共享内存结构: PShareMem = ^TShareMem; TShareMem = Record id:stri ...
- Thinkphp 缓存和静态缓存局部缓存设置
1.S方法缓存设置 if(!$rows = S('indexBlog')){ //*$rows = S('indexBlog') $rows = D('blog')->select(); S(' ...
- 测试教程网.unittest教程.4. 实例: 读取测试数据并测试弱密码
From: http://www.testclass.net/pyunit/test_example_2/ 背景 接上一节的弱密码例子,我们的用例尽管运行的不错,但还是有点问题. 假如我们需要增加一些 ...