安装配置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的路径,例如 ...
随机推荐
- Revit api 创建族并加载到当前项目
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- bootstrap-table设置表头宽度无效的解决方案
bootstrap-table设置colmuns中某列的宽度无效时,需要给整个表设置css属性: .table { table-layout: fixed; }
- xml配置*的问题
spring配置种classpath * 和classpath的问题,class path有多个的情况下,会匹配第一个 <context:component-scan/>中两个**表示可以 ...
- spring-boot-dependencies jar 不完整的问题
集成 springboot 有两种方式. 1 直接 父项目指向 springboot <parent> <groupId>org.springframework.boot&l ...
- Windows 消息【二】窗口函数
前一篇文章讲到非队列消息会直接把消息Dispatch到窗口函数上,窗口函数长什么样? //就是一个大case分支 //要想拦截消息,override窗口函数是一个办法! procedure TCust ...
- java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: " 0"
value = URLDecoder.decode(request.getParameter(paraName), "UTF-8"); 前端用了 encodeURI 来编码参数,后 ...
- 黄聪:wordpress如何携带cookie模拟浏览器访问网站
$args = array( 'user-agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, li ...
- 【支付专区】之微信支付构建请求参数xml
/** * <p>Desc:weChat构建请求参数</p> * <p>参数名ASCII码从小到大排序(字典序)</p> * @param params ...
- 【事务隔离级别】数据库事务隔离级别-UNDERSTANDING ISOLATION LEVELS
参考链接:ISOLATION LEVELS ISOLATION LEVELS In a database system, concurrent transactions are processed i ...
- bzoj5017: [Snoi2017]炸弹
Description 在一条直线上有 N 个炸弹,每个炸弹的坐标是 Xi,爆炸半径是 Ri,当一个炸弹爆炸时,如果另一个炸弹所在位置 Xj 满足: Xi−Ri≤Xj≤Xi+Ri,那么,该炸弹也会被 ...