安装配置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的路径,例如 ...
随机推荐
- 我发起了一个 支持 PostgreSql 的 外围设施 的 .Net 开源项目
目标 : 让 PostgreSql 成为 通用的 跨平台 的 数据库 , 成为 开发者 喜爱 的 利器 . 要做的事 , 当然 , PostgreSql 本身现在不用我们去做什么 . 一个 数据库 ...
- git 项目配置用户名、邮箱的方法
git 项目配置用户名.邮箱的方法 单个仓库里,配置用户名.邮箱: git config user.name "姓名" git config user.email "邮箱 ...
- xlsx 库 知识点
官方github地址:https://github.com/SheetJS/js-xlsx xlsx 用webpack打包后体积太大: vue-cli构建的项目,优化办法:https://segmen ...
- java-plupload上传大文件
参考链接: https://blog.csdn.net/hjf_1291030386/article/details/74784172 https://www.cnblogs.com/tengyunh ...
- 【转】利用Psyco提升Python运行速度
转自:http://www.leeon.me/a/use-Psyco-to-improve-Python-speed Psyco 是严格地在 Python 运行时进行操作的.也就是说,Python 源 ...
- Mysql 5.7 单机单实例
参考文章 https://www.xiaocoder.com/2017/03/17/mysql-installation-guide/ 下载5.7的mysql 社区版包 https://cdn.mys ...
- Request method 'POST' not supported
总是报错,原来是form表单的锅,赶紧删了.
- pandas初识
pandas初识 1.生成DataFrame型的数据 import pandas as pd import numpy as np dates = pd.date_range('20130101',p ...
- redmine一键安装(项目管理、Bug管理、任务跟踪、代码管理、日报等等)
1,下载一键安装包(64位系统) https://bitnami.com/stack/redmine 2,帮助文档(安装引导) http://www.360doc.com/content/15/033 ...
- js this详解,事件的三种绑定方式
this,当前触发事件的标签 在绑定事件中的三种用法: a. 直接HTML中的标签里绑定 onclick="fun1()"; b. 先获取Dom对象,然后利用dom对象在js里绑定 ...